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

# Start RSA generation for all ad groups (3 RSAs each)

> Start RSA generation for all ad groups in a draft.

Company info is auto-resolved from the draft's linked customer.
Creates 3 CampaignDraftRSA records per ad group and kicks off
background tasks for each ad group.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/campaigns/drafts/{draft_id}/rsas/generate-all
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}/rsas/generate-all:
    post:
      tags:
        - Campaigns
      summary: Start RSA generation for all ad groups (3 RSAs each)
      description: |-
        Start RSA generation for all ad groups in a draft.

        Company info is auto-resolved from the draft's linked customer.
        Creates 3 CampaignDraftRSA records per ad group and kicks off
        background tasks for each ad group.
      operationId: >-
        generate_all_rsas_endpoint_api_v1_campaigns_drafts__draft_id__rsas_generate_all_post
      parameters:
        - name: draft_id
          in: path
          required: true
          schema:
            type: integer
            title: Draft Id
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateAllRSAsResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    GenerateAllRSAsResponseSchema:
      properties:
        rsas:
          items:
            $ref: '#/components/schemas/GenerateRSAStartResponseSchema'
          type: array
          title: Rsas
        total_started:
          type: integer
          title: Total Started
      type: object
      required:
        - rsas
        - total_started
      title: GenerateAllRSAsResponseSchema
      description: Response for batch RSA generation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GenerateRSAStartResponseSchema:
      properties:
        rsa_ids:
          items:
            type: integer
          type: array
          title: Rsa Ids
          description: IDs of the 3 created RSA records
        task_id:
          type: string
          title: Task Id
        status:
          $ref: '#/components/schemas/TaskGenerationStatus'
          default: in_progress
      type: object
      required:
        - rsa_ids
        - task_id
      title: GenerateRSAStartResponseSchema
      description: Response when starting RSA generation (3 RSAs per ad group).
    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
    TaskGenerationStatus:
      type: string
      enum:
        - not_started
        - pending
        - in_progress
        - completed
        - failed
      title: TaskGenerationStatus
      description: Status of background task generation (ad groups, RSAs).
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````