External API
Set custom fields on a ticket
Set a ticket's custom fields in Proto from your own system.
Sets a ticket’s custom fields from your own system – for example, its order number or refund amount. Live agents looking at the ticket see the new values straight away. Not sure how to send a request? See Make your first request.
Request
Send a PATCH request to:
https://v3-api.proto.cx/api/platform/v1/custom-fields/YOUR_TEAMSPACE_ID/ticket/YOUR_TICKET_ID/update-ticket-custom-fields
In the body, list each field and its value. In the address and the body, replace anything starting with YOUR_ with your own – YOUR_TICKET_ID is the ticket’s id, such as the one Create a ticket returns:
{
"custom_fields": [
{ "id": "YOUR_FIELD_ID", "value": "1042" },
{ "id": "YOUR_SINGLE_SELECT_FIELD_ID", "value": "YOUR_OPTION_ID" }
]
}
| Field | Required | What it is |
|---|---|---|
custom_fields | Yes | The fields to set |
Each item in custom_fields has:
| Field | Required | What it is |
|---|---|---|
id | Yes | The field’s ID. Use Conversation fields – get their IDs from List custom fields. |
value | Yes | The value, as text – numbers, dates and true or false too. Send "" to clear it. |
Values for each type of field
| Field type | Send | Example |
|---|---|---|
| Text | Any text | "Damaged parcel" |
| Number | Digits, with an optional - and one . – no commas or spaces | "49.99" |
| Toggle switch | true or false | "false" |
| Date | An ISO 8601 date, or date and time | "2026-11-18" |
| Dropdown | One of its options, exactly | "Pro" |
| Single select | The option’s ID, starting cfo_ – not its name. Get it from List custom fields. | "cfo_01J0ABCDEF1234567890ABCD" |
Proto checks every value first. If any is wrong, it saves none of them.
Response
Once every value is saved, Proto replies 200 OK:
{ "success": true }
Errors
| You get | What it means |
|---|---|
400 | A field isn’t found, or a value doesn’t suit its field. data.errors lists each one, with the custom_field_id and a detail saying what’s wrong. |
404 | No ticket with this ID is in your teamspace. |
422 | A value is null or isn’t text. |
For errors any request can return, see If something goes wrong.