> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crescendo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a provisioning document

> PUT merges fields into an existing document (404 if missing).

PUT requests **merge** fields into an existing document:

* Only the provided fields are updated
* Existing fields not mentioned in the payload are preserved
* If the document does not exist, the API returns **404 NotFound**

The API stamps `updated` (epoch millis) and `updatedBy` automatically.

## Example: update a user role

```bash theme={null}
export CRESCENDO_TENANT_ID="tenant-alpha"
export CRESCENDO_API_KEY="YOUR_API_KEY"

curl -sS -X PUT \
  -H "Authorization: Bearer $CRESCENDO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role":"owner"}' \
  "https://platform.crescendo.ai/api/v1/provisioning/tenants/$CRESCENDO_TENANT_ID/users/user-123"
```


## OpenAPI

````yaml PUT /api/v1/provisioning/tenants/{tenantId}/{collection}/{docId}
openapi: 3.1.0
info:
  title: Crescendo Platform API
  version: 1.6.0
  description: Public HTTP API for the Crescendo platform.
servers:
  - url: https://platform.crescendo.ai
security:
  - bearerAuth: []
  - bearerTokenQuery: []
tags:
  - name: Service
    description: Service metadata and health.
  - name: Provisioning
    description: Tenant-scoped provisioning resources.
  - name: Reporting
    description: Reporting-friendly exports (cursor pagination).
  - name: VOC
    description: Upload recordings for VOC processing.
  - name: MCP
    description: Model Context Protocol (MCP) endpoints.
paths:
  /api/v1/provisioning/tenants/{tenantId}/{collection}/{docId}:
    put:
      tags:
        - Provisioning
      summary: Update a provisioning document (PUT = merge update)
      description: >-
        Updates an existing document by merging fields (PUT = merge update).
        Returns 404 if the document does not exist.
      operationId: putProvisioningDocument
      parameters:
        - $ref: '#/components/parameters/tenantId'
        - $ref: '#/components/parameters/collection'
        - $ref: '#/components/parameters/docId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProvisioningDocument'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProvisioningDocument'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/PermissionDenied'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    tenantId:
      name: tenantId
      in: path
      required: true
      description: Tenant identifier.
      schema:
        type: string
    collection:
      name: collection
      in: path
      required: true
      description: 'Collection name under the tenant (for example: `users`, `bots`, `jobs`).'
      schema:
        type: string
    docId:
      name: docId
      in: path
      required: true
      description: Document identifier within the collection.
      schema:
        type: string
  schemas:
    ProvisioningDocument:
      type: object
      description: Arbitrary JSON object representing the provisioning resource.
      additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              value:
                code: BadRequest
                message: Invalid request parameters
    Unauthenticated:
      description: Unauthenticated
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              value:
                code: Unauthenticated
                message: Authorization header with Bearer token is required
    PermissionDenied:
      description: Permission denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              value:
                code: PermissionDenied
                message: API key does not allow this operation
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            example:
              value:
                code: NotFound
                message: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
    bearerTokenQuery:
      type: apiKey
      in: query
      name: bearer_token
      description: >-
        Alternative to the Authorization header. Prefer the Authorization header
        whenever possible.

````