API · Templates
Publish Template
Publish the current template draft for sending (requires full access). Nonempty HTML is required, and publishing replaces the previous published version.
POST
/templates/{id}/publishFull accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
idpath · required | string | Template id or alias. |
Idempotency-Keyheader · optional | string1–256 characters | Makes the request safe to retry. See Idempotency. |
Request example
Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.
bash
curl -X POST "$OPENSEND_BASE_URL/templates/YOUR_id/publish" \
-H "Authorization: Bearer $OPENSEND_API_KEY"Response
200 · application/json. Example IDs stand for IDs returned by your installation.
json
{
"object": "template",
"id": "YOUR_ID"
}Behavior and errors
A template has one mutable draft and one published snapshot. Sends must use the published snapshot. There is no historical version API.
Use a full-access credential. Resource IDs belong to your team; an unknown or foreign resource returns 404. See authentication, errors, rate limits, and compatibility for the shared contract.