Create helpdesk message
/helpdesk_messages
Target audience: Developers
Create campaign
Introduction
This endpoint creates a helpdesk message from a specific account.
URI
Environment |
URI |
Stage |
https://payway-api.stage.adeprimo.se/external/api/v1/helpdesk_messages |
Production |
https://backend.worldoftulo.com/external/api/v1/helpdesk_messages |
Requirements
Identity |
Scope |
No |
/external/helpdesk/w |
Parameters
Field |
Required |
Type |
Description |
account_id |
Required |
String |
The id of the account that is the sender of the helpdesk message. Size range ..24 Allowed values: "/^[a-f\d]{24}$/i" |
heading |
Required |
String |
The heading of the message to send to the helpdesk. Size range: ..512 |
message |
Required |
String |
The text content of the message to send to the helpdesk. Size range: ..1024 |
Curl Example
Create helpdesk message
curl --request POST \
--url https://payway-api.stage.adeprimo.se/external/api/v1/helpdesk_messages \
--header 'accept: application/json' \
--header 'authorization: Bearer token' \
--header 'content-type: application/json' \
--data '{
"account_id": "66d986b4ad659dea5ceb9b62",
"heading": "My heading",
"message": "My message"
}'
Response
Field |
Description |
id |
id of the created campaign |
Example Response
HTTP 201
{
"id": "50f3ac249f6aef294d000007"
}
Errors
Example error response
HTTP 400 Bad Request
{
"code": "invalid_parameter",
"field": "account_id",
"message": "Parameter must match format (/^[a-f\d]{24}$/)"
}
HTTP 400 Bad Request
Name |
Type |
Description |
invalid_parameter |
Object |
Validation error on any of the fields in the posted json |
json_parser_error |
Object |
The request body could not be parsed as valid json |
invalid_content_type_error |
Object |
The requests Content-Type header isn't set to application/json |
unknown_parameter |
Object |
One or more of the fields in the posted json was not recognized |
HTTP 404 Not Found
Name |
Type |
Description |
not_found |
Object |
The account_id could not be found |
HTTP 500 Internal Server Error
Name |
Type |
Description |
internal_server_error |
Object |
Something unexpected happened server side |