Upsert a Recipient Message
POST/agreements/:agreement_id/recipient_messages
Upsert a new recipient message. Use the Recipient Message ID in subsequent requests.
Request
Path Parameters
POST /agreements/:agreement_id/recipient_messages parameter
- application/json
Body
POST /agreements/:agreement_id/recipient_messages request body
- Array [
- ]
- Array [
- ]
message_templates object[]required
Possible values: [sv-SE
, en-US
]
The message template string. Supports simple markdown and dynamic data variables via mustache syntax.
message_template_variables object[]
The name of the variable. Supports dot notation such as "my.variable.name". All values will be escaped and sanitized so refrain from uncommon characters or HTML.
The variable value. Must be provided as a string, but booleans and numbers will be parsed to their native types. Any HTML will be escaped.
Responses
- 200
- 400
POST /agreements/:agreement_id/recipient_messages Successful response
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- ]
Possible values: [1.0
]
The version of the response schema
Possible values: [single
]
A single object of the recipient_message resource.
Possible values: [recipient_message
]
Data contains the recipient_message resource.
data objectrequired
The resource data.
The unique identifier of the recipient message
Possible values: [recipient_message
]
message_templates objectrequired
Possible values: [1.0
]
The version of the response schema
Possible values: [list
]
A non-paginated list of the recipient message template resource.
Possible values: [recipient_message_template
]
Data contains the recipient message template resource.
data object[]required
The unique identifier of the recipient message template
Possible values: [recipient_message_template
]
Possible values: [sv-SE
, en-US
]
UTC datetime ISO string
UTC datetime ISO string
message_template_variables objectrequired
Possible values: [1.0
]
The version of the response schema
Possible values: [list
]
A non-paginated list of the recipient message template variable resource.
Possible values: [recipient_message_template_variable
]
Data contains the recipient message template variable resource.
data object[]required
The unique identifier of the recipient message variable
Possible values: [recipient_message_template_variable
]
UTC datetime ISO string
UTC datetime ISO string
UTC datetime ISO string
UTC datetime ISO string
{
"version": "1.0",
"result_type": "single",
"resource_type": "recipient_message",
"data": {
"id": "cexfmnhnknefinudyzjexample",
"resource_type": "recipient_message",
"message_templates": {
"version": "1.0",
"result_type": "list",
"resource_type": "recipient_message_template",
"data": [
{
"id": "cy80mik8iwxn0jom970example",
"template_string": "string",
"resource_type": "recipient_message_template",
"locale": "sv-SE",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
]
},
"message_template_variables": {
"version": "1.0",
"result_type": "list",
"resource_type": "recipient_message_template_variable",
"data": [
{
"id": "cutvu1wh0v5nshh7u4mexample",
"resource_type": "recipient_message_template_variable",
"variable_name": "string",
"variable_value": "string",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
]
},
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
}
POST /agreements/:agreement_id/recipient_messages Error response
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [error
]
error objectrequired
Possible values: >= 400
and <= 599
{
"status": "error",
"error": {
"code": 0,
"message": "string",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}