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

# Manage Meta Ad Set, Image or Carousel Creative (Paused First)

> Create a complete paused Awareness website-image package with operation:create-awareness-website-image: one daily-budget OUTCOME_AWARENESS campaign, one REACH/IMPRESSIONS ad set bound to the selected Page, and one static Facebook Feed image ad with its reviewed website link; no Awareness WEBSITE destination override. The separate operation:create-leads-website-image creates one paused OUTCOME_LEADS campaign, WEBSITE/OFFSITE_CONVERSIONS/IMPRESSIONS ad set with an explicit current workspace/advertiser pixel and LEAD event, and linked Facebook Feed image ad. It requires expectedPixelFingerprint and attributionWindow:ONE_DAY_CLICK as its supported fixed profile. Both require exact account, Page, retained-image fingerprints, daily budget, reviewed copy/link/tracking and complete native readback; no instant form, messaging, app, video, Lead carousel or other attribution profile. Existing Traffic/Sales ad-set, image and static carousel operations retain their own eligibility. Receipts retain exact accepted IDs; uncertain writes must not be replayed. This is an execution endpoint. For a reviewed user change, save its supported capability/body as an immutable action draft, review it, and explicitly publish that draft. Check action-jobs/capabilities before staging; a catalog entry alone does not make it stageable.



## OpenAPI

````yaml /openapi.json post /platform/{resourceUrl}/actions/manage-meta-asset
openapi: 3.1.0
info:
  title: Bily API
  version: 1.0.0
  description: >-
    Discover stores, read analytics and commerce data, inspect connections, and
    run explicitly authorized actions with the Bily API.
  contact:
    name: Bily support
    email: support@bily.ai
servers:
  - url: https://app.bily.ai/api/customer/v1
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Identity
    description: Discover the identity and organizations attached to a key.
  - name: Stores
    description: Discover stores within an organization.
  - name: Store data
    description: Read store profiles, readiness, catalogs, and connected accounts.
  - name: Commerce
    description: Run scoped commerce reads and explicitly approved GraphQL mutations.
  - name: Analytics
    description: >-
      Read normalized advertising, attribution, product, customer, and cohort
      metrics.
  - name: Analytics SQL
    description: Run constrained read-only SQL over store-scoped Bily datasets.
  - name: Customer journeys
    description: Read customer touchpoints within an authenticated store scope.
  - name: Connections
    description: Inspect available connections, support, and advertising assets.
  - name: Supported actions
    description: Synchronize connections and update supported advertising assets.
  - name: Campaign actions
    description: Create or clone supported advertising campaign resources.
  - name: Ad drafts and jobs
    description: Save, review, publish and reconcile immutable advertising changes.
  - name: Creative library
    description: >-
      Analyze references and retain generated images separately from ad
      publication.
  - name: Tracking connections
    description: >-
      List and manage store-scoped tracking connections without returning
      credential secrets.
  - name: Tracking evidence
    description: >-
      Inspect installation, incoming receipts, reviewed events and destination
      evidence within one workspace.
paths:
  /platform/{resourceUrl}/actions/manage-meta-asset:
    post:
      tags:
        - Campaign actions
      summary: Manage Meta Ad Set, Image or Carousel Creative (Paused First)
      description: >-
        Create a complete paused Awareness website-image package with
        operation:create-awareness-website-image: one daily-budget
        OUTCOME_AWARENESS campaign, one REACH/IMPRESSIONS ad set bound to the
        selected Page, and one static Facebook Feed image ad with its reviewed
        website link; no Awareness WEBSITE destination override. The separate
        operation:create-leads-website-image creates one paused OUTCOME_LEADS
        campaign, WEBSITE/OFFSITE_CONVERSIONS/IMPRESSIONS ad set with an
        explicit current workspace/advertiser pixel and LEAD event, and linked
        Facebook Feed image ad. It requires expectedPixelFingerprint and
        attributionWindow:ONE_DAY_CLICK as its supported fixed profile. Both
        require exact account, Page, retained-image fingerprints, daily budget,
        reviewed copy/link/tracking and complete native readback; no instant
        form, messaging, app, video, Lead carousel or other attribution profile.
        Existing Traffic/Sales ad-set, image and static carousel operations
        retain their own eligibility. Receipts retain exact accepted IDs;
        uncertain writes must not be replayed. This is an execution endpoint.
        For a reviewed user change, save its supported capability/body as an
        immutable action draft, review it, and explicitly publish that draft.
        Check action-jobs/capabilities before staging; a catalog entry alone
        does not make it stageable.
      operationId: ads-manage-meta-asset
      parameters:
        - name: resourceUrl
          in: path
          required: true
          description: Exact workspace URL returned by GET /context.
          schema:
            type: string
        - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdsManageMetaAssetInput'
      responses:
        '200':
          description: >-
            Request completed. Inspect the returned state and any verification
            fields.
          headers:
            x-request-id:
              schema:
                type: string
              description: Keep this identifier for diagnostics.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    OrganizationId:
      name: x-bily-organization-id
      in: header
      required: false
      description: >-
        An organization ID returned by GET /context or GET /organizations. Omit
        it when a scoped key supplies the organization. Otherwise provide it
        when no organization is selected.
      schema:
        type: string
        example: org_01J8W7T9G3E6ZQ4M2K5N8P1R0S
  schemas:
    AdsManageMetaAssetInput:
      type: object
      additionalProperties: false
      required:
        - adAccountId
        - sourceAuthority
        - payload
      properties:
        adAccountId:
          type: string
          pattern: ^(?:act_)?[1-9]\d{0,19}$
        sourceAuthority:
          type: object
          additionalProperties: false
          required:
            - dataSourceAdAccountId
            - dataSourceConnectorId
          properties:
            dataSourceAdAccountId:
              type: string
              minLength: 1
            dataSourceConnectorId:
              type: string
              minLength: 1
        payload:
          oneOf:
            - type: object
              additionalProperties: false
              required:
                - operation
                - expectedAccountFingerprint
                - objective
                - optimizationGoal
                - campaignName
                - adsetName
                - name
                - budget
                - budgetType
                - countries
                - pageId
                - imageHash
                - expectedImageFingerprint
                - primaryText
                - headline
                - description
                - destinationUrl
                - callToActionType
                - urlTags
                - status
              properties:
                operation:
                  const: create-awareness-website-image
                  type: string
                expectedAccountFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                objective:
                  const: OUTCOME_AWARENESS
                  type: string
                optimizationGoal:
                  const: REACH
                  type: string
                campaignName:
                  type: string
                  minLength: 1
                  maxLength: 255
                adsetName:
                  type: string
                  minLength: 1
                  maxLength: 255
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                budget:
                  type: number
                  exclusiveMinimum: 0
                  maximum: 1000000
                budgetType:
                  const: daily
                  type: string
                countries:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^[A-Z]{2}$
                pageId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                imageHash:
                  type: string
                  pattern: ^[A-Za-z0-9_-]{1,128}$
                expectedImageFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                primaryText:
                  type: string
                  minLength: 1
                  maxLength: 5000
                headline:
                  type: string
                  maxLength: 255
                description:
                  type: string
                  maxLength: 1000
                destinationUrl:
                  type: string
                  format: uri
                  pattern: ^[Hh][Tt][Tt][Pp][Ss]?://
                  maxLength: 4096
                  anyOf:
                    - not:
                        pattern: ^[Hh][Tt][Tt][Pp][Ss]?://[^/?#]*@
                    - pattern: ^[Hh][Tt][Tt][Pp][Ss]?://:?@[^/?#@]*(?:[/?#]|$)
                callToActionType:
                  enum:
                    - LEARN_MORE
                    - SHOP_NOW
                    - SIGN_UP
                    - CONTACT_US
                    - GET_QUOTE
                    - BOOK_TRAVEL
                    - DOWNLOAD
                    - APPLY_NOW
                  type: string
                urlTags:
                  type: string
                  maxLength: 2048
                status:
                  const: PAUSED
                  type: string
            - type: object
              additionalProperties: false
              required:
                - operation
                - expectedAccountFingerprint
                - objective
                - optimizationGoal
                - campaignName
                - adsetName
                - name
                - budget
                - budgetType
                - countries
                - pageId
                - imageHash
                - expectedImageFingerprint
                - primaryText
                - headline
                - description
                - destinationUrl
                - callToActionType
                - urlTags
                - status
                - destinationType
                - customEventType
                - attributionWindow
                - pixelId
                - expectedPixelFingerprint
              properties:
                operation:
                  const: create-leads-website-image
                  type: string
                expectedAccountFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                objective:
                  const: OUTCOME_LEADS
                  type: string
                optimizationGoal:
                  const: OFFSITE_CONVERSIONS
                  type: string
                campaignName:
                  type: string
                  minLength: 1
                  maxLength: 255
                adsetName:
                  type: string
                  minLength: 1
                  maxLength: 255
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                budget:
                  type: number
                  exclusiveMinimum: 0
                  maximum: 1000000
                budgetType:
                  const: daily
                  type: string
                countries:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^[A-Z]{2}$
                pageId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                imageHash:
                  type: string
                  pattern: ^[A-Za-z0-9_-]{1,128}$
                expectedImageFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                primaryText:
                  type: string
                  minLength: 1
                  maxLength: 5000
                headline:
                  type: string
                  maxLength: 255
                description:
                  type: string
                  maxLength: 1000
                destinationUrl:
                  type: string
                  format: uri
                  pattern: ^[Hh][Tt][Tt][Pp][Ss]://
                  maxLength: 4096
                  anyOf:
                    - not:
                        pattern: ^[Hh][Tt][Tt][Pp][Ss]://[^/?#]*@
                    - pattern: ^[Hh][Tt][Tt][Pp][Ss]://:?@[^/?#@]*(?:[/?#]|$)
                callToActionType:
                  enum:
                    - LEARN_MORE
                    - SIGN_UP
                    - GET_QUOTE
                  type: string
                urlTags:
                  type: string
                  maxLength: 2048
                status:
                  const: PAUSED
                  type: string
                destinationType:
                  const: WEBSITE
                  type: string
                customEventType:
                  const: LEAD
                  type: string
                attributionWindow:
                  const: ONE_DAY_CLICK
                  type: string
                pixelId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                expectedPixelFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
            - type: object
              properties:
                operation:
                  type: string
                  const: create-carousel-ad
                adsetId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                campaignId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                expectedFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                pageId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                instagramActorId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                urlTags:
                  type: string
                  maxLength: 2048
                primaryText:
                  type: string
                  minLength: 1
                  maxLength: 5000
                destinationUrl:
                  type: string
                  maxLength: 4096
                  pattern: ^https?:\/\/
                cards:
                  minItems: 2
                  maxItems: 10
                  type: array
                  items:
                    type: object
                    properties:
                      imageHash:
                        type: string
                        pattern: ^[A-Za-z0-9_-]{1,128}$
                      expectedImageFingerprint:
                        type: string
                        pattern: ^[a-f0-9]{64}$
                      headline:
                        type: string
                        minLength: 1
                        maxLength: 255
                      description:
                        type: string
                        maxLength: 1000
                      destinationUrl:
                        type: string
                        maxLength: 4096
                        pattern: ^https?:\/\/
                      callToActionType:
                        enum:
                          - LEARN_MORE
                          - SHOP_NOW
                          - SIGN_UP
                          - CONTACT_US
                          - GET_QUOTE
                          - BOOK_TRAVEL
                          - DOWNLOAD
                          - APPLY_NOW
                        type: string
                    required:
                      - imageHash
                      - expectedImageFingerprint
                      - headline
                      - description
                      - destinationUrl
                      - callToActionType
                    additionalProperties: false
                status:
                  const: PAUSED
                  type: string
              required:
                - operation
                - adsetId
                - campaignId
                - expectedFingerprint
                - name
                - pageId
                - urlTags
                - primaryText
                - destinationUrl
                - cards
                - status
              additionalProperties: false
            - type: object
              properties:
                operation:
                  type: string
                  const: update-carousel-creative
                adId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                adsetId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                expectedFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                primaryText:
                  type: string
                  minLength: 1
                  maxLength: 5000
                destinationUrl:
                  type: string
                  maxLength: 4096
                  pattern: ^https?:\/\/
                cards:
                  minItems: 2
                  maxItems: 10
                  type: array
                  items:
                    type: object
                    properties:
                      imageHash:
                        type: string
                        pattern: ^[A-Za-z0-9_-]{1,128}$
                      expectedImageFingerprint:
                        type: string
                        pattern: ^[a-f0-9]{64}$
                      headline:
                        type: string
                        minLength: 1
                        maxLength: 255
                      description:
                        type: string
                        maxLength: 1000
                      destinationUrl:
                        type: string
                        maxLength: 4096
                        pattern: ^https?:\/\/
                      callToActionType:
                        enum:
                          - LEARN_MORE
                          - SHOP_NOW
                          - SIGN_UP
                          - CONTACT_US
                          - GET_QUOTE
                          - BOOK_TRAVEL
                          - DOWNLOAD
                          - APPLY_NOW
                        type: string
                    required:
                      - imageHash
                      - expectedImageFingerprint
                      - headline
                      - description
                      - destinationUrl
                      - callToActionType
                    additionalProperties: false
                status:
                  const: PAUSED
                  type: string
              required:
                - operation
                - adId
                - adsetId
                - expectedFingerprint
                - primaryText
                - destinationUrl
                - cards
                - status
              additionalProperties: false
            - type: object
              additionalProperties: false
              required:
                - operation
                - campaignId
                - expectedFingerprint
                - name
                - countries
                - optimizationGoal
                - status
              properties:
                operation:
                  const: create-adset
                  type: string
                campaignId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                expectedFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                countries:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^[A-Z]{2}$
                optimizationGoal:
                  enum:
                    - LINK_CLICKS
                    - OFFSITE_CONVERSIONS
                  type: string
                pixelId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                budget:
                  type: number
                  exclusiveMinimum: 0
                budgetType:
                  type: string
                  enum:
                    - daily
                    - lifetime
                endTime:
                  type: string
                  format: date-time
                status:
                  const: PAUSED
                  type: string
            - type: object
              additionalProperties: false
              required:
                - operation
                - adId
                - adsetId
                - expectedFingerprint
                - primaryText
                - headline
                - description
                - destinationUrl
                - callToActionType
                - status
              properties:
                operation:
                  const: update-image-creative
                  type: string
                adId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                adsetId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                expectedFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                primaryText:
                  type: string
                  minLength: 1
                  maxLength: 5000
                headline:
                  type: string
                  maxLength: 255
                description:
                  type: string
                  maxLength: 1000
                destinationUrl:
                  type: string
                  format: uri
                  pattern: ^https?://
                  maxLength: 4096
                callToActionType:
                  enum:
                    - LEARN_MORE
                    - SHOP_NOW
                    - SIGN_UP
                    - CONTACT_US
                    - GET_QUOTE
                    - BOOK_TRAVEL
                    - DOWNLOAD
                    - APPLY_NOW
                  type: string
                status:
                  const: PAUSED
                  type: string
            - type: object
              additionalProperties: false
              required:
                - operation
                - adsetId
                - campaignId
                - expectedFingerprint
                - nameSuffix
                - includeChildren
                - status
              properties:
                operation:
                  const: duplicate-adset
                  type: string
                adsetId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                campaignId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                expectedFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                nameSuffix:
                  type: string
                  minLength: 1
                  maxLength: 90
                includeChildren:
                  type: boolean
                status:
                  const: PAUSED
                  type: string
            - type: object
              additionalProperties: false
              required:
                - operation
                - adId
                - adsetId
                - expectedFingerprint
                - nameSuffix
                - status
              properties:
                operation:
                  const: duplicate-ad
                  type: string
                adId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                adsetId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                expectedFingerprint:
                  type: string
                  pattern: ^[a-f0-9]{64}$
                nameSuffix:
                  type: string
                  minLength: 1
                  maxLength: 90
                status:
                  const: PAUSED
                  type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Store not found
        requestId:
          type: string
          description: Present on some server errors.
        details:
          description: Optional safe details for an action failure.
        retryAfter:
          type:
            - string
            - 'null'
      additionalProperties: true
  responses:
    BadRequest:
      description: The request path, query, or body is invalid.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is missing or invalid.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The identity or API key is not allowed to perform this request.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource was not found in the caller's accessible scope.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: The request conflicts with the current resource state.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: The request rate is too high.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Bily could not complete the request.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadGateway:
      description: A dependent Bily operation was temporarily unavailable.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: >-
        Authentication or a required data source is temporarily unavailable.
        Honor Retry-After when present; do not interpret this as an invalid key
        or an empty dataset.
      headers:
        x-request-id:
          description: The request identifier selected or generated by Bily.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        A server-side Bily API key created under Settings > AI tools > Access
        keys. Select the intended workspace before creating it.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bily API key
      description: An alternative way to send the same server-side Bily API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.