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

# Update Asset DDEX Metadata

> **PUT /asset/{id}/ddex-metadata**

<Note>
  This endpoint requires authentication. Include your Bearer token in the Authorization header.
</Note>

## Description

**PUT /asset/{id}/ddex-metadata**

**Description:**
Update DDEX-specific metadata for an asset. This endpoint allows you to add or modify metadata fields
required for DDEX delivery, including resource references, technical details, sound recording information,
and musical work references.

**Method:**
`PUT`

**Path Parameter:**

| Parameter | Type   | Description                        |
| --------- | ------ | ---------------------------------- |
| id        | string | The unique identifier of the asset |

**Request Payload:**

| Parameter                | Type   | Description                        |
| ------------------------ | ------ | ---------------------------------- |
| ddexMetadata             | object | DDEX metadata object               |
| resourceReference        | string | Resource reference identifier      |
| technicalResourceDetails | object | Technical details of the resource  |
| soundRecordingDetails    | object | Sound recording specific details   |
| musicalWorkReference     | object | Musical work reference information |

**Use Cases:**

* Prepare asset for DDEX delivery
* Update technical specifications
* Add sound recording details
* Link to musical work references

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/asset/example-id/ddex-metadata', {
    method: 'PUT',
    headers: {
      'Authorization': `Bearer ${token}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      "ddexMetadata": {},
      "resourceReference": "A123456789",
      "technicalResourceDetails": {
        "fileFormat": "WAV",
        "audioCodec": "PCM",
        "bitrate": 1411,
        "sampleRate": 44100,
        "duration": "PT3M45S"
      },
      "soundRecordingDetails": {
        "recordingDate": "2024-01-15",
        "recordingLocation": "Abbey Road Studios",
        "language": "en"
      },
      "musicalWorkReference": {
        "workId": "work-123",
        "iswc": "T-123456789-0"
      }
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.put(
    'https://api.royalti.io/asset/example-id/ddex-metadata',
    headers={
      'Authorization': f'Bearer {token}'
    },
    json={"ddexMetadata":{},"resourceReference":"A123456789","technicalResourceDetails":{"fileFormat":"WAV","audioCodec":"PCM","bitrate":1411,"sampleRate":44100,"duration":"PT3M45S"},"soundRecordingDetails":{"recordingDate":"2024-01-15","recordingLocation":"Abbey Road Studios","language":"en"},"musicalWorkReference":{"workId":"work-123","iswc":"T-123456789-0"}}
  )

  data = response.json()
  print(data)
  ```

  ```bash cURL theme={null}
  curl -X PUT https://api.royalti.io/asset/example-id/ddex-metadata \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"ddexMetadata":{},"resourceReference":"A123456789","technicalResourceDetails":{"fileFormat":"WAV","audioCodec":"PCM","bitrate":1411,"sampleRate":44100,"duration":"PT3M45S"},"soundRecordingDetails":{"recordingDate":"2024-01-15","recordingLocation":"Abbey Road Studios","language":"en"},"musicalWorkReference":{"workId":"work-123","iswc":"T-123456789-0"}}'

  ```
</CodeGroup>


## OpenAPI

````yaml put /asset/{id}/ddex-metadata
openapi: 3.0.0
info:
  title: Royalti.io API
  description: "# Royalti API\r\n\r\nThis is the Royalti music royalty management platform API server.\r\n\r\n## Overview\r\n\r\nThe Royalti API provides comprehensive music royalty management services including:\r\n- Music publishing and writer management\r\n- Royalty processing and analytics\r\n- DDEX integration for music industry standards\r\n- File processing and pattern recognition\r\n- Payment processing and distribution\r\n\r\n## Authentication\r\n\r\nThe API uses JWT-based authentication with multiple protection levels:\r\n- Public endpoints for basic operations\r\n- Protected endpoints requiring valid JWT tokens\r\n- Admin endpoints for administrative functions\r\n\r\n## Features\r\n\r\n- Multi-dimensional royalty analytics\r\n- CWR (Collective Works Registration) support\r\n- DDEX integration for music metadata\r\n- Advanced file processing with pattern recognition\r\n- Real-time data processing with queue system"
  version: 2.6.0
  contact:
    name: Royalti.io Support
    email: support@royalti.io
    url: https://royalti.io
  license:
    name: Proprietary
    url: https://royalti.io/terms
servers:
  - url: https://api.royalti.io
    description: Production server
  - url: https://api-dev.royalti.io
    description: Development server
  - url: http://localhost:8084
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Accounting
    description: Accounting and financial transaction operations
  - name: DDEX
    description: DDEX operations (ERN/MEAD, messages, delivery, providers)
  - name: Label
    description: Label management operations
  - name: Internal Webhooks
    description: Internal system webhooks for royalty processing and downloads
  - name: Payment Webhooks
    description: Payment processor webhook endpoints
  - name: Billing Webhooks
    description: Stripe billing and subscription webhooks
  - name: Infrastructure Webhooks
    description: Cloudflare domain and SSL webhooks
  - name: Distribution Webhooks
    description: Digital distribution platform webhooks (FUGA)
paths:
  /asset/{id}/ddex-metadata:
    put:
      tags:
        - Asset
      summary: Update Asset DDEX Metadata
      description: >-
        **PUT /asset/{id}/ddex-metadata**


        **Description:**

        Update DDEX-specific metadata for an asset. This endpoint allows you to
        add or modify metadata fields

        required for DDEX delivery, including resource references, technical
        details, sound recording information,

        and musical work references.


        **Method:**

        `PUT`


        **Path Parameter:**


        | Parameter | Type | Description |

        | --- | --- | --- |

        | id | string | The unique identifier of the asset |


        **Request Payload:**


        | Parameter | Type | Description |

        | --- | --- | --- |

        | ddexMetadata | object | DDEX metadata object |

        | resourceReference | string | Resource reference identifier |

        | technicalResourceDetails | object | Technical details of the resource
        |

        | soundRecordingDetails | object | Sound recording specific details |

        | musicalWorkReference | object | Musical work reference information |


        **Use Cases:**

        - Prepare asset for DDEX delivery

        - Update technical specifications

        - Add sound recording details

        - Link to musical work references
      parameters:
        - name: id
          in: path
          required: true
          description: Asset ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ddexMetadata:
                  type: object
                  description: DDEX metadata object
                  additionalProperties: true
                resourceReference:
                  type: string
                  description: Resource reference identifier
                  example: A123456789
                technicalResourceDetails:
                  type: object
                  description: Technical details of the resource
                  properties:
                    fileFormat:
                      type: string
                      example: WAV
                    audioCodec:
                      type: string
                      example: PCM
                    bitrate:
                      type: integer
                      example: 1411
                    sampleRate:
                      type: integer
                      example: 44100
                    duration:
                      type: string
                      example: PT3M45S
                soundRecordingDetails:
                  type: object
                  description: Sound recording specific details
                  properties:
                    recordingDate:
                      type: string
                      format: date
                      example: '2024-01-15'
                    recordingLocation:
                      type: string
                      example: Abbey Road Studios
                    language:
                      type: string
                      example: en
                musicalWorkReference:
                  type: object
                  description: Musical work reference information
                  properties:
                    workId:
                      type: string
                      example: work-123
                    iswc:
                      type: string
                      example: T-123456789-0
              example:
                ddexMetadata:
                  releaseType: Single
                  recordLabel: Example Records
                resourceReference: A123456789
                technicalResourceDetails:
                  fileFormat: WAV
                  audioCodec: PCM
                  bitrate: 1411
                  sampleRate: 44100
                  duration: PT3M45S
      responses:
        '200':
          description: DDEX metadata updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: DDEX metadata updated successfully
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      ddexMetadata:
                        type: object
                      resourceReference:
                        type: string
                      updatedAt:
                        type: string
                        format: date-time
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Asset not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Asset not found
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: error
              message:
                type: string
                example: Invalid request parameters
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: error
              message:
                type: string
                example: Unauthorized
    ServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Format: "Bearer
        {token}"

````