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

# Publish a built campaign to Meta. Spends 20 AI credits and, once active, real ad budget. Two-step: the first call returns the preview and a confirmationToken; after the user explicitly approves, call again with the token. status "paused" (default) publishes everything paused for a final look in Ads Manager; "active" starts delivery immediately. Requires get_campaign_build to report preview_ready.

> Publish a built campaign to Meta. Spends 20 AI credits and, once active, real ad budget. Two-step: the first call returns the preview and a confirmationToken; after the user explicitly approves, call again with the token. status "paused" (default) publishes everything paused for a final look in Ads Manager; "active" starts delivery immediately. Requires get_campaign_build to report preview_ready.



## OpenAPI

````yaml /openapi.json post /tools/launch_campaign
openapi: 3.1.0
info:
  title: AdStellar API
  version: 1.0.0
  description: >-
    Public REST API for AdStellar — creative generation, video generation,
    campaign management, and analytics. Every endpoint maps 1:1 to an AdStellar
    MCP tool.
servers:
  - url: https://app.adstellar.ai/api/v1
security: []
paths:
  /tools/launch_campaign:
    post:
      summary: >-
        Publish a built campaign to Meta. Spends 20 AI credits and, once active,
        real ad budget. Two-step: the first call returns the preview and a
        confirmationToken; after the user explicitly approves, call again with
        the token. status "paused" (default) publishes everything paused for a
        final look in Ads Manager; "active" starts delivery immediately.
        Requires get_campaign_build to report preview_ready.
      description: >-
        Publish a built campaign to Meta. Spends 20 AI credits and, once active,
        real ad budget. Two-step: the first call returns the preview and a
        confirmationToken; after the user explicitly approves, call again with
        the token. status "paused" (default) publishes everything paused for a
        final look in Ads Manager; "active" starts delivery immediately.
        Requires get_campaign_build to report preview_ready.
      operationId: launch_campaign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                jobId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  description: jobId from build_campaign, in phase preview_ready.
                status:
                  description: Publish paused (default) or start delivering immediately.
                  type: string
                  enum:
                    - paused
                    - active
                leadFormId:
                  description: >-
                    Leads with INSTANT_FORMS built without a form: the Instant
                    Form id from list_lead_forms. Must be a form on the
                    campaign's Page with a privacy policy link.
                  type: string
                  pattern: ^\d{5,25}$
                confirmationToken:
                  description: >-
                    Omit on the first call to get a preview + token; pass the
                    token back to execute.
                  type: string
                workspaceId:
                  description: >-
                    Workspace to act in (must be granted to this credential).
                    Omit for the primary workspace.
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              required:
                - jobId
              additionalProperties: false
      responses:
        '200':
          description: Tool result
        '401':
          description: Missing or invalid API key
        '403':
          description: Missing required scope
        '429':
          description: Rate limit exceeded
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: AdStellar API key (ast_live_...)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.