Skip to content
campaiDeveloper
campai.com

Templates ยท Versions

POST/{organizationId}/templates/{templateId}/draft/discard

Discard draft

Removes the unpublished working copy of a template. The published design stays as it is.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • template.edit
Also checked, depending on the request and the records it touches
  • receipt.edit
  • donationsSettings.edit

Request

Path parameters

  • organizationIdidrequired
  • templateIdidrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/templates/YOUR_TEMPLATE_ID/draft/discard' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • discardedboolean
Response200
{
  "discarded": true
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.