---
title: "Set asset relations"
url: "https://earlyaccess.developers.bynder.com/apis/asset-api-beta-1/versions/d41a5f27-191a-4019-9419-fe0a53e55978/operations/putApi1AssetAssetsAssetidRelationsRelationid"
---

> Full API specification: https://earlyaccess.developers.bynder.com/apis/asset-api-beta-1/versions/d41a5f27-191a-4019-9419-fe0a53e55978.md

# Set asset relations

`PUT` `/api/1/asset/assets/{assetId}/relations/{relationId}`

Operation ID: `putApi1AssetAssetsAssetidRelationsRelationid`

> **IMPORTANT NOTE** > These APIs do not replace the existing v4 APIs yet, and currently only applies to newly uploaded assets still in Draft state (before publishing). Cannot be yet used for Assets that are in Asset Bank and Waiting room. Update the set of assets the given asset is related to. The result is a bidirectional relation between the given asset and the asset's given as input Note: the recommended maximum amount of Ids to relate is 100 maximum. > **Note:** This API is subject to change until it reaches GA. Activation of the API is on a request basis until GA.

## Path parameters

- `assetId` (string, required)
- `relationId` (string, required)

## Request body (required)

Content types: `application/json`

## Responses

- `200`
- `400`
- `401`
- `403`
- `404`
- `500`
- `501`
- `502`
- `504`

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Asset API (Beta)
  version: 1.0.0-beta
servers:
  - url: https://{your-bynder-domain}/
paths:
  /api/1/asset/assets/{assetId}/relations/{relationId}:
    put:
      description: >-
        > **IMPORTANT NOTE**

        > These APIs do not replace the existing v4 APIs yet, and currently only
        applies to newly uploaded assets still in Draft state (before
        publishing). Cannot be yet used for Assets that are in Asset Bank and
        Waiting room. 

         Update the set of assets the given asset is related to. The result is a bidirectional relation between the given asset and the asset's given as input Note: the recommended maximum amount of Ids to relate is 100 maximum.

        > **Note:** This API is subject to change until it reaches GA.
        Activation of the API is on a request basis until GA.
      operationId: putApi1AssetAssetsAssetidRelationsRelationid
      parameters:
        - in: path
          name: assetId
          required: true
          schema:
            type: string
        - in: path
          name: relationId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateAssetRelationInput"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateAssetRelationReply"
          description: ""
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BadRequestError"
          description: ""
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
          description: ""
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ForbiddenError"
          description: ""
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFoundError"
          description: ""
        "500":
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/InternalError"
                  - $ref: "#/components/schemas/DomainError"
          description: ""
        "501":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotImplementedError"
          description: ""
        "502":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BadGatewayError"
          description: ""
        "504":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GatewayTimeoutError"
          description: ""
      security:
        - httpAuth: []
      summary: Set asset relations
      tags:
        - Asset enrichment
security:
  - httpAuth: []
components:
  schemas:
    UpdateAssetRelationInput:
      properties:
        relatedAssetIds:
          items:
            type: string
          type: array
      title: UpdateAssetRelationInput
      type: object
    UpdateAssetRelationReply:
      properties:
        assetId:
          type: string
        portalId:
          type: string
        relatedAssetIds:
          items:
            type: string
          type: array
        relationId:
          type: string
      title: UpdateAssetRelationReply
      type: object
    BadRequestError:
      properties:
        message:
          type: string
      title: BadRequestError
      type: object
    UnauthorizedError:
      properties:
        message:
          type: string
      title: UnauthorizedError
      type: object
    ForbiddenError:
      properties:
        message:
          type: string
      title: ForbiddenError
      type: object
    NotFoundError:
      properties:
        message:
          type: string
      title: NotFoundError
      type: object
    InternalError:
      properties:
        message:
          type: string
      title: InternalError
      type: object
    DomainError:
      oneOf:
        - $ref: "#/components/schemas/AssetRequestFailureError"
        - $ref: "#/components/schemas/BadGatewayError"
        - $ref: "#/components/schemas/BadRequestError"
        - $ref: "#/components/schemas/CreateCropError"
        - $ref: "#/components/schemas/CreateError"
        - $ref: "#/components/schemas/EditAdvanceRightsError"
        - $ref: "#/components/schemas/EditError"
        - $ref: "#/components/schemas/ForbiddenError"
        - $ref: "#/components/schemas/GatewayTimeoutError"
        - $ref: "#/components/schemas/GetAssetRelationsError"
        - $ref: "#/components/schemas/HealthError"
        - $ref: "#/components/schemas/InternalError"
        - $ref: "#/components/schemas/NotFoundError"
        - $ref: "#/components/schemas/NotImplementedError"
        - $ref: "#/components/schemas/PublishAssetError"
        - $ref: "#/components/schemas/ReTriggerError"
        - $ref: "#/components/schemas/RestoreError"
        - $ref: "#/components/schemas/RetrieveError"
        - $ref: "#/components/schemas/ReviewAssetVersionError"
        - $ref: "#/components/schemas/SetAutoTagsError"
        - $ref: "#/components/schemas/SetVersionTagsError"
        - $ref: "#/components/schemas/TrashError"
        - $ref: "#/components/schemas/UnauthorizedError"
        - $ref: "#/components/schemas/UpdateAssetRelationError"
        - $ref: "#/components/schemas/UpdateTaxonomyError"
        - $ref: "#/components/schemas/UploadUrlError"
        - $ref: "#/components/schemas/ValidateAssetError"
      title: DomainError
    NotImplementedError:
      properties:
        message:
          type: string
      title: NotImplementedError
      type: object
    BadGatewayError:
      properties:
        message:
          type: string
      title: BadGatewayError
      type: object
    GatewayTimeoutError:
      properties:
        message:
          type: string
      title: GatewayTimeoutError
      type: object
    AssetRequestFailureError:
      properties:
        message:
          type: string
      title: AssetRequestFailureError
      type: object
    CreateCropError:
      properties:
        message:
          type: string
      title: CreateCropError
      type: object
    CreateError:
      properties:
        message:
          type: string
      title: CreateError
      type: object
    EditAdvanceRightsError:
      properties:
        message:
          type: string
      title: EditAdvanceRightsError
      type: object
    EditError:
      properties:
        message:
          type: string
      title: EditError
      type: object
    GetAssetRelationsError:
      properties:
        message:
          type: string
      title: GetAssetRelationsError
      type: object
    HealthError:
      properties:
        message:
          type: string
      title: HealthError
      type: object
    PublishAssetError:
      properties:
        message:
          type: string
      title: PublishAssetError
      type: object
    ReTriggerError:
      properties:
        message:
          type: string
      title: ReTriggerError
      type: object
    RestoreError:
      properties:
        message:
          type: string
      title: RestoreError
      type: object
    RetrieveError:
      properties:
        message:
          type: string
      title: RetrieveError
      type: object
    ReviewAssetVersionError:
      properties:
        message:
          type: string
      title: ReviewAssetVersionError
      type: object
    SetAutoTagsError:
      properties:
        message:
          type: string
      title: SetAutoTagsError
      type: object
    SetVersionTagsError:
      properties:
        message:
          type: string
      title: SetVersionTagsError
      type: object
    TrashError:
      properties:
        message:
          type: string
      title: TrashError
      type: object
    UpdateAssetRelationError:
      properties:
        message:
          type: string
      title: UpdateAssetRelationError
      type: object
    UpdateTaxonomyError:
      properties:
        message:
          type: string
      title: UpdateTaxonomyError
      type: object
    UploadUrlError:
      properties:
        message:
          type: string
      title: UploadUrlError
      type: object
    ValidateAssetError:
      properties:
        message:
          type: string
      title: ValidateAssetError
      type: object
  securitySchemes:
    httpAuth:
      scheme: bearer
      type: http
```
