Create a template from the library
POST/v1/templates/from-library
Adds a ready-made template to your project as version 1, in your brand kit’s colors, font, logo and footer unless you pass apply_brand: false. You can then edit it by publishing new versions.
Required scope: templates:manage
Request body
| Field | Type |
|---|---|
library_idrequired | string |
idrequired | string |
nameoptional | string |
apply_brandoptional | boolean |
Unknown fields are rejected, so a typo never silently does nothing.
Example
curl -X POST 'https://api.sendsend.email/v1/templates/from-library' \
-H "Authorization: Bearer $SENDSEND_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"library_id": "password-reset",
"id": "reset"
}'Response 201
{
"object": "template",
"id": "reset",
"version": 1,
"from": "password-reset"
}Errors
| Status | Code | When |
|---|---|---|
| 400 | validation_error | The request body or parameters are invalid. The message says which field. |
| 404 | not_found | No such resource in this project. |
| 401 | unauthorized | The API key is missing, invalid or revoked. |
| 403 | forbidden | The key does not have the scope this endpoint needs. |
Every error has the same shape. See Errors.