Message
A message on a case.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/cases/{caseId}/messages |
create |
Message submitted successfully |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
created, err := client.Message(nil).Create(map[string]any{"case_id": 1, "submissionData": map[string]any{}, "type": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local created, err = client:Message():create({ case_id = 1, submissionData = {}, type = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$created = $client->Message()->create(["case_id" => 1, "submissionData" => [], "type" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
created = client.Message().create({ "case_id": 1, "submissionData": {}, "type": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
created = client.Message.create({ "case_id" => 1, "submissionData" => {}, "type" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const created = await client.Message().create({ case_id: 1, submissionData: {}, type: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
submissionData |
object |
Yes | The data for the message submission. |
type |
string |
Yes | The type of message submission. |
create
POST /cases/{caseId}/messages
Operation ID: caseSubmitMessage.
Authentication: bearer token (ClientCredentialsToken).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
caseId |
path |
integer (int64) |
Yes | The unique identifier of the case. |
X-External-Correlation-Id |
header |
string (uuid) |
No | Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
submissionData |
object or object or object or object or object or object or object or object or object |
Yes | The data for the message submission. Structure varies based on submission type. |
type |
enum: FREEFORM, DEPOSIT_SANCTION_HIT_SUBMISSION, REFERENCE_SANCTION_HIT_SUBMISSION, RECIPIENT_SANCTION_HIT_SUBMISSION, REFERENCE_LOCATION_HIT_SUBMISSION, RECIPIENT_LOCATION_HIT_SUBMISSION, ... |
Yes | The type of message submission. |
Responses
201: Message submitted successfully
application/json
| Property | Type | Required | Description |
|---|---|---|---|
author |
enum: PARTNER |
Yes | The author of the message (always PARTNER for submitted messages). |
caseId |
integer (int64) |
Yes | The ID of the case this message belongs to. |
content |
object |
Yes | The content of the created message. - For FREEFORM: contains text.freeText - For SUBMISSION types: contains submissionData - For FILE_SUBMISSION: contains submissionData with profileId and fileIds |
createdAt |
string (date-time) |
Yes | Timestamp when the message was created. Format: ISO 8601 datetime without timezone (server timezone is UTC). |
id |
string (uuid) |
Yes | Unique identifier of the created message (UUID v4). |
type |
enum: FREEFORM, DEPOSIT_SANCTION_HIT_SUBMISSION, REFERENCE_SANCTION_HIT_SUBMISSION, RECIPIENT_SANCTION_HIT_SUBMISSION, REFERENCE_LOCATION_HIT_SUBMISSION, RECIPIENT_LOCATION_HIT_SUBMISSION, ... |
Yes | The type of the created message. |
400: Bad request - validation failed or business rule violation
application/json
The response is object and object.
401: Unauthorized - missing or invalid authentication
application/json
The response is object and object.
Example response:
{
"detail": "Authentication required",
"status": 401,
"title": "Unauthorized",
"type": "/errors/types/access"
}
403: Forbidden - insufficient permissions
application/json
The response is object and object.
Example response:
{
"code": "forbidden",
"detail": "Unauthorized",
"status": 403,
"title": "Forbidden",
"type": "/errors/types/access"
}
404: Not found - case does not exist
application/json
The response is object and object.
Example response:
{
"code": "resource_not_found",
"detail": "case not found: 12345678",
"instance": "/public/v2/cases/12345678/messages",
"status": 404,
"title": "Not Found",
"type": "/errors/types/domain"
}
409: Conflict - operation not supported for the current case state
application/json
The response is object and object.
429: Rate limit exceeded. Retry after the number of seconds specified in the Retry-After header
application/json
The response is object.