Mark a task done

Mark a checklist task completed, or set it back to in progress, by task name.

POSThttps://api.spyne.ai/console/v1/product-onboarding/onboarding-tracker/bulk-complete-shared-task
AuthBearer token (console user)Rate limitNot documentedProcessingSynchronous; task rows are updated before the response returns.

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_TOKEN and Content-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_name from 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 example inboundSales. Without it, the same task is updated for every agent the rooftop has.
  • Send isCompleted: true to 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

Requiredalways sendRequired ifrequired only in the case describedOptionalcan be left out
Request checklist
  1. Authenticate: send Authorization: Bearer YOUR_TOKEN and Content-Type: application/json.
  2. Name the task: set teamId and taskName.
  3. Scope it: add segmentName for agent-level tasks only.
  4. Complete it: set isCompleted: true.
  5. Check the result: read message in the response. A 200 does not mean a task was found.
ParameterTypeRequiredDescription
teamIdstringRequiredRooftop ID.
taskNamestringRequiredTask name. Matched exactly, ignoring case. Spaces and punctuation must match.
segmentNamestringRequired ifThe 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.
isCompletedbooleanOptionaltrue 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)

ParameterTypeDescription
messagestringWhat happened. See the message forms below.
errorbooleanfalse on success.
codestring"" on success.
detailsnullAlways null on success.
datanullAlways null.

Message forms on 200:

  • Marked "<taskName>" completed on <changed> of <matched> matching task(s) for the team, or in 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>, plus in segment "<segmentName>" when sent.

Errors

StatusCodeWhen it happens
200No task matchedReturned 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.
400Missing parameterteamId 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.
401ERROR_AUTH_401Missing, malformed or invalid token.
408ERROR_REQ_TIMEOUT_408The token check could not reach the user service.
500ERROR_SERVER_500The 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:

  • taskName is matched exactly and ignoring case. Rooftop Setup and RoofTop Setup match. Office Hours - Overflow and Office Hours Overflow do not.
  • segmentName is 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 to INPROGRESS.
  • Chatbot Script is never marked done through this API. The checklist treats it as done when a website chat script exists for the rooftop.

Did this page help you?