---
updatedAt: 2026-08-24T09:14:57.000Z
agentTools:
  projectIndex: https://developers.vibe.co/llms.txt
---

# Publish a campaign

**Scopes:**
`campaigns:publish`
<br>*Rate limits*:<br>Burst: `2/s`<br>Steady: `30/m`


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/campaigns/{campaign_id}/publish": {
      "post": {
        "operationId": "publishCampaign",
        "parameters": [
          {
            "name": "campaign_id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "account_id",
            "required": false,
            "in": "query",
            "description": "Required only for embedded apps.",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign published",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Campaign"
                }
              }
            }
          },
          "400": {
            "description": "Bad request error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "missingApiKey": {
                    "summary": "Missing API key",
                    "value": {
                      "error": {
                        "type": "validation",
                        "message": "Missing API Key",
                        "status": 400,
                        "detail": null,
                        "request_id": "req_8f3a4b2c",
                        "doc_url": null
                      }
                    }
                  },
                  "validationError": {
                    "summary": "Validation error",
                    "value": {
                      "error": {
                        "type": "validation",
                        "message": "Validation error",
                        "status": 400,
                        "detail": {
                          "validation": [
                            "id must be a string"
                          ]
                        },
                        "request_id": "req_8f3a4b2c",
                        "doc_url": null
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalidApiKey": {
                    "summary": "Invalid API key",
                    "value": {
                      "error": {
                        "type": "invalid_token",
                        "message": "Unauthorized",
                        "status": 401,
                        "detail": null,
                        "request_id": "req_8f3a4b2c",
                        "doc_url": "https://developers.vibe.co/errors/invalid-token"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Insufficient scope error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "insufficientScope": {
                    "summary": "Missing required scope",
                    "value": {
                      "error": {
                        "type": "insufficient_scope",
                        "message": "Missing required scope",
                        "status": 403,
                        "detail": {
                          "required": "campaigns:publish",
                          "granted": [
                            "test"
                          ]
                        },
                        "request_id": "req_8f3a4b2c",
                        "doc_url": "https://developers.vibe.co/reference/oauth2token"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Campaign not found"
          },
          "422": {
            "description": "Validation failed (includes invalid state transitions)"
          }
        },
        "summary": "Publish a campaign",
        "tags": [
          "Campaigns"
        ],
        "x-rate-limit": {
          "rps": 2,
          "rpm": 30
        },
        "x-scopes": [
          "campaigns:publish"
        ],
        "description": "**Scopes:**\n`campaigns:publish`\n<br>*Rate limits*:<br>Burst: `2/s`<br>Steady: `30/m`\n"
      }
    }
  },
  "info": {
    "title": "Vibe Public API",
    "description": "Vibe Public API revision 2026-06-01",
    "version": "2026-06-01",
    "contact": {}
  },
  "tags": [
    {
      "name": "Campaigns",
      "description": "A Campaign is a goal-oriented container for one or more Strategies. Campaigns carry the optimization goal, attribution window, and lifecycle state. Strategies under a campaign carry the budget, schedule, targeting, and creative associations.\n\nCampaigns are created in `DRAFT` status and published either with the publish endpoint or the `PUBLISH` lifecycle action. Once published, the `PAUSE` and `ACTIVATE` actions toggle delivery.\n\n> ⚠️ **Gotcha — campaigns are mostly immutable after publish**\n>\n> While in `DRAFT`, you can update `name`, `goal`, `attribution_window`, and `optimization_goal`. After `PUBLISH`, only `active` is mutable, and only a `DRAFT` campaign can be deleted. To change anything else, create a new campaign — the original can only be paused while it is still running, since `PAUSE` is rejected once it has passed its end date."
    }
  ],
  "servers": [
    {
      "url": "https://api.vibe.co",
      "description": "Production API"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "required": {
            "type": "string",
            "example": "audiences:write"
          },
          "granted": {
            "example": [
              "audiences:read",
              "reporting:read"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "required",
          "granted"
        ]
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "insufficient_scope",
              "invalid_token",
              "validation",
              "internal_error"
            ]
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "number",
            "example": 403
          },
          "detail": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ErrorDetail"
              }
            ]
          },
          "request_id": {
            "type": "string",
            "example": "req_8f3a4b2c"
          },
          "doc_url": {
            "type": "string",
            "example": "https://developers.vibe.co/reference/oauth2token",
            "nullable": true
          }
        },
        "required": [
          "type",
          "message",
          "status",
          "request_id"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ApiError"
          }
        },
        "required": [
          "error"
        ]
      },
      "CampaignGoal": {
        "type": "string",
        "enum": [
          "AWARENESS",
          "INSTALL",
          "TRAFFIC",
          "RETARGETING",
          "SALES",
          "LEADS",
          "ABM"
        ]
      },
      "OptimizationGoalType": {
        "type": "string",
        "enum": [
          "COST_PER_SESSION",
          "COST_PER_LEAD",
          "COST_PER_CALL",
          "COST_PER_PURCHASE",
          "ROAS",
          "CPM",
          "COST_PER_INSTALL",
          "COST_PER_UNIQUE_HOUSEHOLD",
          "COST_PER_UNIQUE_COMPANY"
        ]
      },
      "OptimizationGoal": {
        "type": "object",
        "properties": {
          "type": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/OptimizationGoalType"
              }
            ]
          },
          "value": {
            "type": "number",
            "nullable": true,
            "description": "Target value in USD"
          }
        },
        "required": [
          "type",
          "value"
        ]
      },
      "Campaign": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "advertiser_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "goal": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignGoal"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "DRAFT",
              "PUBLISHED",
              "ARCHIVED",
              "DELETED"
            ]
          },
          "state": {
            "type": "string",
            "nullable": true,
            "enum": [
              "ARCHIVED",
              "BLOCKED",
              "COMPLETED",
              "DELIVERING",
              "INACTIVE",
              "PAUSED",
              "PAYMENT_ISSUE",
              "PENDING_REVIEW",
              "UPCOMING"
            ]
          },
          "active": {
            "type": "boolean"
          },
          "attribution_window_in_hours": {
            "type": "number",
            "description": "Attribution window expressed in hours",
            "example": 720
          },
          "optimization_goal": {
            "$ref": "#/components/schemas/OptimizationGoal"
          },
          "start_date": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Derived from strategies"
          },
          "end_date": {
            "type": "string",
            "nullable": true,
            "format": "date-time",
            "description": "Derived from strategies"
          },
          "budget": {
            "type": "number",
            "nullable": true,
            "description": "Derived from strategies, in USD"
          },
          "publication_date": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "advertiser_id",
          "name",
          "goal",
          "status",
          "state",
          "active",
          "attribution_window_in_hours",
          "optimization_goal",
          "start_date",
          "end_date",
          "budget",
          "publication_date",
          "created_at",
          "updated_at"
        ]
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ]
}
```