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

# Update dynamic image

> Changes an existing dynamic image's template or settings. Call `dynamicImages.get` to inspect current values first.



## OpenAPI

````yaml /api-reference/platform-api.json put /v1/dynamic-images/{id}
openapi: 3.1.1
info:
  title: ChatbotX
  version: 0.0.1
servers:
  - url: https://app.chatbotx.io/api
security:
  - bearerAuth: []
  - developerAccessToken: []
  - tokenInSearchParams: []
paths:
  /v1/dynamic-images/{id}:
    put:
      tags:
        - Dynamic Images
      summary: Update dynamic image
      description: >-
        Changes an existing dynamic image's template or settings. Call
        `dynamicImages.get` to inspect current values first.
      operationId: dynamicImages.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^\d+$
            description: Dynamic image id. Get it from `dynamicImages.list`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: Dynamic image name.
                customFieldId:
                  anyOf:
                    - type: string
                      pattern: ^\d+$
                    - type: 'null'
                  description: >-
                    Custom field id whose per-contact value personalizes the
                    render.
                data:
                  type: object
                  properties:
                    width:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                      exclusiveMinimum: 0
                    height:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                      exclusiveMinimum: 0
                    elements:
                      type: array
                      items:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                              x:
                                type: number
                              'y':
                                type: number
                              width:
                                type: number
                              height:
                                type: number
                              priority:
                                type: boolean
                                default: false
                              type:
                                const: image
                              imageType:
                                enum:
                                  - url
                                  - avatarUser
                                  - customField
                                type: string
                              url:
                                type: string
                              customFieldId:
                                type: string
                              imageStyle:
                                enum:
                                  - square
                                  - circle
                                type: string
                                default: square
                            required:
                              - id
                              - x
                              - 'y'
                              - width
                              - height
                              - type
                              - imageType
                          - type: object
                            properties:
                              id:
                                type: string
                              x:
                                type: number
                              'y':
                                type: number
                              width:
                                type: number
                              height:
                                type: number
                              priority:
                                type: boolean
                                default: false
                              type:
                                const: qrCode
                              text:
                                type: string
                              size:
                                type: integer
                                minimum: 64
                                maximum: 1024
                              color:
                                type: string
                              logoUrl:
                                type: string
                            required:
                              - id
                              - x
                              - 'y'
                              - width
                              - height
                              - type
                              - text
                              - size
                              - color
                          - type: object
                            properties:
                              id:
                                type: string
                              x:
                                type: number
                              'y':
                                type: number
                              width:
                                type: number
                              height:
                                type: number
                              priority:
                                type: boolean
                                default: false
                              type:
                                const: text
                              text:
                                type: string
                              fontSize:
                                type: number
                              fontFamily:
                                enum:
                                  - arial
                                  - serif
                                  - roboto
                                  - greatVibes
                                type: string
                              align:
                                enum:
                                  - left
                                  - center
                                  - right
                                type: string
                              color:
                                type: string
                              bold:
                                type: boolean
                                default: false
                              italic:
                                type: boolean
                                default: false
                              uppercase:
                                type: boolean
                                default: false
                            required:
                              - id
                              - x
                              - 'y'
                              - width
                              - height
                              - type
                              - text
                              - fontSize
                              - fontFamily
                              - align
                              - color
                  required:
                    - width
                    - height
                    - elements
                  description: Image template document (layers, text, positioning).
              required:
                - name
                - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                    x-native-type: date
                  updatedAt:
                    type: string
                    format: date-time
                    x-native-type: date
                  name:
                    type: string
                  customFieldId:
                    anyOf:
                      - type: string
                      - type: 'null'
                  data:
                    type: object
                    properties:
                      width:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        exclusiveMinimum: 0
                      height:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        exclusiveMinimum: 0
                      elements:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                x:
                                  type: number
                                'y':
                                  type: number
                                width:
                                  type: number
                                height:
                                  type: number
                                priority:
                                  type: boolean
                                  default: false
                                type:
                                  const: image
                                imageType:
                                  enum:
                                    - url
                                    - avatarUser
                                    - customField
                                  type: string
                                url:
                                  type: string
                                customFieldId:
                                  type: string
                                imageStyle:
                                  enum:
                                    - square
                                    - circle
                                  type: string
                                  default: square
                              required:
                                - id
                                - x
                                - 'y'
                                - width
                                - height
                                - type
                                - imageType
                            - type: object
                              properties:
                                id:
                                  type: string
                                x:
                                  type: number
                                'y':
                                  type: number
                                width:
                                  type: number
                                height:
                                  type: number
                                priority:
                                  type: boolean
                                  default: false
                                type:
                                  const: qrCode
                                text:
                                  type: string
                                size:
                                  type: integer
                                  minimum: 64
                                  maximum: 1024
                                color:
                                  type: string
                                logoUrl:
                                  type: string
                              required:
                                - id
                                - x
                                - 'y'
                                - width
                                - height
                                - type
                                - text
                                - size
                                - color
                            - type: object
                              properties:
                                id:
                                  type: string
                                x:
                                  type: number
                                'y':
                                  type: number
                                width:
                                  type: number
                                height:
                                  type: number
                                priority:
                                  type: boolean
                                  default: false
                                type:
                                  const: text
                                text:
                                  type: string
                                fontSize:
                                  type: number
                                fontFamily:
                                  enum:
                                    - arial
                                    - serif
                                    - roboto
                                    - greatVibes
                                  type: string
                                align:
                                  enum:
                                    - left
                                    - center
                                    - right
                                  type: string
                                color:
                                  type: string
                                bold:
                                  type: boolean
                                  default: false
                                italic:
                                  type: boolean
                                  default: false
                                uppercase:
                                  type: boolean
                                  default: false
                              required:
                                - id
                                - x
                                - 'y'
                                - width
                                - height
                                - type
                                - text
                                - fontSize
                                - fontFamily
                                - align
                                - color
                    required:
                      - width
                      - height
                      - elements
                  enabled:
                    type: boolean
                  backgroundUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Public URL of the rendered static background.
                  imageUrl:
                    type: string
                    description: >-
                      Trigger URL to embed. Replace `{{user_id}}` with the
                      contact's channel-side id to get a personalized render;
                      without it the static background is served.
                required:
                  - id
                  - createdAt
                  - updatedAt
                  - name
                  - customFieldId
                  - data
                  - enabled
                  - backgroundUrl
                  - imageUrl
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: businessError
                      status:
                        const: 400
                      message:
                        type: string
                        default: An error occurred while processing your request
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: UNAUTHORIZED
                      status:
                        const: 401
                      message:
                        type: string
                        default: Authentication required
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INVALID_CHATBOT_TOKEN
                      status:
                        const: 401
                      message:
                        type: string
                        default: Invalid or missing workspace API token
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: FORBIDDEN
                      status:
                        const: 403
                      message:
                        type: string
                        default: You do not have permission to perform this action
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: trialExpired
                      status:
                        const: 403
                      message:
                        type: string
                        default: Trial expired
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: macLimitReached
                      status:
                        const: 403
                      message:
                        type: string
                        default: Monthly active contact limit reached
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: notFound
                      status:
                        const: 404
                      message:
                        type: string
                        default: Resource not found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: invalidRequestData
                      status:
                        const: 422
                      message:
                        type: string
                        default: Input validation failed
                      data:
                        type: object
                        properties:
                          issues:
                            type: array
                            items:
                              type: object
                              properties:
                                message:
                                  type: string
                                path:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: object
                                        properties:
                                          key:
                                            anyOf:
                                              - type: string
                                              - type: number
                                        required:
                                          - key
                                        additionalProperties: {}
                              required:
                                - message
                              additionalProperties: {}
                        required:
                          - issues
                        additionalProperties: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: validation
                      status:
                        const: 422
                      message:
                        type: string
                        default: Validation error
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: tooManyRequests
                      status:
                        const: 429
                      message:
                        type: string
                        default: Too many requests
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INTERNAL_SERVER_ERROR
                      status:
                        const: 500
                      message:
                        type: string
                        default: An unexpected error occurred
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
components:
  schemas:
    UndefinedError:
      type: object
      properties:
        defined:
          const: false
        code:
          type: string
        status:
          type: number
        message:
          type: string
        data: {}
      required:
        - defined
        - code
        - status
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    developerAccessToken:
      type: http
      scheme: bearer
    tokenInSearchParams:
      type: apiKey
      in: query
      name: token

````