Skip to content

Import exported template descriptors and versions

Request

Import exported template descriptors and template versions for a company. The exported data should come from the /communicator/templates/export endpoint.

The import will create new template descriptor if a matching one does not exist and will create new template versions if a matching one does not exist. This is often used to "promote" templates from a testing environment to a production environment.

Security
oauth2(Required scopes: communicator.template:create) or bearerAuth or apiKeyHeader
Query
companyIdstringrequired

The company to import templates for

allowActivateboolean

If an imported version data has new content and is marked active, activate the newly created template version.

Default:true
Bodyapplication/jsonrequired

The exported template data

Array of any
POST
/communicator/templates/import
curl -i -X POST \
  'https://sandboxapi.peach.finance/api/communicator/templates/import?companyId=string&allowActivate=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    null
  ]'

Responses

Successfully imported