> ## 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 Google Ads Search campaign

> Atomically create a full Search campaign (budget, campaign, criteria, ad group, RSA, keywords) in one mutate call. Use validateOnly=true to test the payload without applying it.



## OpenAPI

````yaml https://api.sapt.ai/openapi.json post /projects/{projectId}/google-ads/customers/{customerId}/campaigns/search
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: 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 Analytics
  - 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/search:
    post:
      tags:
        - Google Ads
      summary: Create Google Ads Search campaign
      description: >-
        Atomically create a full Search campaign (budget, campaign, criteria, ad
        group, RSA, keywords) in one mutate call. Use validateOnly=true to test
        the payload without applying it.
      operationId: createGoogleAdsSearchCampaign
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: path
        - schema:
            type: string
            minLength: 1
          required: true
          name: customerId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                loginCustomerId:
                  type:
                    - string
                    - 'null'
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                status:
                  type: string
                  enum:
                    - ENABLED
                    - PAUSED
                dailyBudget:
                  type: number
                  exclusiveMinimum: 0
                biddingStrategy:
                  type: string
                  enum:
                    - MAXIMIZE_CONVERSIONS
                    - MAXIMIZE_CLICKS
                    - MANUAL_CPC
                    - TARGET_CPA
                targetCpa:
                  type: number
                  exclusiveMinimum: 0
                locations:
                  type: array
                  items:
                    type: string
                languages:
                  type: array
                  items:
                    type: string
                adGroupName:
                  type: string
                  minLength: 1
                  maxLength: 255
                keywords:
                  type: array
                  items:
                    type: object
                    properties:
                      text:
                        type: string
                        minLength: 1
                      matchType:
                        type: string
                        enum:
                          - BROAD
                          - PHRASE
                          - EXACT
                    required:
                      - text
                      - matchType
                negativeKeywords:
                  type: array
                  items:
                    type: object
                    properties:
                      text:
                        type: string
                        minLength: 1
                      matchType:
                        type: string
                        enum:
                          - BROAD
                          - PHRASE
                          - EXACT
                    required:
                      - text
                      - matchType
                ad:
                  type: object
                  properties:
                    headlines:
                      type: array
                      items:
                        type: string
                      minItems: 3
                      maxItems: 15
                    descriptions:
                      type: array
                      items:
                        type: string
                      minItems: 2
                      maxItems: 4
                    finalUrl:
                      type: string
                      format: uri
                    path1:
                      type: string
                    path2:
                      type: string
                  required:
                    - headlines
                    - descriptions
                    - finalUrl
                startDate:
                  type: string
                  pattern: ^\d{4}-\d{2}-\d{2}$
                endDate:
                  type: string
                  pattern: ^\d{4}-\d{2}-\d{2}$
                exemptPolicyViolationKeys:
                  type: array
                  items:
                    type: object
                    properties:
                      policyName:
                        type: string
                        minLength: 1
                      violatingText:
                        type: string
                        minLength: 1
                    required:
                      - policyName
                ignorablePolicyTopics:
                  type: array
                  items:
                    type: string
                    minLength: 1
                autoExemptPolicyViolations:
                  type: boolean
                validateOnly:
                  type: boolean
              required:
                - name
                - dailyBudget
                - biddingStrategy
                - locations
                - languages
                - adGroupName
                - keywords
                - ad
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaignResourceName:
                    type: string
                  validateOnly:
                    type: boolean
                  appliedPolicyExemptions:
                    type: array
                    items:
                      type: object
                      properties:
                        policyName:
                          type: string
                        violatingText:
                          type: string
                      required:
                        - policyName
                required:
                  - campaignResourceName
                  - 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.

````