Get All Template List
Currently, this interface does not support pagination and will return a brief list of all templates. It mainly removes the specific content; if you need to get the content, please use the detail interface.
Request URL
GET https://otp.api.engagelab.cc/v1/template-configs
Authentication
Please refer to Authentication to learn how to perform API authentication.
Request
Request Parameters
None
Request Example
Request Header
GET /v1/template-configs HTTP/1.1
Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0
GET /v1/template-configs HTTP/1.1
Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0
This code block in the floating window
Request Body
None
Response
Response Parameters
No outer wrapper field, directly returns a JSON array.
Response Example
Success Response
[
{
"template_id": "test-template-1", // Custom template id, unique within the application
"description": "Test template 1", // Description of the template
"send_channel_strategy": "whatsapp|sms",// Template delivery strategy, supports whatsapp/sms/voice/email. Combined strategies use the | character to indicate fallback on failure
"brand_name": "Brand Name", // Brand name, used for signatures in template content in some countries/regions (e.g., some countries require registered signatures in the SMS channel)
"verify_code_config": { // Verification code configuration, used to configure automatically generated verification codes, returned when the template contains a verification code type
"verify_code_type": 1, // Verification code type, value range [1,7]
"verify_code_len": 6, // Verification code length, value range [4,10]
"verify_code_ttl": 1 // Verification code validity period, value range [1,10], note that when the strategy includes whatsapp, the value can only be 1, 5, 10
},
"whatsapp_config": { // whatsapp strategy configuration, returned when the delivery strategy includes whatsapp
"template_type": 1 // whatsapp template type, currently only supports default template, fixed value is 1
},
"sms_config": { // sms strategy configuration, returned when the delivery strategy includes sms
"template_type": 2, // sms template type, values: 1-default template/2-custom template
"template_parts": 1 // Estimated billing parts for sms template, if the template is too long, the specific price = billing parts * billing unit price
},
"voice_config": { // voice strategy configuration, returned when the delivery strategy includes voice
"template_type": 1 // voice template type, currently only supports default template, fixed value is 1
},
"email_config": { // email strategy configuration, returned when the delivery strategy includes email
"template_name": "email template name" // email template name
},
"pwa_config": { // pwa related configuration, returned only when there is pwa configuration
"pwa_platform": "xx", // pwa platform used
"pwa_code": "xx" // code in the pwa platform used
},
"created_time": 1234567890, // Creation time of the template, timestamp format, accurate to seconds
"status": 1, // Template status, values: 1-pending review/2-approved/3-rejected
"audit_remark": "xx" // Audit remark, generally when the audit is rejected, you can check this field for the rejection reason
}
]
[
{
"template_id": "test-template-1", // Custom template id, unique within the application
"description": "Test template 1", // Description of the template
"send_channel_strategy": "whatsapp|sms",// Template delivery strategy, supports whatsapp/sms/voice/email. Combined strategies use the | character to indicate fallback on failure
"brand_name": "Brand Name", // Brand name, used for signatures in template content in some countries/regions (e.g., some countries require registered signatures in the SMS channel)
"verify_code_config": { // Verification code configuration, used to configure automatically generated verification codes, returned when the template contains a verification code type
"verify_code_type": 1, // Verification code type, value range [1,7]
"verify_code_len": 6, // Verification code length, value range [4,10]
"verify_code_ttl": 1 // Verification code validity period, value range [1,10], note that when the strategy includes whatsapp, the value can only be 1, 5, 10
},
"whatsapp_config": { // whatsapp strategy configuration, returned when the delivery strategy includes whatsapp
"template_type": 1 // whatsapp template type, currently only supports default template, fixed value is 1
},
"sms_config": { // sms strategy configuration, returned when the delivery strategy includes sms
"template_type": 2, // sms template type, values: 1-default template/2-custom template
"template_parts": 1 // Estimated billing parts for sms template, if the template is too long, the specific price = billing parts * billing unit price
},
"voice_config": { // voice strategy configuration, returned when the delivery strategy includes voice
"template_type": 1 // voice template type, currently only supports default template, fixed value is 1
},
"email_config": { // email strategy configuration, returned when the delivery strategy includes email
"template_name": "email template name" // email template name
},
"pwa_config": { // pwa related configuration, returned only when there is pwa configuration
"pwa_platform": "xx", // pwa platform used
"pwa_code": "xx" // code in the pwa platform used
},
"created_time": 1234567890, // Creation time of the template, timestamp format, accurate to seconds
"status": 1, // Template status, values: 1-pending review/2-approved/3-rejected
"audit_remark": "xx" // Audit remark, generally when the audit is rejected, you can check this field for the rejection reason
}
]
This code block in the floating window
Failure Response
{
"code": 4001,
"message": "config not exist"
}
{
"code": 4001,
"message": "config not exist"
}
This code block in the floating window
Error Codes
| Error Code | HTTP Code | Description |
|---|---|---|
| 1000 | 500 | Internal error |
| 2001 | 401 | Authentication failed, incorrect token carried |
| 2002 | 401 | Authentication failed, token has expired or been disabled |
| 2004 | 403 | No permission to call this API |
| 4001 | 400 | Template does not exist |










