> ## 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.

# Create Google Campaign (Paused First)

> Create an exact-source paused Search, Display, Demand Gen, Performance Max, Shopping, App, Hotel or Travel campaign with its native hierarchy. Non-Search payloads require explicit campaignType, targeting and the required creative or linked product account. Demand Gen supports image creatives or format VIDEO with existing same-advertiser YouTube video and square logo asset references; video creation is verified by native hierarchy, creative, budget and targeting reads. Performance Max uses asset groups. Validate the complete payload before saving a launch draft. Classic Video, Smart and Local Services creation are unavailable through the API. 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/create-google-campaign
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/create-google-campaign:
    post:
      tags:
        - Campaign actions
      summary: Create Google Campaign (Paused First)
      description: >-
        Create an exact-source paused Search, Display, Demand Gen, Performance
        Max, Shopping, App, Hotel or Travel campaign with its native hierarchy.
        Non-Search payloads require explicit campaignType, targeting and the
        required creative or linked product account. Demand Gen supports image
        creatives or format VIDEO with existing same-advertiser YouTube video
        and square logo asset references; video creation is verified by native
        hierarchy, creative, budget and targeting reads. Performance Max uses
        asset groups. Validate the complete payload before saving a launch
        draft. Classic Video, Smart and Local Services creation are unavailable
        through the API. 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-create-google-campaign
      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/AdsCreateGoogleCampaignInput'
      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:
    AdsCreateGoogleCampaignInput:
      type: object
      required:
        - adAccountId
        - payload
      properties:
        adAccountId:
          type: string
        payload:
          oneOf:
            - type: object
              required:
                - budget
                - campaign
                - adGroup
                - ad
              properties:
                budget:
                  type: object
                  required:
                    - name
                    - deliveryMethod
                    - amountMicros
                    - explicitlyShared
                  properties:
                    name:
                      type: string
                      minLength: 1
                    deliveryMethod:
                      type: string
                      enum:
                        - STANDARD
                        - ACCELERATED
                    amountMicros:
                      anyOf:
                        - type: number
                          exclusiveMinimum: 0
                        - type: string
                          pattern: ^[1-9]\d*$
                    explicitlyShared:
                      type: boolean
                campaign:
                  type: object
                  required:
                    - name
                    - status
                    - advertisingChannelType
                    - geoTargetTypeSetting
                  properties:
                    name:
                      type: string
                      minLength: 1
                    status:
                      type: string
                      enum:
                        - PAUSED
                    advertisingChannelType:
                      type: string
                      enum:
                        - SEARCH
                    geoTargetTypeSetting:
                      type: object
                    networkSettings:
                      type: object
                    containsEuPoliticalAdvertising:
                      type: string
                adGroup:
                  type: object
                  required:
                    - name
                    - status
                    - type
                  properties:
                    name:
                      type: string
                      minLength: 1
                    status:
                      type: string
                      enum:
                        - PAUSED
                    type:
                      type: string
                      enum:
                        - SEARCH_STANDARD
                keywords:
                  type: array
                  items:
                    type: object
                    required:
                      - text
                      - matchType
                    properties:
                      text:
                        type: string
                      matchType:
                        type: string
                        enum:
                          - EXACT
                          - PHRASE
                          - BROAD
                      status:
                        type: string
                        enum:
                          - ENABLED
                          - PAUSED
                ad:
                  type: object
                  required:
                    - status
                    - type
                    - responsiveSearchAd
                    - finalUrls
                  properties:
                    status:
                      type: string
                      enum:
                        - PAUSED
                    type:
                      type: string
                      enum:
                        - RESPONSIVE_SEARCH_AD
                    responsiveSearchAd:
                      type: object
                      required:
                        - headlines
                        - descriptions
                      properties:
                        headlines:
                          type: array
                          minItems: 3
                          maxItems: 15
                          items:
                            type: object
                            required:
                              - text
                            properties:
                              text:
                                type: string
                                minLength: 1
                                maxLength: 30
                        descriptions:
                          type: array
                          minItems: 2
                          maxItems: 4
                          items:
                            type: object
                            required:
                              - text
                            properties:
                              text:
                                type: string
                                minLength: 1
                                maxLength: 90
                    finalUrls:
                      type: array
                      minItems: 1
                      items:
                        type: string
                        format: uri
                        pattern: ^https?://
              not:
                required:
                  - campaignType
            - type: object
              additionalProperties: false
              required:
                - campaignType
                - name
                - groupName
                - budgetMicros
                - status
                - locations
                - languages
                - cpcBidMicros
                - creative
              properties:
                campaignType:
                  type: string
                  enum:
                    - DISPLAY
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                groupName:
                  type: string
                  minLength: 1
                  maxLength: 128
                budgetMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                status:
                  type: string
                  enum:
                    - PAUSED
                locations:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^geoTargetConstants/[1-9]\d{0,9}$
                languages:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    pattern: ^languageConstants/[1-9]\d{0,9}$
                cpcBidMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                creative:
                  $ref: >-
                    #/components/schemas/AdsCreateGoogleCampaignInput_googleCreative
            - type: object
              additionalProperties: false
              required:
                - campaignType
                - name
                - groupName
                - budgetMicros
                - status
                - locations
                - languages
                - creative
              properties:
                campaignType:
                  type: string
                  enum:
                    - DEMAND_GEN
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                groupName:
                  type: string
                  minLength: 1
                  maxLength: 128
                budgetMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                status:
                  type: string
                  enum:
                    - PAUSED
                locations:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^geoTargetConstants/[1-9]\d{0,9}$
                languages:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    pattern: ^languageConstants/[1-9]\d{0,9}$
                creative:
                  oneOf:
                    - $ref: >-
                        #/components/schemas/AdsCreateGoogleCampaignInput_googleCreative
                    - type: object
                      additionalProperties: false
                      required:
                        - format
                        - businessName
                        - finalUrl
                        - headlines
                        - longHeadlines
                        - descriptions
                        - videoAssetResourceNames
                        - logoAssetResourceNames
                      properties:
                        format:
                          const: VIDEO
                          type: string
                        businessName:
                          type: string
                          minLength: 1
                          maxLength: 25
                        finalUrl:
                          type: string
                          format: uri
                          pattern: ^https?://
                          maxLength: 4096
                        headlines:
                          type: array
                          minItems: 1
                          maxItems: 5
                          uniqueItems: true
                          items:
                            type: string
                            minLength: 1
                            maxLength: 40
                        longHeadlines:
                          type: array
                          minItems: 1
                          maxItems: 5
                          uniqueItems: true
                          items:
                            type: string
                            minLength: 1
                            maxLength: 90
                        descriptions:
                          type: array
                          minItems: 1
                          maxItems: 5
                          uniqueItems: true
                          items:
                            type: string
                            minLength: 1
                            maxLength: 90
                        videoAssetResourceNames:
                          type: array
                          minItems: 1
                          maxItems: 5
                          uniqueItems: true
                          items:
                            type: string
                            pattern: ^customers/[1-9]\d{0,19}/assets/[1-9]\d{0,19}$
                        logoAssetResourceNames:
                          type: array
                          minItems: 1
                          maxItems: 5
                          uniqueItems: true
                          items:
                            type: string
                            pattern: ^customers/[1-9]\d{0,19}/assets/[1-9]\d{0,19}$
            - type: object
              additionalProperties: false
              required:
                - campaignType
                - name
                - groupName
                - budgetMicros
                - status
                - locations
                - languages
                - creative
              properties:
                campaignType:
                  type: string
                  enum:
                    - PERFORMANCE_MAX
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                groupName:
                  type: string
                  minLength: 1
                  maxLength: 128
                budgetMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                status:
                  type: string
                  enum:
                    - PAUSED
                locations:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^geoTargetConstants/[1-9]\d{0,9}$
                languages:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    pattern: ^languageConstants/[1-9]\d{0,9}$
                creative:
                  $ref: >-
                    #/components/schemas/AdsCreateGoogleCampaignInput_googleCreative
            - type: object
              additionalProperties: false
              required:
                - campaignType
                - name
                - groupName
                - budgetMicros
                - status
                - locations
                - languages
                - merchantId
                - feedLabel
                - cpcBidMicros
              properties:
                campaignType:
                  type: string
                  enum:
                    - SHOPPING
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                groupName:
                  type: string
                  minLength: 1
                  maxLength: 128
                budgetMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                status:
                  type: string
                  enum:
                    - PAUSED
                locations:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^geoTargetConstants/[1-9]\d{0,9}$
                languages:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    pattern: ^languageConstants/[1-9]\d{0,9}$
                merchantId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                feedLabel:
                  type: string
                  minLength: 1
                  maxLength: 20
                cpcBidMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
            - type: object
              additionalProperties: false
              required:
                - campaignType
                - name
                - groupName
                - budgetMicros
                - status
                - locations
                - languages
                - appId
                - appStore
                - targetCpaMicros
                - headlines
                - descriptions
              properties:
                campaignType:
                  type: string
                  enum:
                    - APP
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                groupName:
                  type: string
                  minLength: 1
                  maxLength: 128
                budgetMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                status:
                  type: string
                  enum:
                    - PAUSED
                locations:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^geoTargetConstants/[1-9]\d{0,9}$
                languages:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    pattern: ^languageConstants/[1-9]\d{0,9}$
                appId:
                  type: string
                  minLength: 1
                  maxLength: 255
                appStore:
                  type: string
                  enum:
                    - GOOGLE_APP_STORE
                    - APPLE_APP_STORE
                targetCpaMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                headlines:
                  type: array
                  minItems: 1
                  maxItems: 5
                  items:
                    type: string
                    minLength: 1
                    maxLength: 30
                descriptions:
                  type: array
                  minItems: 1
                  maxItems: 5
                  items:
                    type: string
                    minLength: 1
                    maxLength: 90
            - type: object
              additionalProperties: false
              required:
                - campaignType
                - name
                - groupName
                - budgetMicros
                - status
                - locations
                - languages
                - hotelCenterId
                - cpcBidMicros
              properties:
                campaignType:
                  type: string
                  enum:
                    - HOTEL
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                groupName:
                  type: string
                  minLength: 1
                  maxLength: 128
                budgetMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                status:
                  type: string
                  enum:
                    - PAUSED
                locations:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^geoTargetConstants/[1-9]\d{0,9}$
                languages:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    pattern: ^languageConstants/[1-9]\d{0,9}$
                hotelCenterId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                cpcBidMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
            - type: object
              additionalProperties: false
              required:
                - campaignType
                - name
                - groupName
                - budgetMicros
                - status
                - locations
                - languages
                - travelAccountId
                - targetRoas
              properties:
                campaignType:
                  type: string
                  enum:
                    - TRAVEL
                name:
                  type: string
                  minLength: 1
                  maxLength: 128
                groupName:
                  type: string
                  minLength: 1
                  maxLength: 128
                budgetMicros:
                  type: string
                  pattern: ^[1-9]\d{0,14}$
                status:
                  type: string
                  enum:
                    - PAUSED
                locations:
                  type: array
                  minItems: 1
                  maxItems: 25
                  items:
                    type: string
                    pattern: ^geoTargetConstants/[1-9]\d{0,9}$
                languages:
                  type: array
                  minItems: 1
                  maxItems: 10
                  items:
                    type: string
                    pattern: ^languageConstants/[1-9]\d{0,9}$
                travelAccountId:
                  type: string
                  pattern: ^[1-9]\d{0,19}$
                targetRoas:
                  type: number
                  exclusiveMinimum: 0
                  maximum: 1000
        sourceAuthority:
          type: object
          additionalProperties: false
          required:
            - dataSourceAdAccountId
            - dataSourceConnectorId
          properties:
            dataSourceAdAccountId:
              type: string
              minLength: 1
            dataSourceConnectorId:
              type: string
              minLength: 1
    AdsCreateGoogleCampaignInput_googleCreative:
      type: object
      additionalProperties: false
      required:
        - businessName
        - finalUrl
        - headlines
        - descriptions
        - longHeadline
        - images
      properties:
        businessName:
          type: string
          minLength: 1
          maxLength: 25
        finalUrl:
          type: string
          format: uri
          pattern: ^https?://
          maxLength: 4096
        headlines:
          type: array
          minItems: 3
          maxItems: 5
          items:
            type: string
            minLength: 1
            maxLength: 30
        descriptions:
          type: array
          minItems: 2
          maxItems: 5
          items:
            type: string
            minLength: 1
            maxLength: 90
        longHeadline:
          type: string
          minLength: 1
          maxLength: 90
        images:
          type: array
          minItems: 3
          maxItems: 10
          description: >-
            Include landscape marketing, square marketing and square logo
            images. Bily validates actual bytes, dimensions, placement ratios
            and the combined 8 MB limit.
          items:
            type: object
            additionalProperties: false
            required:
              - role
              - name
              - data
              - mimeType
              - width
              - height
            properties:
              role:
                type: string
                enum:
                  - MARKETING_IMAGE
                  - SQUARE_MARKETING_IMAGE
                  - LOGO
              name:
                type: string
                minLength: 1
                maxLength: 128
              data:
                type: string
                minLength: 8
                maxLength: 5600000
                pattern: ^[A-Za-z0-9+/]+={0,2}$
              mimeType:
                type: string
                enum:
                  - IMAGE_JPEG
                  - IMAGE_PNG
              width:
                type: integer
                minimum: 128
                maximum: 8192
              height:
                type: integer
                minimum: 128
                maximum: 8192
    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.