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

# Promote an existing Page post: creates the campaign, ad set and ad in one call (Meta only)



## OpenAPI

````yaml /api-reference/openapi.json post /v1/ads/{accountId}/boost
openapi: 3.0.0
info:
  title: PlugKit API
  description: >-
    One API to publish, schedule and message across Instagram, Facebook,
    Threads, WhatsApp, TikTok, Telegram, YouTube, X, LinkedIn and Bluesky — and
    to run Meta and Google ads.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.plugkit.co
security: []
tags: []
paths:
  /v1/ads/{accountId}/boost:
    post:
      tags:
        - ads
      summary: >-
        Promote an existing Page post: creates the campaign, ad set and ad in
        one call (Meta only)
      operationId: AdsController_boostPost
      parameters:
        - name: accountId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BoostPostDto'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaign:
                    $ref: '#/components/schemas/AdCampaign'
                  adSet:
                    $ref: '#/components/schemas/AdSet'
                  ad:
                    $ref: '#/components/schemas/Ad'
                required:
                  - campaign
                  - adSet
                  - ad
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          $ref: '#/components/responses/PlatformError'
      security:
        - api-key: []
components:
  schemas:
    BoostPostDto:
      type: object
      properties:
        postId:
          type: string
          description: Page post to promote, as `{page-id}_{post-id}`.
          example: 123456789_987654321
        dailyBudget:
          type: number
          description: Daily budget in minor units of the account currency (2000 = €20.00).
          example: 2000
        days:
          type: number
          description: Run duration in days (default 7).
        countries:
          example:
            - FR
            - BE
          type: array
          items:
            type: string
        ageMin:
          type: number
          example: 18
        ageMax:
          type: number
          example: 65
        name:
          type: string
        status:
          type: string
          enum:
            - ACTIVE
            - PAUSED
          description: 'PAUSED by default: nothing spends without an explicit go.'
      required:
        - postId
        - dailyBudget
    AdCampaign:
      type: object
      description: >-
        Platform-native object (Meta Graph fields for `meta_ads`, a mapped
        subset for `google_ads`), snake_case. Budgets are in minor units of the
        account currency. Fields not listed may be present.
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
          example: PAUSED
        objective:
          type: string
          description: Meta.
        daily_budget:
          description: Minor units (string on Meta, number on Google).
        lifetime_budget:
          description: Minor units. Meta.
        bid_strategy:
          type: string
      required:
        - id
      additionalProperties: true
    AdSet:
      type: object
      description: >-
        Platform-native object (Meta Graph fields for `meta_ads`, a mapped
        subset for `google_ads`), snake_case. Budgets are in minor units of the
        account currency. Fields not listed may be present. On Google Ads, an ad
        set is an ad group.
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        campaign_id:
          type: string
        daily_budget:
          description: Minor units. Meta.
        targeting:
          type: object
          additionalProperties: true
          description: Meta targeting spec.
      required:
        - id
      additionalProperties: true
    Ad:
      type: object
      description: >-
        Platform-native object (Meta Graph fields for `meta_ads`, a mapped
        subset for `google_ads`), snake_case. Budgets are in minor units of the
        account currency. Fields not listed may be present.
      properties:
        id:
          type: string
          description: 'Google Ads: `{adGroupId}~{adId}`.'
        name:
          type: string
          nullable: true
        status:
          type: string
        adset_id:
          type: string
        campaign_id:
          type: string
      required:
        - id
      additionalProperties: true
    Error:
      type: object
      description: >-
        Every error response has this shape. The request id is returned in the
        `x-request-id` header, not in the body.
      properties:
        error:
          type: string
          description: >-
            Human-readable message (English). Informative only: branch on `type`
            and `code`.
          example: scheduledFor must be a future date.
        type:
          type: string
          description: Error class, for programmatic branching.
          example: invalid_request_error
          enum:
            - invalid_request_error
            - authentication_error
            - permission_error
            - not_found
            - rate_limit_error
            - platform_error
            - billing_error
            - api_error
        code:
          type: string
          description: >-
            Stable machine code for the precise case (e.g. `validation_failed`,
            `post_not_found`, `rate_limited`, `subscription_required`).
          example: scheduled_in_past
        param:
          type: string
          description: Request field at fault, when there is one.
          example: scheduledFor
        platform:
          type: string
          description: >-
            Upstream platform (meta, tiktok, x…) when `type` is
            `platform_error`.
          example: meta
        platformError:
          type: object
          additionalProperties: true
          description: Raw error payload from the platform, passed through verbatim.
        details:
          type: object
          additionalProperties: true
          description: >-
            Extra structured context. Validation errors carry `details.fields`
            (one message per invalid field); billing errors carry
            `details.action_url`; rate limits carry `details.retryAfter`.
      required:
        - error
        - type
        - code
  responses:
    BadRequest:
      description: >-
        Invalid request. `code` is `validation_failed` for body/query validation
        (one message per field in `details.fields`), or a specific code
        (`invalid_reference`, `unsupported_for_platform`…).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 2 validation errors on the request.
            type: invalid_request_error
            code: validation_failed
            details:
              fields:
                - content should not be empty
                - accountIds must be an array
    Unauthorized:
      description: Missing, invalid or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key.
            type: authentication_error
            code: unauthorized
    NotFound:
      description: The resource does not exist, or does not belong to the caller.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: No post found with id 'cm3post000001'.
            type: not_found
            code: post_not_found
            details:
              id: cm3post000001
    RateLimited:
      description: >-
        Too many requests (PlugKit per-minute quota, or the shared platform
        quota nearly exhausted). Wait `retry-after` seconds.
      headers:
        retry-after:
          description: Seconds to wait before retrying.
          schema:
            type: integer
        x-ratelimit-limit:
          description: Requests allowed per minute in this bucket.
          schema:
            type: integer
        x-ratelimit-remaining:
          schema:
            type: integer
        x-ratelimit-reset:
          description: Unix time (seconds) when the window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Rate limit exceeded: 60 write requests per minute. Retry in 12s.'
            type: rate_limit_error
            code: rate_limited
            details:
              limit: 60
              bucket: write
              retryAfter: 12
    PlatformError:
      description: >-
        The upstream platform refused the call. Its raw payload is in
        `platformError`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid OAuth access token.
            type: platform_error
            code: platform_request_failed
            platform: meta
            platformError:
              code: 190
              message: Invalid OAuth access token.
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: sk_...
      type: http

````

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