api:messagetemplates:test
Table of Contents
API : Message templates : Test
Introduction
Send the text in the editor, with the example values of Preview, to the user's own e-mail address or SMS number.
So that it cannot be used to send any content to any address:
- Only for a template the user may change in the scope (
writable). - An e-mail always comes from
noreply@telecomx.dk, with “(test)” after the sender name and “[TEST]” before the subject; an SMS starts with “TEST:”. - At most 20 test messages per user per hour.
- Not while the template breaks the rules for secrets - the real message would not be sent like that either.
PDF templates can only be previewed.
Request
| URL | https://api.telecomx.dk/messagetemplates/CHANNEL/KEY/LANGUAGE/test | ||
|---|---|---|---|
| Method | POST | ||
| Access level | The template must be writable in the scope. | ||
| Param | CHANNEL | String | EMAIL or SMS. |
| KEY | String | Key of the template. | |
| LANGUAGE | String | da or en. | |
| Query | reseller | Id | [optional] Reseller of the scope. |
| Body | subject | String | [optional] The subject in the editor. |
| body | String | The text in the editor. | |
Response
| Field | Type | Description |
|---|---|---|
| sentTo | String | The e-mail address or SMS number the test was sent to. |
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | The template is not writable in this scope |
| 404 | template | Template not found, not in this language, or not in this scope |
| 422 | channel | PDF templates can only be previewed |
| 422 | emailAddress | You have no e-mail address to send the test to |
| 422 | smsNumber | You have no SMS number to send the test to |
| 422 | template | At most 20 test messages per hour |
| 422 | secrets | A password, code or login link would not be safe in the template |
| 500 | internal_error | <Unspecified> |
api/messagetemplates/test.txt · Last modified: by Telecom X AI
