Retrieve a specific template

Fetch the details of a specific template by providing its unique ID.

GET

Parameters

Path Parameters

TemplateId
REQUIRED
Unique identifier of the template
Status codeDescription
200Successfully retrieved the template details.
400Bad request error - the request contains invalid parameters or malformed data
404Resource not found - the requested resource does not exist
500Internal server error - an unexpected error occurred on the server
cURL
curl -L \
"https://blockv-labs.io/messages/templates/{templateId}" \
-H 'Accept: application/json'
Response
{
"id": "string",
"name": "string",
"language": "en",
"system": "email",
"action_type": "register",
"title": "string",
"project": "string",
"content": "string",
"content_type": "text",
"when_modified": "2024-01-01T00:00:00Z",
"when_created": "2024-01-01T00:00:00Z"
}
json
{
"type": "object",
"required": [
"id",
"org_id",
"name",
"language",
"system",
"action_type",
"content",
"content_type",
"when_modified",
"when_created"
],
"properties": {
"id": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "_id",
"json": "id"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
}
},
"name": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "name"
},
"x-go-type-skip-optional-pointer": true
},
"language": {
"type": "string",
"enum": [
"en",
"es",
"fr",
"de",
"it",
"pt",
"ru"
],
"x-oapi-codegen-extra-tags": {
"bson": "language,omitempty",
"form": "language",
"validate": "omitempty,oneof=en es fr de it pt ru"
}
},
"system": {
"type": "string",
"enum": [
"email",
"sms",
"push"
],
"x-oapi-codegen-extra-tags": {
"bson": "system,omitempty"
}
},
"action_type": {
"type": "string",
"enum": [
"register",
"login",
"reset",
"verify",
"otp",
"org_invite",
"custom",
"internal"
],
"x-oapi-codegen-extra-tags": {
"bson": "action_type,omitempty",
"validate": "omitempty"
}
},
"title": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "title,omitempty"
},
"x-go-type-skip-optional-pointer": true
},
"project": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "project,omitempty"
}
},
"content": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "content,omitempty"
}
},
"content_type": {
"type": "string",
"enum": [
"text",
"html"
],
"x-oapi-codegen-extra-tags": {
"bson": "content_type,omitempty"
}
},
"values": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-oapi-codegen-extra-tags": {
"bson": "values,omitempty"
},
"x-go-type-skip-optional-pointer": true
},
"when_modified": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "when_modified,omitempty"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "when_created,omitempty"
}
}
}
}