Skip to main content
POST
Copy a template across projects

Authorizations

Authorization
string
header
required

Account API key (ck_acct_…) presented as a bearer token. Distinct credential system from bearerApiKey — validated against a separate table, never against project keys or vice versa. Scoped to every project owned by the account; used only by the /v1/projects* endpoints below (each of which declares this scheme explicitly and does not inherit the document-level bearerApiKey default). Minted from the dashboard (Account → API keys) — there is no programmatic endpoint that issues an account key.

Path Parameters

id
string<uuid>
required

The project id.

Body

application/json
sourceProjectId
string<uuid>

UUID of the source project. Provide this or sourceProjectSlug.

sourceProjectSlug
string

Slug of the source project, scoped to the authenticated account.

sourceTemplateId
string<uuid>

UUID of the template to copy, scoped to the source project. Provide this or sourceTemplateSlug.

sourceTemplateSlug
string

Slug of the template to copy, scoped to the source project.

name
string

Display name for the copy. Omit to keep the source template's name and slug unchanged; when provided, the target slug is derived from it instead.

Required string length: 1 - 120

Response

Idempotent replay — the target project already had a template at the resolved slug.

Response for POST /v1/projects/{id}/templates/copy. Identical shape for a freshly created copy (201) and an idempotent replay (200) — see alreadyExisted.

id
string<uuid>
required
projectId
string<uuid>
required

The target project (echoes the path id).

slug
string
required
name
string
required
currentVersionNumber
integer
required

Always 1 for a freshly created copy.

sourceProjectId
string<uuid>
required
sourceTemplateId
string<uuid>
required
sourceVersionNumber
integer
required

The source's version number that was copied.

alreadyExisted
boolean
required

True when a pre-existing template at the target slug was returned instead of creating a duplicate.