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

# Bulk-patch RSAs (step 3)

> Bulk partial update of Responsive Search Ads on a draft.

Each item identifies the RSA by `id`. Only provided fields are updated.
RSA content is validated against Google Ads policies before saving.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json patch /api/v1/campaigns/drafts/{draft_id}/ads
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/campaigns/drafts/{draft_id}/ads:
    patch:
      tags:
        - Campaigns
      summary: Bulk-patch RSAs (step 3)
      description: |-
        Bulk partial update of Responsive Search Ads on a draft.

        Each item identifies the RSA by `id`. Only provided fields are updated.
        RSA content is validated against Google Ads policies before saving.
      operationId: patch_ads_api_v1_campaigns_drafts__draft_id__ads_patch
      parameters:
        - name: draft_id
          in: path
          required: true
          schema:
            type: integer
            title: Draft Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchAdsRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DraftStepResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    PatchAdsRequestSchema:
      properties:
        responsive_search_ads:
          items:
            $ref: '#/components/schemas/PatchRSAItemSchema'
          type: array
          title: Responsive Search Ads
      type: object
      required:
        - responsive_search_ads
      title: PatchAdsRequestSchema
      description: Request schema for PATCH /drafts/{id}/ads.
    DraftStepResponseSchema:
      properties:
        draft:
          $ref: '#/components/schemas/CampaignDraftSchema'
        warnings:
          items:
            $ref: '#/components/schemas/ValidationErrorSchema'
          type: array
          title: Warnings
      type: object
      required:
        - draft
      title: DraftStepResponseSchema
      description: >-
        Shared response for all 4 step PATCH endpoints.


        Returns the full refreshed draft plus any validation warnings for that
        step.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PatchRSAItemSchema:
      properties:
        headlines:
          anyOf:
            - items:
                $ref: '#/components/schemas/GeneratedHeadlineSchema'
              type: array
            - type: 'null'
          title: Headlines
        descriptions:
          anyOf:
            - items:
                $ref: '#/components/schemas/GeneratedDescriptionSchema'
              type: array
            - type: 'null'
          title: Descriptions
        final_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Url
        final_mobile_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Mobile Url
        display_path_1:
          anyOf:
            - type: string
              maxLength: 15
            - type: 'null'
          title: Display Path 1
        display_path_2:
          anyOf:
            - type: string
              maxLength: 15
            - type: 'null'
          title: Display Path 2
        tracking_url_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Url Template
        id:
          type: integer
          title: Id
      type: object
      required:
        - id
      title: PatchRSAItemSchema
      description: Single RSA patch within PATCH /drafts/{id}/ads.
    CampaignDraftSchema:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        google_ads_customer_id:
          type: integer
          title: Google Ads Customer Id
        market_analysis_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Market Analysis Id
        campaign_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Name
        website_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Website Url
        daily_budget_micros:
          anyOf:
            - type: integer
            - type: 'null'
          title: Daily Budget Micros
        bidding_strategy:
          anyOf:
            - $ref: '#/components/schemas/BiddingStrategySchema'
            - type: 'null'
        default_match_type:
          $ref: '#/components/schemas/KeywordMatchTypes'
          default: PHRASE
        language_ids:
          items:
            type: integer
          type: array
          title: Language Ids
        location_targets:
          items:
            $ref: '#/components/schemas/LocationTargetSchema'
          type: array
          title: Location Targets
        network_settings:
          anyOf:
            - $ref: '#/components/schemas/NetworkSettingsSchema'
            - type: 'null'
        ad_schedule:
          anyOf:
            - $ref: >-
                #/components/schemas/api__campaigns__schemas__AdScheduleSchema-Output
            - type: 'null'
        start_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Start Date
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
        conversion_goals:
          items:
            $ref: '#/components/schemas/ConversionGoalSchema'
          type: array
          title: Conversion Goals
        extensions:
          anyOf:
            - $ref: '#/components/schemas/ExtensionsInputSchema-Output'
            - type: 'null'
        ad_groups_task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Ad Groups Task Id
        ad_groups_generation_status:
          $ref: '#/components/schemas/TaskGenerationStatus'
          default: completed
        ad_groups_generation_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Ad Groups Generation Error
        extensions_task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Extensions Task Id
        extensions_generation_status:
          $ref: '#/components/schemas/TaskGenerationStatus'
          default: not_started
        extensions_generation_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Extensions Generation Error
        is_published:
          type: boolean
          title: Is Published
          default: false
        published_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Published At
        published_campaign_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Published Campaign Id
        all_rsas_generated:
          type: boolean
          title: All Rsas Generated
          default: false
        ad_groups:
          items:
            $ref: '#/components/schemas/CampaignDraftAdGroupSchema'
          type: array
          title: Ad Groups
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
      type: object
      required:
        - id
        - name
        - google_ads_customer_id
        - date_added
        - date_updated
      title: CampaignDraftSchema
      description: Campaign draft schema - full representation.
    ValidationErrorSchema:
      properties:
        field:
          type: string
          title: Field
          description: JSON path to the field
        code:
          type: string
          title: Code
          description: Error code
        message:
          type: string
          title: Message
          description: Human-readable message
      type: object
      required:
        - field
        - code
        - message
      title: ValidationErrorSchema
      description: Validation error details.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    GeneratedHeadlineSchema:
      properties:
        text:
          type: string
          maxLength: 30
          title: Text
          description: Headline text (max 30 chars)
        pinned_field:
          anyOf:
            - $ref: '#/components/schemas/PinnedField'
            - type: 'null'
          description: Optional pinning position
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Gemini's reasoning for this headline
      type: object
      required:
        - text
      title: GeneratedHeadlineSchema
      description: A generated headline for RSA.
    GeneratedDescriptionSchema:
      properties:
        text:
          type: string
          maxLength: 90
          title: Text
          description: Description text (max 90 chars)
        pinned_field:
          anyOf:
            - $ref: '#/components/schemas/PinnedField'
            - type: 'null'
          description: Optional pinning position
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: Gemini's reasoning for this description
      type: object
      required:
        - text
      title: GeneratedDescriptionSchema
      description: A generated description for RSA.
    BiddingStrategySchema:
      properties:
        type:
          $ref: '#/components/schemas/BiddingStrategyType'
        target_cpa_micros:
          anyOf:
            - type: integer
              ge: 0
              le: 50000000000
            - type: 'null'
          title: Target Cpa Micros
          description: Required if type is TARGET_CPA
        target_roas:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Target Roas
          description: Required if type is TARGET_ROAS (e.g., 2.0 = 200%)
        max_cpc_bid_ceiling_micros:
          anyOf:
            - type: integer
              ge: 0
              le: 50000000000
            - type: 'null'
          title: Max Cpc Bid Ceiling Micros
          description: Optional ceiling for automated strategies
      type: object
      required:
        - type
      title: BiddingStrategySchema
      description: Bidding strategy configuration.
    KeywordMatchTypes:
      type: string
      enum:
        - EXACT
        - PHRASE
        - BROAD
        - BROAD_MODIFIER
        - NEGATIVE
      title: KeywordMatchTypes
      description: The keyword match types.
    LocationTargetSchema:
      properties:
        geo_target_constant_id:
          type: integer
          exclusiveMinimum: 0
          title: Geo Target Constant Id
          description: Google Ads geo target constant ID
        target_type:
          $ref: >-
            #/components/schemas/api__google_ads_management__schemas__LocationTargetType
          default: INCLUDE
      type: object
      required:
        - geo_target_constant_id
      title: LocationTargetSchema
      description: Location targeting configuration.
    NetworkSettingsSchema:
      properties:
        target_google_search:
          type: boolean
          title: Target Google Search
          description: Target Google Search
          default: true
        target_search_network:
          type: boolean
          title: Target Search Network
          description: Target Search partners
          default: false
        target_content_network:
          type: boolean
          title: Target Content Network
          description: Target Display Network
          default: false
      type: object
      title: NetworkSettingsSchema
      description: Network settings for campaign.
    api__campaigns__schemas__AdScheduleSchema-Output:
      properties:
        mode:
          type: string
          enum:
            - ALL_TIME
            - CUSTOM
          title: Mode
        schedule_entries:
          anyOf:
            - items:
                $ref: '#/components/schemas/ScheduleEntrySchema'
              type: array
            - type: 'null'
          title: Schedule Entries
          description: Required if mode is CUSTOM
      type: object
      required:
        - mode
      title: AdScheduleSchema
      description: Ad schedule configuration.
    ConversionGoalSchema:
      properties:
        conversion_action_id:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Conversion Action Id
          description: Google Ads conversion action ID
        goal_type:
          type: string
          enum:
            - CAMPAIGN_SPECIFIC
            - ACCOUNT_DEFAULT
          title: Goal Type
        category:
          anyOf:
            - $ref: '#/components/schemas/ConversionCategory'
            - type: 'null'
      type: object
      required:
        - goal_type
      title: ConversionGoalSchema
      description: Conversion goal configuration.
    ExtensionsInputSchema-Output:
      properties:
        sitelinks:
          anyOf:
            - items:
                $ref: '#/components/schemas/SitelinkInputSchema'
              type: array
              maxItems: 20
            - type: 'null'
          title: Sitelinks
        callouts:
          anyOf:
            - items:
                $ref: '#/components/schemas/CalloutInputSchema'
              type: array
              maxItems: 20
            - type: 'null'
          title: Callouts
        phone:
          anyOf:
            - $ref: '#/components/schemas/PhoneInputSchema'
            - type: 'null'
        structured_snippets:
          anyOf:
            - items:
                $ref: '#/components/schemas/StructuredSnippetInputSchema'
              type: array
            - type: 'null'
          title: Structured Snippets
      additionalProperties: false
      type: object
      title: ExtensionsInputSchema
      description: All extensions configuration.
    TaskGenerationStatus:
      type: string
      enum:
        - not_started
        - pending
        - in_progress
        - completed
        - failed
      title: TaskGenerationStatus
      description: Status of background task generation (ad groups, RSAs).
    CampaignDraftAdGroupSchema:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        cpc_bid_micros:
          anyOf:
            - type: integer
              maximum: 50000000000
              minimum: 0
            - type: 'null'
          title: Cpc Bid Micros
        keywords:
          items:
            $ref: '#/components/schemas/CampaignDraftKeywordSchema'
          type: array
          title: Keywords
        rsas:
          items:
            $ref: '#/components/schemas/CampaignDraftRSASchema'
          type: array
          title: Rsas
      type: object
      required:
        - id
        - name
      title: CampaignDraftAdGroupSchema
      description: Ad group within a campaign draft.
    PinnedField:
      type: string
      enum:
        - HEADLINE_1
        - HEADLINE_2
        - HEADLINE_3
        - DESCRIPTION_1
        - DESCRIPTION_2
      title: PinnedField
      description: Pinned position fields for RSA assets.
    BiddingStrategyType:
      type: string
      enum:
        - MAXIMIZE_CONVERSIONS
        - MAXIMIZE_CONVERSION_VALUE
        - MAXIMIZE_CLICKS
        - TARGET_CPA
        - TARGET_ROAS
        - TARGET_IMPRESSION_SHARE
        - MANUAL_CPC
      title: BiddingStrategyType
      description: Supported bidding strategy types.
    api__google_ads_management__schemas__LocationTargetType:
      type: string
      enum:
        - INCLUDE
        - EXCLUDE
      title: LocationTargetType
      description: Location targeting type.
    ScheduleEntrySchema:
      properties:
        day_of_week:
          $ref: '#/components/schemas/DayOfWeek'
        start_hour:
          type: integer
          maximum: 23
          minimum: 0
          title: Start Hour
        start_minute:
          type: integer
          enum:
            - 0
            - 15
            - 30
            - 45
          title: Start Minute
          default: 0
        end_hour:
          type: integer
          maximum: 24
          minimum: 0
          title: End Hour
          description: 24 = midnight end
        end_minute:
          type: integer
          enum:
            - 0
            - 15
            - 30
            - 45
          title: End Minute
          default: 0
      type: object
      required:
        - day_of_week
        - start_hour
        - end_hour
      title: ScheduleEntrySchema
      description: Single schedule entry for ad scheduling.
    ConversionCategory:
      type: string
      enum:
        - PURCHASE
        - SIGNUP
        - LEAD
        - PAGE_VIEW
        - DOWNLOAD
        - ADD_TO_CART
        - BEGIN_CHECKOUT
        - CONTACT
        - SUBMIT_LEAD_FORM
        - BOOK_APPOINTMENT
        - REQUEST_QUOTE
        - GET_DIRECTIONS
        - OUTBOUND_CLICK
        - OTHER
      title: ConversionCategory
      description: Conversion action categories.
    SitelinkInputSchema:
      properties:
        link_text:
          type: string
          maxLength: 25
          title: Link Text
        final_url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Final Url
        description_1:
          anyOf:
            - type: string
              maxLength: 35
            - type: 'null'
          title: Description 1
        description_2:
          anyOf:
            - type: string
              maxLength: 35
            - type: 'null'
          title: Description 2
        final_mobile_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Mobile Url
      additionalProperties: false
      type: object
      required:
        - link_text
        - final_url
      title: SitelinkInputSchema
      description: Sitelink extension input.
    CalloutInputSchema:
      properties:
        callout_text:
          type: string
          maxLength: 25
          title: Callout Text
      additionalProperties: false
      type: object
      required:
        - callout_text
      title: CalloutInputSchema
      description: Callout extension input.
    PhoneInputSchema:
      properties:
        phone_number:
          type: string
          title: Phone Number
          description: E.164 format preferred
        country_code:
          type: string
          pattern: ^[A-Z]{2}$
          title: Country Code
          description: ISO 3166-1 alpha-2, e.g., 'US'
      additionalProperties: false
      type: object
      required:
        - phone_number
        - country_code
      title: PhoneInputSchema
      description: Phone extension input.
    StructuredSnippetInputSchema:
      properties:
        header:
          $ref: '#/components/schemas/StructuredSnippetHeader'
        values:
          items:
            type: string
            maxLength: 25
            minLength: 1
          type: array
          maxItems: 10
          minItems: 3
          title: Values
      additionalProperties: false
      type: object
      required:
        - header
        - values
      title: StructuredSnippetInputSchema
      description: Structured snippet extension input.
    CampaignDraftKeywordSchema:
      properties:
        id:
          type: integer
          title: Id
        text:
          type: string
          title: Text
        match_type:
          $ref: '#/components/schemas/KeywordMatchTypes'
        cpc_bid_micros:
          anyOf:
            - type: integer
              maximum: 50000000000
              minimum: 0
            - type: 'null'
          title: Cpc Bid Micros
        final_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Url
        source_market_analysis_keyword_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Source Market Analysis Keyword Id
      type: object
      required:
        - id
        - text
        - match_type
      title: CampaignDraftKeywordSchema
      description: Keyword within a draft ad group.
    CampaignDraftRSASchema:
      properties:
        id:
          type: integer
          title: Id
        ad_group_id:
          type: integer
          title: Ad Group Id
        headlines:
          items:
            $ref: '#/components/schemas/GeneratedHeadlineSchema'
          type: array
          title: Headlines
        descriptions:
          items:
            $ref: '#/components/schemas/GeneratedDescriptionSchema'
          type: array
          title: Descriptions
        final_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Url
        final_mobile_url:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Final Mobile Url
        display_path_1:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Path 1
        display_path_2:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Path 2
        tracking_url_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Tracking Url Template
        generation_status:
          $ref: '#/components/schemas/TaskGenerationStatus'
          default: pending
        generation_task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Generation Task Id
        generation_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Generation Error
      type: object
      required:
        - id
        - ad_group_id
      title: CampaignDraftRSASchema
      description: RSA within a campaign draft ad group.
    DayOfWeek:
      type: string
      enum:
        - MONDAY
        - TUESDAY
        - WEDNESDAY
        - THURSDAY
        - FRIDAY
        - SATURDAY
        - SUNDAY
      title: DayOfWeek
      description: Days of the week for ad scheduling.
    StructuredSnippetHeader:
      type: string
      enum:
        - AMENITIES
        - BRANDS
        - COURSES
        - DEGREE_PROGRAMS
        - DESTINATIONS
        - FEATURED_HOTELS
        - INSURANCE_COVERAGE
        - MODELS
        - NEIGHBORHOODS
        - SERVICE_CATALOG
        - SHOWS
        - STYLES
        - TYPES
      title: StructuredSnippetHeader
      description: Structured snippet header types.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````