---
title: "/campaigns"
method: POST
path: "/projects/{project_id}/campaigns"
tags: ["Campaigns"]
---

# /campaigns

`POST /projects/{project_id}/campaigns`

## Request

- Base URL: `https://api.productbyte.com/v1`
- URL: `https://api.productbyte.com/v1/projects/{project_id}/campaigns`
- Auth: HTTP bearer

Creates a campaign to group posts under.

Make one before planning a batch, then pass its `id` as `campaign_id` on each `POST /posts` — that is what makes a month of posts one thing the customer can see and manage in ProductByte, rather than a pile of unassigned posts.

Requires the `posts:write` scope.

## Path parameters

- `project_id` string, required: The project to create the campaign in.

## Request body

- object
  - `name` string, required: What to call it. Shown to the customer in ProductByte.
  - `start_date` string, date: The day the campaign starts, as `YYYY-MM-DD`. Presentational only.

## Response `201`

The campaign.

- object
  - `id` string, required: Pass this as `campaign_id` when creating a post.
  - `name` string, required: The campaign’s name.
  - `start_date` string, date-time: When the campaign starts, when a start day is set. Normalized to midnight UTC on that day — it is a date the product shows, not a scheduling instruction.
  - `post_count` integer, required: How many posts belong to it.
  - `created_at` string, date-time, required: When the campaign was created.
  - `updated_at` string, date-time, required: When it last changed.

## Other responses

- `401`: Missing, unknown, revoked, or expired key (`API_KEY_UNAUTHORIZED`).
- `403`: The key lacks `posts:write`, or the project is outside its allowlist.
- `429`: Too many requests for this key (`API_RATE_LIMITED`). Back off and retry; `Retry-After` gives the window length.

## Changes

- **2026-10-20** `e44332d6b9c6`: 2 warning
  - removed the request property `brief`
  - removed the optional property `brief` from the response with the `201` status

[Operation history](https://skmtc.dev/productbyte/apis/productbyte-api/changes/projects/:project_id/campaigns/post.md)

---

[API](https://skmtc.dev/productbyte/apis/productbyte-api.md) · [All operations](https://skmtc.dev/productbyte/apis/productbyte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/productbyte/apis/productbyte-api/revisions/e44332d6b9c6?raw)
