Overview
Give one campaign a new name, the same as Rename in the workspace. A new campaign is named "<company>, <Goal>, <Month>" until it is renamed; the name is what the workspace, the emails and campaign_status show. 1 to 80 characters, spaces collapsed. Any live campaign of the brand's can be renamed, paid or not; an archived one is refused (conflict, archived) until it is restored in the workspace. Needs an idempotency_key. Within the key's mandate; recorded as an agent run. Scope: campaigns:write. MCP tool: rename_campaign.
- Endpoint
PATCH https://app.distribution.tech/api/v1/campaigns/{id}- Scope
campaigns:write- Changes data
- Yes, send an Idempotency-Key header
- MCP tool
- rename_campaign
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | |
Idempotency-Key | header | string | Yes | 8 to 128 letters, digits or . _ : -. Retry with the same key and the same request to get the same answer; it never runs twice. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The new name; spaces are collapsed. |
{
"name": "<string>"
}Request with curl
Set DISTRIBUTION_API_KEY to a key from Developers with the campaigns:write scope, and each path variable to an id from an earlier answer. The body carries the required fields.
curl -X PATCH "https://app.distribution.tech/api/v1/campaigns/$CAMPAIGN_ID" \
-H "Authorization: Bearer $DISTRIBUTION_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "<string>"
}'Response
200 OK. The body has these fields:
| Name | Type | Required | Description |
|---|---|---|---|
campaign_id | string (uuid) | Yes | |
name | string | Yes |
{
"campaign_id": "<uuid>",
"name": "<string>"
}Errors
| Status | When |
|---|---|
400 | A parameter is not valid: details.problems names each field and what it accepts. |
401 | No API key, an unknown one, or a revoked one. |
403 | The key lacks the scope, or the mandate refuses (mandate_refused, with the limit and how much over). |
404 | No plan, line or creator of yours has that id. |
409 | conflict (with a reason), idempotency_conflict, or in_progress (Retry-After). |
422 | unprocessable: the body is readable but a value cannot be used (a blank or too long name, a campaign that cannot be planned yet); details.problems names each field when there are several. |
429 | Too many requests for this key in the current minute (60); Retry-After and RateLimit-Reset say when to try again. On POST /campaigns and on POST /plans/current/lines when it starts a plan: the brand's 3 new campaigns in 24 hours are used (details.reason daily_campaign_limit); details.resets_at and Retry-After say when the limit reopens, a rolling 24 hours from the first of them, not a calendar day; archiving or deleting a campaign does not give its slot back. On GET /creators and GET /creators/{id}: a creator read limit is used (details.reason per_minute, daily_lists, daily_reveals, daily_seen or locked). daily_seen is your workspace's one pool of 300 creator views a day (300 different creators shown or opened since midnight UTC), shared by the app and every API key of the brand: details.scope workspace and details.limit 300; a creator already seen today, in the app or through any key, still opens and costs nothing. The other reasons are this key's own limit (details.scope key) or the brand's ceiling over all its keys (details.scope api). |
500 | internal: the request failed on our side. Retry it with the same Idempotency-Key. |
503 | unavailable: writes are not available right now (for an approval: payments are not open yet). |
Related endpoints
GET /campaigns: Your campaigns and where each standsPOST /campaigns: Start a campaignGET /campaigns/{id}: Where one campaign standsDELETE /campaigns/{id}: Delete a draft campaignPOST /campaigns/{id}/archive: Archive a campaignPOST /campaigns/{id}/creator-guidelines: Set the creator guidelines
Get access
Keys are created in Developers once your brand is approved. Connect an agent to ask for access, then read the agent guide for the full flow.