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

# Update a creative

> Updates an existing creative asset by its ID and returns the updated creative information.

Access Control:
- Only the owner of the creative can update it.



## OpenAPI

````yaml /openapi/adm.openapi.en-0.2.2.json patch /creatives
openapi: 3.1.0
info:
  description: >
    ## Introduction

    The Data Management APIs comprehensively oversees the **diverse data** used
    by advertising and recommendation systems, ensuring that the Decision API
    runs accurately and efficiently.


    From registering, updating, and deleting campaigns and placements to **log
    and statistics analysis**, it provides the insights necessary for effective
    system operation.


    The resulting data and metrics are used by the Decision API to **optimize ad
    and content decisions**, ultimately boosting the overall performance of the
    advertising and recommendation system.
  title: Data Management APIs
  version: 0.1.3
servers: []
security: []
tags:
  - name: Audience Targeting
  - description: >

      The Audience Management APIs to seamlessly integrate Audience-related
      data.  


      References:

      - [First-Party
      Data](https://docs.aiderx.io/guides/about-a2/en/first-party-data)
    name: Audience
  - description: >
      APIs for collecting user activity data to enhance ad targeting and
      performance optimization.


      Activity Data captures actual user behavior data like product views,
      searches, cart additions, and purchases across all users, regardless of ad
      interactions.


      References:

      - [First-Party
      Data](https://docs.aiderx.io/guides/about-a2/en/first-party-data)
    name: Activity Log
  - description: >

      The Audience Attribute API provides access to audience attribute data.


      References:

      - [Audience
      Targeting](https://docs.aiderx.io/guides/about-a2/en/audience-targeting)
    name: Audience Attribute
  - description: >

      The Audience Segment API provides access to audience segment data.


      References:

      - [Audience
      Targeting](https://docs.aiderx.io/guides/about-a2/en/audience-targeting)
    name: Audience Segment
  - description: The Analytic API provides access to dashboard and A2 metric data.
    name: Analytic
  - description: >

      The Billing API manages billing information.

      A2 is configured to work with the payment systems used by your retail
      platform.


      To integrate payments, first you need to register an external channel.

      For more information about integrating A2 with external channels, check
      out [the External channels
      page](https://docs.aiderx.io/guides/about-a2/en/external-channel).
    name: Billing
  - description: |

      The Campaign API allows you to manage data related to campaigns.

      References:
      - [Campaign](https://docs.aiderx.io/guides/about-a2/en/campaign)
    name: Campaign
  - description: >

      The Creative API provides comprehensive functionalities for managing
      creative assets and related resources.


      References:

      - [Creative](https://docs.aiderx.io/guides/about-a2/en/creative)
    name: Creative
  - description: >

      The Allocation API provides comprehensive functionalities for managing
      allocation and related resources.


      References:

      - [Allocation](https://docs.aiderx.io/guides/about-a2/en/allocation)
    name: Allocation
  - description: >

      The Media Library API provides comprehensive functionalities for managing
      media library and related resources.


      References:

      - [Media Library](https://docs.aiderx.io/guides/about-a2/en/media-library)
    name: Media Library
  - description: >

      The Catalog Management API provides functionalities for managing catalogs
      and related resources.


      References:

      - [First-Party
      Data](https://docs.aiderx.io/guides/about-a2/en/first-party-data)
    name: Catalog
  - description: >

      The Placement Management API provides comprehensive functionalities for
      managing placements and related resources.


      References:

      - [Placement](https://docs.aiderx.io/guides/about-a2/en/placement)
    name: Placement
  - description: >

      Placement Catalog transforms the placement information into a structured
      “advertising product” that can be easily showcased to advertisers.


      References:

      - To be updated
    name: Placement Catalog
  - description: >

      The System APIs allow you to access and manage system-level settings and
      assets, such as logos and configuration values.


      References:

      - [Yield Optimization
      Settings](https://docs.aiderx.io/guides/about-a2/en/yield-optimization)
    name: System
  - description: >

      The Auth and User API provides authentication and user management
      functionalities.


      References:

      - [Account and
      Budget](https://docs.aiderx.io/guides/about-a2/en/account-and-budget)
    name: Auth and User
  - description: |

      The License API provides license management functionalities.
    name: License
paths:
  /creatives:
    patch:
      tags:
        - Creative
      summary: Update a creative
      description: >-
        Updates an existing creative asset by its ID and returns the updated
        creative information.


        Access Control:

        - Only the owner of the creative can update it.
      operationId: handle_update_creative_creatives_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreativeUpdateSchema'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreativeReadSchema'
          description: Successful Response
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPExceptionResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPExceptionResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    CreativeUpdateSchema:
      description: Represents a updating creative entity.
      properties:
        banner:
          $ref: '#/components/schemas/Banner'
          default:
            ext: {}
            img: ''
            link:
              ext: {}
              url: ''
        cid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: The id of the campaign the creative is used in
          title: Cid
        created_at:
          description: The time the creative was created
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: The creative's description
          title: Description
        height:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          description: The height that will be shown
          title: Height
        id:
          description: The id of creative
          format: uuid
          title: Id
          type: string
        name:
          description: The name of creative
          title: Name
          type: string
        native:
          $ref: '#/components/schemas/Native'
          default:
            ext: {}
            link:
              ext: {}
              url: ''
        owner_id:
          description: The owner's id of creative
          format: uuid
          title: Owner Id
          type: string
        status:
          default: inactive
          description: The status of creative
          enum:
            - active
            - inactive
          title: Status
          type: string
        type:
          description: The type of creative
          enum:
            - banner
            - video
            - native
          title: Type
          type: string
        updated_at:
          description: The time the creative was updated
          format: date-time
          title: Updated At
          type: string
        video:
          $ref: '#/components/schemas/a2_adm__db__models__creative__Video'
          default:
            adm: ''
            ctype: 2
            dur: 0
            ext:
              cdn: ''
              linear: 1
              link:
                ext: {}
                url: ''
              url: ''
            mime: ''
        width:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          description: The width that will be shown
          title: Width
      required:
        - type
        - name
        - id
        - owner_id
      title: CreativeUpdateSchema
      type: object
    CreativeReadSchema:
      description: Represents a reading creative entity.
      properties:
        banner:
          $ref: '#/components/schemas/Banner'
          default:
            ext: {}
            img: ''
            link:
              ext: {}
              url: ''
        cid:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: The id of the campaign the creative is used in
          title: Cid
        created_at:
          description: The time the creative was created
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: The creative's description
          title: Description
        height:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          description: The height that will be shown
          title: Height
        id:
          description: The id of creative
          format: uuid
          title: Id
          type: string
        name:
          description: The name of creative
          title: Name
          type: string
        native:
          $ref: '#/components/schemas/Native'
          default:
            ext: {}
            link:
              ext: {}
              url: ''
        'no':
          description: The no of creative
          title: 'No'
          type: integer
        owner_id:
          description: The owner's id of creative
          format: uuid
          title: Owner Id
          type: string
        status:
          default: inactive
          description: The status of creative
          enum:
            - active
            - inactive
          title: Status
          type: string
        type:
          description: The type of creative
          enum:
            - banner
            - video
            - native
          title: Type
          type: string
        updated_at:
          description: The time the creative was updated
          format: date-time
          title: Updated At
          type: string
        video:
          $ref: '#/components/schemas/a2_adm__db__models__creative__Video'
          default:
            adm: ''
            ctype: 2
            dur: 0
            ext:
              cdn: ''
              linear: 1
              link:
                ext: {}
                url: ''
              url: ''
            mime: ''
        width:
          anyOf:
            - type: integer
            - type: 'null'
          default: 0
          description: The width that will be shown
          title: Width
      required:
        - type
        - name
        - id
        - 'no'
        - owner_id
      title: CreativeReadSchema
      type: object
    HTTPExceptionResponse:
      description: HTTPException response model.
      properties:
        detail:
          description: Detailed explanation for the exception
          title: Detail
          type: string
      required:
        - detail
      title: HTTPExceptionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    Banner:
      description: Represents a banner creative with image, link, and optional extensions.
      properties:
        ext:
          default: {}
          title: Ext
          type: object
        img:
          default: ''
          description: The Banner's image url
          title: Img
          type: string
        link:
          $ref: '#/components/schemas/Link'
      title: Banner
      type: object
    Native:
      description: Represents a native creative with link and optional extensions.
      properties:
        ext:
          default: {}
          title: Ext
          type: object
        link:
          $ref: '#/components/schemas/Link'
      title: Native
      type: object
    a2_adm__db__models__creative__Video:
      description: >-
        Represents a video creative with MIME type, URL, and optional
        extensions.
      properties:
        adm:
          default: ''
          description: Video markup (e.g., VAST)
          title: Adm
          type: string
        ctype:
          default: 2
          description: Subtype of video creative
          title: Ctype
          type: integer
        dur:
          default: 0
          description: Duration of the video creative in seconds
          title: Dur
          type: integer
        ext:
          title: Ext
          type: object
        mime:
          default: ''
          description: The video creative's mime-type
          title: Mime
          type: string
      title: Video
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    Link:
      description: Represents a link with URL and optional extensions.
      properties:
        ext:
          title: Ext
          type: object
        url:
          default: ''
          description: Creative's url
          title: Url
          type: string
      title: Link
      type: object
  securitySchemes:
    OAuth2PasswordBearer:
      flows:
        password:
          scopes: {}
          tokenUrl: auth/jwt/login
      type: oauth2

````