Templates
Use template endpoints when your integration needs to discover the published templates available to the API key's team, then use a compatible template_id and product_id when creating a campaign.
Most integrations create and edit templates in the Scribeless platform UI. Approved partner onboarding flows can also create a default published template through the API.
List templates
GET https://platform.scribeless.co/api/templates
Headers
X-API-Key: YOUR_API_KEY
Example request
curl --request GET 'https://platform.scribeless.co/api/templates' \
--header 'X-API-Key: YOUR_API_KEY'
Response
Successful requests return active templates with their latest published version and product summary.
[
{
"id": "TEMPLATE_ID",
"name": "Postcard template",
"created_at": "2026-01-01T10:00:00.000000+00:00",
"updated_at": "2026-01-01T10:00:00.000000+00:00",
"published_at": "2026-01-01T10:00:00.000000+00:00",
"team_id": "TEAM_ID",
"version": {
"id": "TEMPLATE_VERSION_ID",
"version_number": 1,
"status": "published",
"pages": [
{
"count": 2
}
],
"product": {
"id": "PRODUCT_ID",
"name": "A6 postcard",
"category": "postcard",
"standard": "ISO",
"delivery_methods": [
"directMail",
"bulkShipping"
]
}
}
}
]
Fetch a template
GET https://platform.scribeless.co/api/templates/{templateId}
Path parameters
| Parameter | Type | Description |
|---|---|---|
templateId | string | Scribeless template ID. |
Example request
curl --request GET 'https://platform.scribeless.co/api/templates/TEMPLATE_ID' \
--header 'X-API-Key: YOUR_API_KEY'
Response
Successful requests return the template and its latest published version.
{
"id": "TEMPLATE_ID",
"name": "Postcard template",
"status": "active",
"team_id": "TEAM_ID",
"created_at": "2026-01-01T10:00:00.000000+00:00",
"updated_at": "2026-01-01T10:00:00.000000+00:00",
"published_at": "2026-01-01T10:00:00.000000+00:00",
"version": {
"id": "TEMPLATE_VERSION_ID",
"version_number": 1,
"status": "published",
"print_config": "duplex",
"pages": [
{
"count": 2
}
],
"product": {
"id": "PRODUCT_ID",
"name": "A6 postcard",
"category": "postcard",
"subcategory": "postcard"
}
}
}
Create a default template
POST https://platform.scribeless.co/api/templates
Approved partner onboarding flows can create a default published template for a customer team. Send the customer-team API key returned by POST /api/partner/teams, not the partner account API key.
If you omit pages, Scribeless creates a default published template for the selected product.
Headers
Content-Type: application/json
X-API-Key: CUSTOMER_TEAM_API_KEY
Request body
| Field | Type | Description |
|---|---|---|
name | string | Optional template name. Defaults to Untitled Template. |
product_id | string | Product ID for the mail format. |
pages | array | Optional advanced template page data. Omit this for a default published template. |
Example request
curl --request POST 'https://platform.scribeless.co/api/templates' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: CUSTOMER_TEAM_API_KEY' \
--data '{
"name": "API postcard template",
"product_id": "PRODUCT_ID"
}'
Response
Successful requests return the created active template and its published version.
{
"id": "TEMPLATE_ID",
"name": "API postcard template",
"status": "active",
"team_id": "TEAM_ID",
"version": {
"id": "TEMPLATE_VERSION_ID",
"version_number": 1,
"status": "published",
"product": {
"id": "PRODUCT_ID",
"name": "A6 postcard",
"category": "postcard",
"subcategory": "postcard"
},
"pages": [
{
"count": 1
}
]
}
}
Notes
- Only templates your API key can access are returned.
- The
version.product.idvalue is theproduct_idto use when creating a campaign with that template. - Templates returned by these endpoints have a published version. Draft template content is not returned.
- Template authoring and editing are usually handled in the Scribeless platform UI. Most integrations only need to list or fetch published templates before creating campaigns.
- Treat any non-
2xxresponse as failed and inspect the response body for the error message.
Status codes
| Status | Meaning |
|---|---|
200 | Template or template list returned, or template created. |
401 | Missing, malformed, invalid, or unauthorized API key. |
500 | Template could not be fetched. Check the template ID and retry, or contact support if it persists. |