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

# Manage custom fields, collections, and asset relationships

> Runs a validated asset-governance action. Use create_field for reusable custom metadata definitions, set_collection for membership, and add_relationship or remove_relationship for asset links. Requires files:write.



## OpenAPI

````yaml /openapi.json post /api/files/{id}/asset-details
openapi: 3.1.0
info:
  title: Convertly API
  version: 1.0.0
  description: >-
    Convertly provides production API endpoints for media conversion,
    compression, Image CDN delivery, Forma AI, HLS/DASH video streaming, media
    tools, async jobs, workflows, webhooks, and Convertly Storage.
  license:
    name: Proprietary
    url: https://convertly.sh/terms
servers:
  - url: https://convertly.sh
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /api/files/{id}/asset-details:
    post:
      tags:
        - Files
      summary: Manage custom fields, collections, and asset relationships
      description: >-
        Runs a validated asset-governance action. Use create_field for reusable
        custom metadata definitions, set_collection for membership, and
        add_relationship or remove_relationship for asset links. Requires
        files:write.
      operationId: manageAssetDetails
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetDetailsAction'
      responses:
        '200':
          description: Action completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
components:
  schemas:
    AssetDetailsAction:
      oneOf:
        - type: object
          properties:
            action:
              const: create_field
            label:
              type: string
              maxLength: 80
            fieldType:
              type: string
              enum:
                - text
                - long_text
                - number
                - date
                - boolean
                - single_select
                - multi_select
                - url
            required:
              type: boolean
              default: false
            options:
              type: array
              items:
                type: string
              maxItems: 50
          required:
            - action
            - label
            - fieldType
        - type: object
          properties:
            action:
              const: add_relationship
            targetFileId:
              type: string
              format: uuid
            relationType:
              type: string
              enum:
                - related
                - variant
                - derivative
                - source
                - companion
          required:
            - action
            - targetFileId
            - relationType
        - type: object
          properties:
            action:
              const: remove_relationship
            relationshipId:
              type: string
              format: uuid
          required:
            - action
            - relationshipId
        - type: object
          properties:
            action:
              const: create_collection
            name:
              type: string
              maxLength: 120
            description:
              type: string
              maxLength: 1000
          required:
            - action
            - name
        - type: object
          properties:
            action:
              const: set_collection
            collectionId:
              type: string
              format: uuid
            selected:
              type: boolean
          required:
            - action
            - collectionId
            - selected
    Error:
      type: object
      properties:
        error:
          type: string
        upgradeUrl:
          type: string
      required:
        - error
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Dashboard-generated Convertly API key. Keys currently begin with
        `cvly_`.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative API key header for server-side clients.

````