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

# Create or attach campaign assets

> Search images accept an existing assetId or a public HTTPS JPEG/PNG url. Use validateOnly to test upload and attachment without changing Google Ads. Image review and eligibility remain with Google.



## OpenAPI

````yaml https://api.sapt.ai/openapi.json post /projects/{projectId}/google-ads/customers/{customerId}/campaigns/{campaignId}/assets
openapi: 3.1.0
info:
  title: Sapt Platform API
  version: 1.0.0
  description: >-
    API for Sapt platform - project management, authentication, and email
    services
servers:
  - url: https://api.sapt.ai
    description: Production
  - url: http://localhost:8787
    description: Local development
security: []
tags:
  - name: Accounts
    description: >-
      The social accounts connected to a project. Start here — the `id` of an
      account is the `socialAccountId` that every posting, scheduling and
      analytics call takes.
  - name: Actions
  - name: Ads
  - name: Agents
  - name: Analytics
    description: >-
      Account- and post-level organic performance for connected Instagram and
      Facebook accounts.
  - name: Assets
  - name: Auth
  - name: CMS
  - name: CRM
  - name: Calendar
  - name: Comments
    description: >-
      Read, reply to, hide and delete comments on published Instagram and
      Facebook posts.
  - name: Content Calendar
    description: >-
      Create, schedule, update and publish organic posts, and stage the media
      they carry. Publishing a post whose status is `failed` retries it.
  - name: Contracts
  - name: Conversation assistants
  - name: Conversions
    description: >-
      Meta server-side Conversions API (CAPI): discover pixels, connect a pixel
      + CAPI token, and send deduped server-side conversions.
  - name: Dashboard Sidebar
  - name: Emails
  - name: Engagement
    description: >-
      Act as the Page or account on published posts: comment, like, unlike, and
      delete a published post.
  - name: Geo
  - name: Google Ads
  - name: Google Business
  - name: Integrations
    description: >-
      Connect third-party providers (Meta, Gmail, Google Business Profile, …).
      List providers, mint OAuth connect links, and poll connection status.
  - name: Invitations
  - name: Memory
  - name: OAuth Clients
  - name: Project Roles
  - name: Project Templates
  - name: Projects
  - name: Schedules
  - name: Service Accounts
  - name: Socials
    description: >-
      Organic social: the connected accounts, the content calendar, media
      staging, publishing, comments and engagement across Instagram, Facebook,
      TikTok, YouTube and Google Business Profile.
  - name: Team
  - name: Users
  - name: Web Analytics
  - name: Workflows
paths:
  /projects/{projectId}/google-ads/customers/{customerId}/campaigns/{campaignId}/assets:
    post:
      tags:
        - Google Ads
      summary: Create or attach campaign assets
      description: >-
        Search images accept an existing assetId or a public HTTPS JPEG/PNG url.
        Use validateOnly to test upload and attachment without changing Google
        Ads. Image review and eligibility remain with Google.
      operationId: addGoogleAdsCampaignAssets
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: path
        - schema:
            type: string
            pattern: ^\d+$
          required: true
          name: customerId
          in: path
        - schema:
            type: string
            pattern: ^\d+$
          required: true
          name: campaignId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                images:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          assetId:
                            type: string
                            pattern: ^\d+$
                        required:
                          - assetId
                        additionalProperties: false
                      - type: object
                        properties:
                          url:
                            type: string
                            format: uri
                          name:
                            type: string
                            minLength: 1
                            maxLength: 128
                        required:
                          - url
                        additionalProperties: false
                  maxItems: 5
                businessLogo:
                  anyOf:
                    - type: object
                      properties:
                        assetId:
                          type: string
                          pattern: ^\d+$
                      required:
                        - assetId
                      additionalProperties: false
                    - type: object
                      properties:
                        url:
                          type: string
                          format: uri
                        name:
                          type: string
                          minLength: 1
                          maxLength: 128
                      required:
                        - url
                      additionalProperties: false
                businessName:
                  type: string
                  minLength: 1
                  maxLength: 25
                calls:
                  type: array
                  items:
                    type: object
                    properties:
                      phoneNumber:
                        type: string
                        minLength: 7
                        maxLength: 32
                      countryCode:
                        type: string
                        minLength: 2
                        maxLength: 2
                      reportCalls:
                        type: boolean
                      adSchedule:
                        type: array
                        items:
                          type: object
                          properties:
                            dayOfWeek:
                              type: string
                              enum:
                                - MONDAY
                                - TUESDAY
                                - WEDNESDAY
                                - THURSDAY
                                - FRIDAY
                                - SATURDAY
                                - SUNDAY
                            startHour:
                              type: integer
                              minimum: 0
                              maximum: 23
                            startMinute:
                              anyOf:
                                - type: number
                                  enum:
                                    - 0
                                - type: number
                                  enum:
                                    - 15
                                - type: number
                                  enum:
                                    - 30
                                - type: number
                                  enum:
                                    - 45
                            endHour:
                              type: integer
                              minimum: 0
                              maximum: 24
                            endMinute:
                              anyOf:
                                - type: number
                                  enum:
                                    - 0
                                - type: number
                                  enum:
                                    - 15
                                - type: number
                                  enum:
                                    - 30
                                - type: number
                                  enum:
                                    - 45
                          required:
                            - dayOfWeek
                            - startHour
                            - startMinute
                            - endHour
                            - endMinute
                    required:
                      - phoneNumber
                  maxItems: 1
                callouts:
                  type: array
                  items:
                    type: object
                    properties:
                      text:
                        type: string
                        minLength: 1
                        maxLength: 25
                    required:
                      - text
                  maxItems: 20
                sitelinks:
                  type: array
                  items:
                    type: object
                    properties:
                      linkText:
                        type: string
                        minLength: 1
                        maxLength: 25
                      finalUrl:
                        type: string
                        format: uri
                      description1:
                        type: string
                        minLength: 1
                        maxLength: 35
                      description2:
                        type: string
                        minLength: 1
                        maxLength: 35
                    required:
                      - linkText
                      - finalUrl
                  maxItems: 20
                structuredSnippets:
                  type: array
                  items:
                    type: object
                    properties:
                      header:
                        type: string
                        enum:
                          - Amenities
                          - Brands
                          - Courses
                          - Degree programs
                          - Destinations
                          - Featured hotels
                          - Insurance coverage
                          - Models
                          - Neighborhoods
                          - Service catalog
                          - Shows
                          - Styles
                          - Types
                      values:
                        type: array
                        items:
                          type: string
                          minLength: 1
                          maxLength: 25
                        minItems: 3
                        maxItems: 10
                    required:
                      - header
                      - values
                  maxItems: 20
                loginCustomerId:
                  type:
                    - string
                    - 'null'
                  pattern: ^\d+$
                validateOnly:
                  type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  linkResourceNames:
                    type: array
                    items:
                      type: string
                  addedCount:
                    type: number
                  validateOnly:
                    type: boolean
                required:
                  - linkResourceNames
                  - addedCount
                  - validateOnly
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '502':
          description: Bad gateway
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT token obtained from /api/auth/token endpoint. Token is verified
        using JWKS and must include a valid user identifier.

````

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