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

# Get generation status for a draft

> Get the generation status for ad groups and RSAs in a draft.
Useful for polling during async operations.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json get /api/v1/campaigns/drafts/{draft_id}/generation-status
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}/generation-status:
    get:
      tags:
        - Campaigns
      summary: Get generation status for a draft
      description: |-
        Get the generation status for ad groups and RSAs in a draft.
        Useful for polling during async operations.
      operationId: >-
        get_draft_generation_status_api_v1_campaigns_drafts__draft_id__generation_status_get
      parameters:
        - name: draft_id
          in: path
          required: true
          schema:
            type: integer
            title: Draft Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DraftGenerationStatusSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    DraftGenerationStatusSchema:
      properties:
        ad_groups:
          $ref: '#/components/schemas/AdGroupsGenerationStatusSchema'
        rsas:
          items:
            $ref: '#/components/schemas/RSAGenerationStatusSchema'
          type: array
          title: Rsas
        extensions:
          $ref: '#/components/schemas/AdGroupsGenerationStatusSchema'
        all_complete:
          type: boolean
          title: All Complete
      type: object
      required:
        - ad_groups
        - rsas
        - extensions
        - all_complete
      title: DraftGenerationStatusSchema
      description: Combined generation status for a draft.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AdGroupsGenerationStatusSchema:
      properties:
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
        status:
          $ref: '#/components/schemas/TaskGenerationStatus'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - task_id
        - status
      title: AdGroupsGenerationStatusSchema
      description: Status of ad group generation task.
    RSAGenerationStatusSchema:
      properties:
        rsa_id:
          type: integer
          title: Rsa Id
        ad_group_id:
          type: integer
          title: Ad Group Id
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
        status:
          $ref: '#/components/schemas/TaskGenerationStatus'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - rsa_id
        - ad_group_id
        - task_id
        - status
      title: RSAGenerationStatusSchema
      description: Status of a single RSA generation.
    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

````