Copy templates
Reusable ad copy.
List copy templates
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Pluto-Workspace | string (uuid) | Optional | The workspace to act in, for credentials that can reach several (sessions, agent tokens). API keys belong to one workspace; another value is a 403. |
Response
templates- Templates.
templates[].callToAction- CTA; null keeps the launch's.
templates[].createdAt- Created.
templates[].description- Description.
templates[].headline- Headline.
templates[].id- ID.
templates[].name- Name.
templates[].primaryText- Primary text.
templates[].summary- Summary.
templates[].version- Increments on every change; send as
expectedVersion.
curl "$PLUTO_API/templates" \
-H "Authorization: Bearer $PLUTO_KEY"Create a copy template
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | Optional | The command ID. A retry with the same key returns the stored result; the same key with different input is a 409. Without it a retry cannot be recognized. |
Pluto-Workspace | string (uuid) | Optional | The workspace to act in, for credentials that can reach several (sessions, agent tokens). API keys belong to one workspace; another value is a 403. |
Request body
callToAction- CTA.
description- Description.
headline- Headline.
id- Optional ID.
name- Name.
primaryText- Primary text.
summary- Summary.
Response
callToAction- CTA; null keeps the launch's.
createdAt- Created.
description- Description.
headline- Headline.
id- ID.
name- Name.
primaryText- Primary text.
summary- Summary.
version- Increments on every change; send as
expectedVersion.
Errors
- 400The request is malformed.
- 401No valid credential.
- 403The credential lacks the permission, or belongs to another workspace.
- 409Conflict: a stale
expectedVersion(the body carriescurrent), a duplicate, or an Idempotency-Key reused with different input. - 422Validation failed;
errorslists every field problem at once. - 429Too many requests from this credential. Wait
Retry-Afterseconds. People in the app have their own budget, so an agent swarm can't starve them.
curl -X POST "$PLUTO_API/templates" \
-H "Authorization: Bearer $PLUTO_KEY" \
-H "Idempotency-Key: 7a2b0d7a-2f49-4d6e-9935-009460d67de6" \
-H "Content-Type: application/json" \
-d '{
"callToAction": "SHOP_NOW",
"description": "Two drops every morning for brighter, even skin.",
"headline": "Brighter skin in 14 days",
"id": "a39ffff6-3eab-4880-baee-3e4e46b858d6",
"name": "Fall offer",
"primaryText": "Our Vitamin C Serum brightens dull skin in 14 days. Free shipping on orders over $50.",
"summary": "Spend is up 12% on the week; the UGC 9x16 ad leads on purchases."
}'Update a copy template
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The template's ID. |
Idempotency-Key | string | Optional | The command ID. A retry with the same key returns the stored result; the same key with different input is a 409. Without it a retry cannot be recognized. |
Pluto-Workspace | string (uuid) | Optional | The workspace to act in, for credentials that can reach several (sessions, agent tokens). API keys belong to one workspace; another value is a 403. |
Request body
callToAction- CTA.
description- Description.
expectedVersion- The version you last read. A mismatch is a conflict that returns the current entity.
headline- Headline.
id- Create: optional ID.
name- Name.
primaryText- Primary text.
summary- Summary.
Response
callToAction- CTA; null keeps the launch's.
createdAt- Created.
description- Description.
headline- Headline.
id- ID.
name- Name.
primaryText- Primary text.
summary- Summary.
version- Increments on every change; send as
expectedVersion.
Errors
- 400The request is malformed.
- 401No valid credential.
- 403The credential lacks the permission, or belongs to another workspace.
- 404Not found in this workspace.
- 409Conflict: a stale
expectedVersion(the body carriescurrent), a duplicate, or an Idempotency-Key reused with different input. - 422Validation failed;
errorslists every field problem at once. - 429Too many requests from this credential. Wait
Retry-Afterseconds. People in the app have their own budget, so an agent swarm can't starve them.
curl -X PATCH "$PLUTO_API/templates/a39ffff6-3eab-4880-baee-3e4e46b858d6" \
-H "Authorization: Bearer $PLUTO_KEY" \
-H "Idempotency-Key: 81ddd2ac-f77b-4139-8d11-86edaba57772" \
-H "Content-Type: application/json" \
-d '{
"callToAction": "SHOP_NOW",
"description": "Two drops every morning for brighter, even skin.",
"expectedVersion": 3,
"headline": "Brighter skin in 14 days",
"id": "a39ffff6-3eab-4880-baee-3e4e46b858d6",
"name": "Fall offer",
"primaryText": "Our Vitamin C Serum brightens dull skin in 14 days. Free shipping on orders over $50.",
"summary": "Spend is up 12% on the week; the UGC 9x16 ad leads on purchases."
}'Delete a copy template
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | The template's ID. |
Idempotency-Key | string | Optional | The command ID. A retry with the same key returns the stored result; the same key with different input is a 409. Without it a retry cannot be recognized. |
Pluto-Workspace | string (uuid) | Optional | The workspace to act in, for credentials that can reach several (sessions, agent tokens). API keys belong to one workspace; another value is a 403. |
Response
Done; no content.
Errors
- 400The request is malformed.
- 401No valid credential.
- 403The credential lacks the permission, or belongs to another workspace.
- 404Not found in this workspace.
- 409Conflict: a stale
expectedVersion(the body carriescurrent), a duplicate, or an Idempotency-Key reused with different input. - 422Validation failed;
errorslists every field problem at once. - 429Too many requests from this credential. Wait
Retry-Afterseconds. People in the app have their own budget, so an agent swarm can't starve them.
curl -X DELETE "$PLUTO_API/templates/a39ffff6-3eab-4880-baee-3e4e46b858d6" \
-H "Authorization: Bearer $PLUTO_KEY" \
-H "Idempotency-Key: 8b374f0b-7ae5-4153-aa4a-2c2e9e2847e4"