Skip to content
campaiDeveloper
campai.com

Templates · Versions

GET/{organizationId}/templates/{templateId}/versionsReads only

List versions

Lists the published versions of a template for an organization, newest first. The response contains up to 100 versions without their designs.

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 template.read.
  • For a receipt template, the caller also needs receipt.read.
  • For a donation confirmation template, the caller also needs donationsSettings.read.

Request

Path parameters

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

Response

200 Successful response

Content-Type: application/json

  • versionsobject[]
    5 properties
    • _idid
    • numberinteger
    • namestring

      at most 64 characters

    • createdAtstring · date-timenullable
    • createdByobjectnullable

      Without user.read, a non-contact creator other than the current actor is masked.

      Without apiKey.read, an API creator is masked, even if it is the current actor.

      The legacy contact.read permission also allows contact creator details to be shown.

      Any one of contact:member.read, contact:address.read, contact:customer.read, contact:sponsor.read, contact:contributor.read, contact:employee.read, or contact:supplier.read allows contact creator details to be shown, regardless of the contact type.

Response200
{
  "versions": [
    {
      "_id": "000000000000000000000001",
      "number": 1,
      "name": "string"
    }
  ]
}

Errors

Other errors

StatusErrorWhen
404No fixed messageIf the template is not found in the organization, the request returns HTTP 404.

Errors nearly every request can meet are listed under Errors.