API reference
Case messages
Case messages and attachments.
Create message
POST
Add a message to the case thread.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The case ID. |
Request bodyapplication/json
The message content; HTML allowed.
Optional attachment key from sign-attachment.
200The created message.application/json
A message in the case thread.
Show properties
The original message content.
The redacted content (when redacted).
Attachment object (when a file is attached).
The company responder who sent it (when from staff).
Show properties
Account ID (when the account object is not expanded).
The end user who sent it (when from the requester).
Case user ID (when the case_user object is not expanded).
post/admin/company/cases/{id}/messages
POST /api/admin/company/cases/{id}/messages HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "message": "string", "attachment_id": "string" }
200The created message.
{
"result": {
"id": "string",
"message_original": "string",
"message_redacted": "string",
"attachment": {},
"account": {
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string"
},
"account_id": "string",
"case_user": {},
"case_user_id": "string",
"created_at": "string",
"updated_at": "string"
}
}Sign attachment
POST
Pre-sign an upload URL for a case message attachment.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The case ID. |
Request bodyapplication/json
MIME type of the file to upload.
200Signed upload URL.application/json
Show properties
The signed URL to PUT the file to.
Use as `attachment_id` when creating the message.
post/admin/company/cases/{id}/sign-attachment
POST /api/admin/company/cases/{id}/sign-attachment HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "mime": "application/pdf" }
200Signed upload URL.
{
"result": {
"url": "string",
"key": "string"
}
}Redact message
POST
Redact a message sent by the case user.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
case_id |
string | Yes | The case ID. |
message_id |
string | Yes | The message to redact. |
Request bodyapplication/json
The redacted replacement text. Required.
200The updated message.application/json
A message in the case thread.
Show properties
The original message content.
The redacted content (when redacted).
Attachment object (when a file is attached).
The company responder who sent it (when from staff).
Show properties
Account ID (when the account object is not expanded).
The end user who sent it (when from the requester).
Case user ID (when the case_user object is not expanded).
post/admin/company/cases/{case_id}/redact-messages/{message_id}
POST /api/admin/company/cases/{case_id}/redact-messages/{message_id} HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "message": "string" }
200The updated message.
{
"result": {
"id": "string",
"message_original": "string",
"message_redacted": "string",
"attachment": {},
"account": {
"id": "string",
"email": "string",
"first_name": "string",
"last_name": "string"
},
"account_id": "string",
"case_user": {},
"case_user_id": "string",
"created_at": "string",
"updated_at": "string"
}
}Redact fields
POST
Redact one or more case fields submitted by the case user.
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
case_id |
string | Yes | The case ID. |
Request bodyapplication/json
Case fields to redact, by case field ID.
Show properties
The case field ID to redact.
Replacement value (any JSON type).
200The updated case field records.application/json
The redacted case field records.
post/admin/company/cases/{case_id}/redact-fields
POST /api/admin/company/cases/{case_id}/redact-fields HTTP/1.1 Host: {instance}.clym.io Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: application/json Accept: */* { "fields": [ { "id": "string", "value": null } ] }
200The updated case field records.
{
"result": [{}]
}