Skip to content
campaiDeveloper
campai.com

Templates

POST/{organizationId}/templates/{templateId}/info

Update template info

Updates a template’s name, description and folder using the organization ID, template ID and folder ID. The folder ID can be null. Returns the template’s name, description, folder and updatedAt.

Permissions

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

Who may call it

  • The caller must have organization access and the template.edit permission.
  • Updating a receipt template also requires receipt.edit.
  • Updating a donationConfirmation template also requires donationsSettings.edit.

Request

Path parameters

  • organizationIdidrequired
  • templateIdidrequired

Body

Content-Type: application/json

  • namestringrequired

    1–64 characters

  • descriptionstringrequired

    at most 240 characters

  • folderIdidrequirednullable
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/info' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • namestring

    1–64 characters

  • descriptionstring

    at most 240 characters

  • folderidnullable
  • updatedAtstring · date-timenullable
Response200
{
  "name": "string",
  "description": "string",
  "folder": "000000000000000000000001"
}

What else happens

  • When a folder is supplied and found, its templateFolders record is updated with its existing name.
  • The template’s name, description and folder are updated.

Errors

Other errors

StatusErrorWhen
404No fixed messageIf the template is not found in the organization, the request returns HTTP 404 NOT_FOUND.
404No fixed messageIf a folder ID is supplied but the folder is not found in the organization, the request returns HTTP 404 NOT_FOUND.

Errors nearly every request can meet are listed under Errors.