curl --request PATCH \
--url https://app.usertick.com/api/public/v1/dashboards/{dashboardId}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedDraftVersion": 2,
"operations": [
{
"op": "add_card",
"card": {
"kind": "themes",
"title": "Top themes",
"surveyId": "11111111-1111-4111-8111-111111111111"
}
},
{
"op": "update_card",
"id": "w_k3v9q2ab",
"set": {
"title": "NPS this month"
}
},
{
"op": "set_board",
"name": "Onboarding"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedDraftVersion: 2,
operations: [
{
op: 'add_card',
card: {
kind: 'themes',
title: 'Top themes',
surveyId: '11111111-1111-4111-8111-111111111111'
}
},
{op: 'update_card', id: 'w_k3v9q2ab', set: {title: 'NPS this month'}},
{op: 'set_board', name: 'Onboarding'}
]
})
};
fetch('https://app.usertick.com/api/public/v1/dashboards/{dashboardId}/draft', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.usertick.com/api/public/v1/dashboards/{dashboardId}/draft"
payload = {
"expectedDraftVersion": 2,
"operations": [
{
"op": "add_card",
"card": {
"kind": "themes",
"title": "Top themes",
"surveyId": "11111111-1111-4111-8111-111111111111"
}
},
{
"op": "update_card",
"id": "w_k3v9q2ab",
"set": { "title": "NPS this month" }
},
{
"op": "set_board",
"name": "Onboarding"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Edit a dashboard draft
Changes a dashboard’s draft with 1 to 50 operations (add_card, update_card that changes only the fields sent, remove_card, set_board), applied in order and saved together or not at all. Allowed on a published board too: viewers keep the published board, and the answer says hasUnpublishedChanges. Nothing reaches the board’s viewers: a person opens it in edit mode in Usertick (editorUrl) and selects Publish. The API never publishes, discards, deletes, pins or shares a board. The plan’s dashboards and cards per dashboard apply as in the dashboard; no Usertick AI credits are used. Send expectedDraftVersion from the last read: a draft that changed since is 409 PUB-015-004 (read it again and redo the edit). While the board is open in edit mode in Usertick the edit is 409 PUB-015-003. A card id that names no card is 400 PUB-015-005. A board past the plan’s cards per dashboard keeps saving while it doesn’t grow. Recorded in the audit log as made through the credential.
Scopes: dashboards:draft, dashboards:read.
curl --request PATCH \
--url https://app.usertick.com/api/public/v1/dashboards/{dashboardId}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedDraftVersion": 2,
"operations": [
{
"op": "add_card",
"card": {
"kind": "themes",
"title": "Top themes",
"surveyId": "11111111-1111-4111-8111-111111111111"
}
},
{
"op": "update_card",
"id": "w_k3v9q2ab",
"set": {
"title": "NPS this month"
}
},
{
"op": "set_board",
"name": "Onboarding"
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedDraftVersion: 2,
operations: [
{
op: 'add_card',
card: {
kind: 'themes',
title: 'Top themes',
surveyId: '11111111-1111-4111-8111-111111111111'
}
},
{op: 'update_card', id: 'w_k3v9q2ab', set: {title: 'NPS this month'}},
{op: 'set_board', name: 'Onboarding'}
]
})
};
fetch('https://app.usertick.com/api/public/v1/dashboards/{dashboardId}/draft', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.usertick.com/api/public/v1/dashboards/{dashboardId}/draft"
payload = {
"expectedDraftVersion": 2,
"operations": [
{
"op": "add_card",
"card": {
"kind": "themes",
"title": "Top themes",
"surveyId": "11111111-1111-4111-8111-111111111111"
}
},
{
"op": "update_card",
"id": "w_k3v9q2ab",
"set": { "title": "NPS this month" }
},
{
"op": "set_board",
"name": "Onboarding"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Authorizations
Headers
Any 1 to 255 printable ASCII characters, without a space at either end. The answer to the first request with a key is kept for 24 hours per credential: the same request again gets it back (Idempotent-Replayed: true), another request with the key is 409 PUB-002-002, and while the first still runs 409 PUB-002-003. A server error is not kept, and a request that never answered frees its key after 2 minutes: a retry with the key then runs again.
255Body
Response
The draft after the edit.