Request
// Each field type takes its own value format.
// Use field: 'custom_field' and custom_field_id to target the field.
// SELECT — value is the option id
await fetch('https://api.todo.work/api_integrations/tickets/update', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY',
'X-API-SECRET': 'YOUR_API_SECRET'
},
body: JSON.stringify({ id: 456, field: 'custom_field', custom_field_id: 42, value: 101 })
});
// DATE — value is 'YYYY-MM-DD'
await fetch('https://api.todo.work/api_integrations/tickets/update', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY',
'X-API-SECRET': 'YOUR_API_SECRET'
},
body: JSON.stringify({ id: 456, field: 'custom_field', custom_field_id: 43, value: '2026-03-15' })
});
// TEXT / FREE_TEXT — value is any string
await fetch('https://api.todo.work/api_integrations/tickets/update', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY',
'X-API-SECRET': 'YOUR_API_SECRET'
},
body: JSON.stringify({ id: 456, field: 'custom_field', custom_field_id: 44, value: 'Any text' })
});
// USERS_LIST — value is an array of user ids
await fetch('https://api.todo.work/api_integrations/tickets/update', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY',
'X-API-SECRET': 'YOUR_API_SECRET'
},
body: JSON.stringify({ id: 456, field: 'custom_field', custom_field_id: 45, value: [1, 2, 3] })
});
// USER_APPROVAL — value is 'idle' | 'pending' | 'approved' | 'rejected'
await fetch('https://api.todo.work/api_integrations/tickets/update', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY',
'X-API-SECRET': 'YOUR_API_SECRET'
},
body: JSON.stringify({ id: 456, field: 'custom_field', custom_field_id: 46, value: 'approved' })
});
// SWITCH — value is '1' (on) or '0' (off)
await fetch('https://api.todo.work/api_integrations/tickets/update', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'YOUR_API_KEY',
'X-API-SECRET': 'YOUR_API_SECRET'
},
body: JSON.stringify({ id: 456, field: 'custom_field', custom_field_id: 47, value: '1' })
});
console.log('Custom field examples — copy and adapt as needed');
Response
{
"response": {
"status": "success",
"ticket": { "id": 456, "custom_filters": { "42": "101" } }
}
}