Skip to Content
Notification APIDocs
Message templates

Get a template

GET
/api/v1/companies/{companyId}/projects/{projectId}/templates/{templateId}

Gets a template with schema and content.

Required permission: templates.read. See the guide for details.

Error codes:

  • 404 message_template.not_found

Every endpoint can also answer 401 (missing or invalid key), 403 (route outside the key's project or permission) and 429 rate_limit.exceeded.

Authorization

ApiKey
headerX-Api-Key<token>

Project API key: nb_<prefix>_<secret>.

Path Parameters

companyId*string

Id of the company that owns the project (shown with the API key in the dashboard).

Formatuuid
projectId*string

Id of the project the API key belongs to.

Formatuuid
templateId*string

Filter by template id.

Formatuuid

Response Body

OK

application/json
  1. response
id*string
Formatuuid
projectId*string
Formatuuid
serviceProviderId*string
Formatuuid
name*string
description*null|string
thumbnailUrl*null|string
schema*unknown

JSON form schema describing the template variables (informational; not enforced when sending).

content*string
contentType*TemplateContentType
Value in"Html""Text""Markdown""Json"
subject*null|string
design*|

Editor state of designed templates; not sent to recipients.

data*|

Provider-specific JSON object sent with the message.

createdAt*string
Formatdate-time
updatedAt*|
Formatdate-time
attachments?array<>
Example Request
curl -X GET 'https://api.gbnotification.dokploy.geobilgi.net/api/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/templates/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",  "serviceProviderId": "3568af81-f13a-4d5b-9ffd-a82aa179f2bc",  "name": "string",  "description": null,  "thumbnailUrl": null,  "schema": null,  "content": "string",  "contentType": "Html",  "subject": null,  "design": null,  "data": null,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": null,  "attachments": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "fileName": "string",      "contentType": "string",      "sizeBytes": 0    }  ]}