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

# Create a library creative



## OpenAPI

````yaml /openapi/buyer.yaml post /api/v2/buyer/advertisers/{id}/creatives/create
openapi: 3.1.0
info:
  title: Semicola Exchange buyer API
  version: 2.0.0
  description: >-
    Buyer endpoints: advertisers, storefronts and connections, product
    discovery, campaigns, proposals, media buys, creatives and reporting. Every
    write accepts an Idempotency-Key header.
servers:
  - url: https://api.semicola.com
security:
  - bearerAuth: []
  - sessionCookie: []
tags:
  - name: Advertisers
  - name: Storefronts
  - name: Product Discovery
  - name: Campaigns
  - name: Media Buys
  - name: Creatives
  - name: Reporting
  - name: Event Sources
  - name: Webhooks
  - name: Tasks
  - name: Audit Logs
paths:
  /api/v2/buyer/advertisers/{id}/creatives/create:
    post:
      tags:
        - Creatives
      summary: Create a library creative
      operationId: postBuyerAdvertisersByIdCreativesCreate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            exclusiveMinimum: 0
            maximum: 9007199254740991
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                formatKind:
                  type: string
                  enum:
                    - image
                    - html5
                    - display_tag
                    - image_carousel
                    - video_hosted
                    - video_vast
                    - audio_hosted
                    - audio_daast
                    - sponsored_placement
                    - native_in_feed
                    - responsive_creative
                    - agent_placement
                    - custom
                formatId:
                  type: object
                  properties:
                    agentUrl:
                      type: string
                    id:
                      type: string
                  required:
                    - agentUrl
                    - id
                sourceAssets:
                  default: []
                  type: array
                  items:
                    type: object
                    properties:
                      assetId:
                        type: string
                      slot:
                        type: string
                    required:
                      - assetId
                      - slot
                copy:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                clickUrl:
                  type: string
                  format: uri
                mode:
                  default: draft
                  type: string
                  enum:
                    - draft
                    - complete
              required:
                - name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            minLength: 4
                          advertiserId:
                            type: integer
                            exclusiveMinimum: 0
                            maximum: 9007199254740991
                          name:
                            type: string
                            minLength: 1
                          state:
                            type: string
                            enum:
                              - draft
                              - complete
                          formatKind:
                            anyOf:
                              - type: string
                                enum:
                                  - image
                                  - html5
                                  - display_tag
                                  - image_carousel
                                  - video_hosted
                                  - video_vast
                                  - audio_hosted
                                  - audio_daast
                                  - sponsored_placement
                                  - native_in_feed
                                  - responsive_creative
                                  - agent_placement
                                  - custom
                              - type: 'null'
                          formatId:
                            anyOf:
                              - type: object
                                properties:
                                  agentUrl:
                                    type: string
                                  id:
                                    type: string
                                  width:
                                    type: integer
                                    exclusiveMinimum: 0
                                    maximum: 9007199254740991
                                  height:
                                    type: integer
                                    exclusiveMinimum: 0
                                    maximum: 9007199254740991
                                  durationMs:
                                    type: integer
                                    exclusiveMinimum: 0
                                    maximum: 9007199254740991
                                required:
                                  - agentUrl
                                  - id
                                additionalProperties: false
                              - type: 'null'
                          formatLabel:
                            type:
                              - string
                              - 'null'
                          slots:
                            type: array
                            items:
                              type: object
                              properties:
                                slotId:
                                  type: string
                                kind:
                                  type: string
                                  enum:
                                    - asset
                                    - copy
                                assetId:
                                  type: string
                                  minLength: 5
                                value:
                                  type: string
                                  maxLength: 5000
                              required:
                                - slotId
                                - kind
                              additionalProperties: false
                          copy:
                            anyOf:
                              - type: object
                                propertyNames:
                                  type: string
                                additionalProperties:
                                  type: string
                              - type: 'null'
                          clickUrl:
                            type:
                              - string
                              - 'null'
                          trackers:
                            anyOf:
                              - type: object
                                propertyNames:
                                  type: string
                                additionalProperties: {}
                              - type: 'null'
                          role:
                            type: string
                            enum:
                              - evergreen
                              - reference
                          promoted:
                            type: boolean
                          revision:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          createdAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                          updatedAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                        required:
                          - id
                          - advertiserId
                          - name
                          - state
                          - formatKind
                          - formatId
                          - formatLabel
                          - slots
                          - copy
                          - clickUrl
                          - trackers
                          - role
                          - promoted
                          - revision
                          - createdAt
                          - updatedAt
                        additionalProperties: false
                      - type: 'null'
                  error:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          field:
                            type: string
                          details: {}
                        required:
                          - code
                          - message
                        additionalProperties: false
                      - type: 'null'
                required:
                  - data
                  - error
                additionalProperties: false
        default:
          description: >-
            Error envelope `{data: null, error: {code, message, field?,
            details?}}`.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or OAuth access token.
    sessionCookie:
      type: apiKey
      in: cookie
      name: sc_session

````