Mark a task done
Mark a checklist task completed, or set it back to in progress, by task name.
The API finds the rooftop's active tasks whose name matches taskName, exactly but ignoring case. With segmentName, only that segment's task is updated. Without it, the update applies to every segment and every product line where the rooftop has a task with that name. isCompleted: true sets COMPLETED and stamps the end time. isCompleted: false, or no isCompleted, sets INPROGRESS. That also reverts completed tasks and clears their end time. The start time is set to now if it was never set. The response says how many tasks changed.
Before you call it
- Send
Authorization: Bearer YOUR_TOKENandContent-Type: application/json. The token is the signed-in console user's session token. It is checked against the user service on every call. - The checklist must exist. See Get the onboarding checklist. Use the exact
task_namefrom it. - For Rooftop Setup and Integrations tasks, leave out
segmentName. These tasks are shared, so one call updates them everywhere. - For Agent Setup and Go Live Readiness tasks, send the agent's
segmentName, for exampleinboundSales. Without it, the same task is updated for every agent the rooftop has. - Send
isCompleted: trueto complete a task. Leaving it out sets the task to in progress. - The call is synchronous. The task rows are updated before the response returns. Rate limit: not documented.
Request body
- Authenticate: send
Authorization: Bearer YOUR_TOKENandContent-Type: application/json. - Name the task: set
teamIdandtaskName. - Scope it: add
segmentNamefor agent-level tasks only. - Complete it: set
isCompleted: true. - Check the result: read
messagein the response. A200does not mean a task was found.
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | Required | Rooftop ID. |
taskName | string | Required | Task name. Matched exactly, ignoring case. Spaces and punctuation must match. |
segmentName | string | Required if | The task is an Agent Setup or Go Live Readiness task. Agent segment, for example inboundSales. Matched exactly and case-sensitive. When sent, only that segment's task is updated. Leave it out for Rooftop Setup and Integrations tasks. |
isCompleted | boolean | Optional | true marks matching tasks COMPLETED. false or omitted marks them INPROGRESS. |
Sample request
# Shared task: no segmentName
curl -X POST "https://api.spyne.ai/console/v1/product-onboarding/onboarding-tracker/bulk-complete-shared-task" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"teamId": "<teamId>", "taskName": "CRM Integration", "isCompleted": true}'
# Agent task: with segmentName
curl -X POST "https://api.spyne.ai/console/v1/product-onboarding/onboarding-tracker/bulk-complete-shared-task" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"teamId": "<teamId>", "taskName": "Agent Customization", "segmentName": "inboundSales", "isCompleted": true}'import requests
resp = requests.post(
"https://api.spyne.ai/console/v1/product-onboarding/onboarding-tracker/bulk-complete-shared-task",
json={
"teamId": "<teamId>",
"taskName": "Agent Customization",
"segmentName": "inboundSales",
"isCompleted": True,
},
headers={"Authorization": "Bearer YOUR_TOKEN"},
)
print(resp.json()["message"])const res = await fetch(
"https://api.spyne.ai/console/v1/product-onboarding/onboarding-tracker/bulk-complete-shared-task",
{
method: "POST",
headers: { Authorization: "Bearer YOUR_TOKEN", "Content-Type": "application/json" },
body: JSON.stringify({
teamId: "<teamId>",
taskName: "Agent Customization",
segmentName: "inboundSales",
isCompleted: true,
}),
}
);
const { message } = await res.json();Sample response
{
"message": "Marked \"Agent Customization\" completed on 1 of 1 matching task(s) in segment \"inboundSales\"",
"error": false,
"code": "",
"details": null,
"data": null
}{
"message": "\"CRM Integration\" is already completed on all 2 matching task(s) for the team",
"error": false,
"code": "",
"details": null,
"data": null
}{
"message": "No active \"Agent Customisation\" task found for team <teamId> in segment \"inboundSales\"",
"error": false,
"code": "",
"details": null,
"data": null
}{
"message": "taskName is required",
"error": true,
"code": "ERROR_BAD_REQ_400",
"details": "",
"data": null
}{
"message": "Invalid Token",
"error": true,
"code": "ERROR_AUTH_401",
"details": "",
"data": null
}{
"message": "Internal server error while bulk-updating shared task",
"error": true,
"code": "ERROR_SERVER_500",
"details": "<error message>",
"data": null
}Response parameters (200)
| Parameter | Type | Description |
|---|---|---|
message | string | What happened. See the message forms below. |
error | boolean | false on success. |
code | string | "" on success. |
details | null | Always null on success. |
data | null | Always null. |
Message forms on 200:
Marked "<taskName>" completed on <changed> of <matched> matching task(s) for the team, orin segment "<segmentName>"at the end.Marked "<taskName>" in progress on <changed> of <matched> matching task(s) ... (reverted from completed where applicable)."<taskName>" is already completed on all <matched> matching task(s) ..., or... is already in progress ....No active "<taskName>" task found for team <teamId>, plusin segment "<segmentName>"when sent.
Errors
| Status | Code | When it happens |
|---|---|---|
200 | No task matched | Returned even when no task matches. The message starts with No active. This covers a misspelled taskName, a wrong-case segmentName, or a task the rooftop does not have. |
400 | Missing parameter | teamId or taskName is missing. The framework rejects the request, or the API returns teamId is required or taskName is required when the value is empty. |
401 | ERROR_AUTH_401 | Missing, malformed or invalid token. |
408 | ERROR_REQ_TIMEOUT_408 | The token check could not reach the user service. |
500 | ERROR_SERVER_500 | The database update failed. |
What happens next
Call Get the onboarding checklist again to show the new status. When every required task is done, the rooftop can move to the Go Live Readiness tasks and go live.
Behavior to plan for:
taskNameis matched exactly and ignoring case.Rooftop SetupandRoofTop Setupmatch.Office Hours - OverflowandOffice Hours Overflowdo not.segmentNameis matched exactly and case-sensitively.- Without
segmentName, every segment and every product line with that task name is updated, including other product lines the rooftop has. - Sending
isCompleted: false, or leaving it out, sets completed tasks back toINPROGRESS. Chatbot Scriptis never marked done through this API. The checklist treats it as done when a website chat script exists for the rooftop.
Updated about 1 hour ago
