Home Features
Add-ons Service Desk E-commerce operations hub Accounting hub Sales CRM System Integrator Inventory & Warehouses All add-ons
Use cases Integrations Developers Pricing
Company About Team Partners Careers
Contact Sign in Try the live demo Start 30-day free trial

Prices here are in rupees for India. View the global (USD) version →

Home / Developers / Mobile API
Developers

TaskSync mobile API

The API for the TaskSync phone app, which is coming soon and not yet in the App Store or Google Play. It is not the Enterprise customer API: for that, see the TaskSync API.

Offline-first: sign in for a device token, load each list once and keep it up to date with deltas (updated_since, deleted[] tombstones), queue changes offline with an Idempotency-Key, and settle conflicts with version / If-Match. JSON only; times are ISO-8601 UTC with Z; every answer carries X-Server-Time. This page shows endpoints and examples only, no data.

  • Base address: https://tasksync.in/api/mobile/v1
  • OpenAPI 3.1 document: https://tasksync.in/api/mobile/v1/openapi.json
  • Signed-in requests: Authorization: Bearer tsm_… and X-Company-Id: <company id>.
  • Errors: {"error": {"code": "…", "message": "…"}} — the codes are listed at the end.

Account

DELETE /account/deletion Cancel "Delete my account" (keep my account) Idempotency-Key (optional)

During the 14 days. After signing in again the sign-in answer carries `account_deletion` — offer this then.

Answer (200)

{
    "deletion": {
        "status": "cancelled",
        "can_cancel": false,
        "scope": "user",
        "tenant_id": null,
        "requested_at": "2026-12-01T09:00:00Z",
        "scheduled_for": "2026-12-15T09:00:00Z",
        "days_left": 14,
        "cancelled_at": null,
        "grace_days": 14
    }
}

Errors: 401, 404

GET /account/deletion "Delete my account": status, what is deleted and kept

The signed-in person's own request only. `status`: none, scheduled, cancelled, done, failed. `owner_of`: accounts they own (they must hand them on or delete them first). `data_export`: how to get a copy of their personal data.

Answer (200)

{
    "deletion": {
        "status": "scheduled",
        "scope": "user",
        "tenant_id": null,
        "requested_at": "2026-12-01T09:00:00Z",
        "scheduled_for": "2026-12-15T09:00:00Z",
        "days_left": 14,
        "cancelled_at": null,
        "can_cancel": true,
        "grace_days": 14
    },
    "owner_of": [],
    "explained": {
        "deleted": [
            "Your name, e-mail address, phone number and photo"
        ],
        "kept": [
            "Tasks, comments, files, time and other records you added to a company stay with that company, shown as “Deleted user”"
        ]
    },
    "web_url": "https://tasksync.in/account/delete",
    "data_export": {
        "method": "email",
        "email": "support@arenasoftwares.com",
        "note": "…"
    }
}

Errors: 401, 429

POST /account/deletion "Delete my account" (password again; the two-step code if it is on) Idempotency-Key (optional)

Schedules the deletion of the person's login in 14 days (202). Every phone and web session is signed out at once (this token too — the app goes to its sign-in screen), the companies' admins are told, and an e-mail confirms it with a cancel link. An account owner gets 409 `owner_must_transfer` with `accounts` and `options` (transfer: ask support; delete_account: send `scope: "account"`, `tenant_id` and `confirm_name` — the whole account is closed now and deleted with it). `code` is needed only when the person has two-step sign-in on (422 with `two_factor_required`). 5 tries per hour.

Request

{
    "password": "••••••••"
}

Answer (202)

{
    "deletion": {
        "status": "scheduled",
        "scope": "user",
        "tenant_id": null,
        "requested_at": "2026-12-01T09:00:00Z",
        "scheduled_for": "2026-12-15T09:00:00Z",
        "days_left": 14,
        "cancelled_at": null,
        "can_cancel": true,
        "grace_days": 14
    },
    "signed_out": true
}

Errors: 401, 403, 404, 409, 422, 429

Announcements

GET /announcements Announcements I may see sync list

The web's list: published announcements of the company; managers see all, others the ones they posted or follow. `unread` is the web's read receipt. Deleted → tombstone; taken off the followers → no_access tombstone.

First load: Active announcements + archived ones changed in the last 30 days

Answer (200)

{
    "data": [
        {
            "id": 31,
            "title": "Office closed on Friday",
            "description_html": "<p>For the festival.</p>",
            "description_text": "For the festival.",
            "is_pinned": true,
            "is_archived": false,
            "is_expired": false,
            "valid_till": null,
            "published_at": "2026-11-25T09:00:00Z",
            "comments_allowed": true,
            "comments_count": 2,
            "attachments_count": 0,
            "creator": {
                "id": 7,
                "name": "Sam Rao",
                "avatar_url": null
            },
            "subscribed": true,
            "unread": true,
            "read_at": null,
            "created_at": "2026-11-25T09:00:00Z"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403

GET /announcements/{announcement} One announcement with its comments and files

Files have short-lived signed links (`url_expires_at`); fetch the announcement again for fresh ones. Does not mark it read.

Answer (200)

{
    "id": 31,
    "title": "Office closed on Friday",
    "description_html": "<p>For the festival.</p>",
    "description_text": "For the festival.",
    "is_pinned": true,
    "is_archived": false,
    "is_expired": false,
    "valid_till": null,
    "published_at": "2026-11-25T09:00:00Z",
    "comments_allowed": true,
    "comments_count": 2,
    "attachments_count": 0,
    "creator": {
        "id": 7,
        "name": "Sam Rao",
        "avatar_url": null
    },
    "subscribed": true,
    "unread": true,
    "read_at": null,
    "created_at": "2026-11-25T09:00:00Z",
    "comments": [
        {
            "id": 2,
            "content_html": "<p>Noted</p>",
            "user": {
                "id": 9,
                "name": "Asha Iyer",
                "avatar_url": null
            },
            "mine": false,
            "created_at": "2026-11-25T10:00:00Z"
        }
    ],
    "files": []
}

Errors: 401, 403, 404

GET /announcements/{announcement}/files/{attachment} Download an announcement file (signed link) public

The `url` of a file in GET /announcements/{id}: works without headers for about 30–60 minutes, for the person it was made for.

Errors: 403, 404

POST /announcements/{announcement}/read Acknowledge (mark read) — the web's read receipt; idempotent Idempotency-Key

Answer (200)

{
    "unread": false,
    "read_at": "2026-11-25T12:00:00Z",
    "id": 31,
    "title": "Office closed on Friday",
    "description_html": "<p>For the festival.</p>",
    "description_text": "For the festival.",
    "is_pinned": true,
    "is_archived": false,
    "is_expired": false,
    "valid_till": null,
    "published_at": "2026-11-25T09:00:00Z",
    "comments_allowed": true,
    "comments_count": 2,
    "attachments_count": 0,
    "creator": {
        "id": 7,
        "name": "Sam Rao",
        "avatar_url": null
    },
    "subscribed": true,
    "created_at": "2026-11-25T09:00:00Z"
}

Errors: 401, 403, 404, 423

Approvals

GET /approvals Approval requests waiting for my decision sync list

Every kind an approval chain carries (leave, weekly timesheets, expenses, vendor bills, sub-task requests, purchase orders…): what "My approvals → Waiting for me" lists — as an approver, or for someone I stand in for (delegation, leave cover). A request that stops waiting for me (decided, withdrawn, moved on to the next step, reassigned, a delegation ended) comes in `deleted` with reason `no_access`.

First load: Everything waiting for me now (at most 500)

Answer (200)

{
    "data": [
        {
            "id": 311,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T10:00:00Z",
            "subject": {
                "type": "leave",
                "id": 77
            },
            "type": "leave",
            "type_label": "Leave requests",
            "title": "Mia One — Annual leave, 2 Dec",
            "details": [
                "…"
            ],
            "status": "pending",
            "open": true,
            "step": 1,
            "steps_total": 2,
            "steps": [
                {
                    "index": 0,
                    "label": "Asha Rao",
                    "state": "current",
                    "by": null,
                    "for": null
                },
                {
                    "index": 1,
                    "label": "Owners and admins",
                    "state": "upcoming",
                    "by": null,
                    "for": null
                }
            ],
            "requester": "Mia One",
            "person": "Mia One",
            "waiting_on": [
                {
                    "id": 7,
                    "name": "Asha Rao",
                    "delegate": null
                }
            ],
            "due_at": null,
            "overdue": false,
            "escalated": false,
            "created_at": "2026-11-25T10:00:00Z",
            "decided_at": null,
            "decided_by": null,
            "note": null,
            "on_behalf_of": null,
            "can_act": true,
            "approve_blocked": null,
            "history": [
                {
                    "action": "waiting",
                    "step": 1,
                    "by": null,
                    "for": null,
                    "to": [
                        "Asha Rao"
                    ],
                    "note": null,
                    "at": "2026-11-25T10:00:00Z"
                }
            ],
            "web_url": "https://tasksync.in/leave?tab=team"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /approvals/leave Leave requests waiting for my decision outside any chain sync list

For people who approve everyone's leave or their team's. A request that stops waiting (decided, cancelled, put into a chain) comes in `deleted` with reason `no_access`.

First load: Every waiting request I may decide

Answer (200)

{
    "data": [
        {
            "can_decide": true,
            "can_cancel": true,
            "approval_id": null,
            "waiting_on": null,
            "id": 77,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T10:00:00Z",
            "person": {
                "id": 12,
                "name": "Mia One"
            },
            "kind": "annual",
            "kind_label": "Annual leave",
            "from": "2026-12-02",
            "to": "2026-12-02",
            "half_day": false,
            "half_day_part": null,
            "days": 1,
            "note": "Family visit",
            "status": "pending",
            "reject_reason": null,
            "cover": {
                "id": 14,
                "name": "Nik Rao"
            },
            "decided_at": null,
            "advance_days": 0,
            "advance_reason": null,
            "attachment": null,
            "edited": false
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /approvals/leave/{leave}/approve Approve a leave request Idempotency-Key If-Match

As the Leave page: with "hand over first" on, tasks due during the leave must be handled first (422).

Answer (200)

{
    "status": "approved",
    "can_decide": false,
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T10:00:00Z",
    "person": {
        "id": 12,
        "name": "Mia One"
    },
    "kind": "annual",
    "kind_label": "Annual leave",
    "from": "2026-12-02",
    "to": "2026-12-02",
    "half_day": false,
    "half_day_part": null,
    "days": 1,
    "note": "Family visit",
    "reject_reason": null,
    "cover": {
        "id": 14,
        "name": "Nik Rao"
    },
    "decided_at": null,
    "waiting_on": "Waiting on Asha Rao (step 1 of 2)",
    "approval_id": 311,
    "advance_days": 0,
    "advance_reason": null,
    "attachment": null,
    "edited": false,
    "can_cancel": true,
    "message": "Approved."
}

Errors: 403, 404, 409, 422, 423

POST /approvals/leave/{leave}/reject Do not approve a leave request (reason optional, shown to the person) Idempotency-Key If-Match

Request

{
    "reason": "Audit week"
}

Answer (200)

{
    "status": "rejected",
    "reject_reason": "Audit week",
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T10:00:00Z",
    "person": {
        "id": 12,
        "name": "Mia One"
    },
    "kind": "annual",
    "kind_label": "Annual leave",
    "from": "2026-12-02",
    "to": "2026-12-02",
    "half_day": false,
    "half_day_part": null,
    "days": 1,
    "note": "Family visit",
    "cover": {
        "id": 14,
        "name": "Nik Rao"
    },
    "decided_at": null,
    "waiting_on": "Waiting on Asha Rao (step 1 of 2)",
    "approval_id": 311,
    "advance_days": 0,
    "advance_reason": null,
    "attachment": null,
    "edited": false,
    "can_decide": false,
    "can_cancel": true,
    "message": "Not approved."
}

Errors: 403, 404, 409, 422, 423

GET /approvals/mine Approval requests I sent, and where each stands sync list

First load: Open ones, and those changed in the last 90 days

Answer (200)

{
    "data": [
        {
            "can_act": false,
            "id": 311,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T10:00:00Z",
            "subject": {
                "type": "leave",
                "id": 77
            },
            "type": "leave",
            "type_label": "Leave requests",
            "title": "Mia One — Annual leave, 2 Dec",
            "details": [
                "…"
            ],
            "status": "pending",
            "open": true,
            "step": 1,
            "steps_total": 2,
            "steps": [
                {
                    "index": 0,
                    "label": "Asha Rao",
                    "state": "current",
                    "by": null,
                    "for": null
                },
                {
                    "index": 1,
                    "label": "Owners and admins",
                    "state": "upcoming",
                    "by": null,
                    "for": null
                }
            ],
            "requester": "Mia One",
            "person": "Mia One",
            "waiting_on": [
                {
                    "id": 7,
                    "name": "Asha Rao",
                    "delegate": null
                }
            ],
            "due_at": null,
            "overdue": false,
            "escalated": false,
            "created_at": "2026-11-25T10:00:00Z",
            "decided_at": null,
            "decided_by": null,
            "note": null,
            "on_behalf_of": null,
            "approve_blocked": null,
            "history": [
                {
                    "action": "waiting",
                    "step": 1,
                    "by": null,
                    "for": null,
                    "to": [
                        "Asha Rao"
                    ],
                    "note": null,
                    "at": "2026-11-25T10:00:00Z"
                }
            ],
            "web_url": "https://tasksync.in/leave?tab=team"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /approvals/time Weekly time waiting for my sign-off outside any chain sync list

Time → Approvals: whole weeks (`kind: week`, owners and admins; approving locks the week) and a person's week on one project (`kind: project`, the project's managers). Always a full answer; `key` identifies an item for /approvals/time/decide.

First load: The last 8 weeks

Answer (200)

{
    "data": [
        {
            "id": 4310055121,
            "version": 1764072000000000,
            "updated_at": "2026-11-24T08:00:00Z",
            "key": "week:12:2026-11-16",
            "kind": "week",
            "person": {
                "id": 12,
                "name": "Mia One"
            },
            "week": "2026-11-16",
            "week_end": "2026-11-22",
            "project": null,
            "projects": [
                {
                    "id": 4,
                    "title": "Plant upgrade",
                    "seconds": 144000,
                    "sign_off": "pending"
                }
            ],
            "seconds": 144000,
            "billable_seconds": 72000,
            "entries": 12,
            "submitted_at": "2026-11-24T08:00:00Z",
            "resubmitted": false,
            "week_over": true,
            "approvable_from": "2026-11-23",
            "unreviewed_warning": null
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /approvals/time/decide Approve or send back a week (or a week on a project) Idempotency-Key

Not waiting for me any more (decided elsewhere) → 409 with how it was decided in `current`. A week can be approved only once it is over.

Request

{
    "key": "week:12:2026-11-16",
    "decision": "approve"
}

Answer (200)

{
    "key": "week:12:2026-11-16",
    "kind": "week",
    "waiting": false,
    "status": "approved",
    "decided_by": "Asha Rao",
    "decided_at": "2026-11-25T12:00:00Z",
    "note": null,
    "message": "Approved 1 item."
}

Errors: 403, 404, 409, 422, 423

POST /approvals/{approval}/approve Approve this step Idempotency-Key If-Match

Already decided (by someone else, or on the web) → 409 with `current`. Not waiting for me → 403.

Request

{
    "note": "Fine"
}

Answer (200)

{
    "step": 2,
    "can_act": false,
    "id": 311,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T10:00:00Z",
    "subject": {
        "type": "leave",
        "id": 77
    },
    "type": "leave",
    "type_label": "Leave requests",
    "title": "Mia One — Annual leave, 2 Dec",
    "details": [
        "…"
    ],
    "status": "pending",
    "open": true,
    "steps_total": 2,
    "steps": [
        {
            "index": 0,
            "label": "Asha Rao",
            "state": "current",
            "by": null,
            "for": null
        },
        {
            "index": 1,
            "label": "Owners and admins",
            "state": "upcoming",
            "by": null,
            "for": null
        }
    ],
    "requester": "Mia One",
    "person": "Mia One",
    "waiting_on": [
        {
            "id": 7,
            "name": "Asha Rao",
            "delegate": null
        }
    ],
    "due_at": null,
    "overdue": false,
    "escalated": false,
    "created_at": "2026-11-25T10:00:00Z",
    "decided_at": null,
    "decided_by": null,
    "note": null,
    "on_behalf_of": null,
    "approve_blocked": null,
    "history": [
        {
            "action": "waiting",
            "step": 1,
            "by": null,
            "for": null,
            "to": [
                "Asha Rao"
            ],
            "note": null,
            "at": "2026-11-25T10:00:00Z"
        }
    ],
    "web_url": "https://tasksync.in/leave?tab=team",
    "message": "Approved — waiting on Bala (step 2 of 2)."
}

Errors: 403, 404, 409, 422, 423

POST /approvals/{approval}/reject Reject (a reason is required) Idempotency-Key If-Match

Request

{
    "note": "Busy week — please move it"
}

Answer (200)

{
    "status": "rejected",
    "open": false,
    "note": "Busy week — please move it",
    "id": 311,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T10:00:00Z",
    "subject": {
        "type": "leave",
        "id": 77
    },
    "type": "leave",
    "type_label": "Leave requests",
    "title": "Mia One — Annual leave, 2 Dec",
    "details": [
        "…"
    ],
    "step": 1,
    "steps_total": 2,
    "steps": [
        {
            "index": 0,
            "label": "Asha Rao",
            "state": "current",
            "by": null,
            "for": null
        },
        {
            "index": 1,
            "label": "Owners and admins",
            "state": "upcoming",
            "by": null,
            "for": null
        }
    ],
    "requester": "Mia One",
    "person": "Mia One",
    "waiting_on": [
        {
            "id": 7,
            "name": "Asha Rao",
            "delegate": null
        }
    ],
    "due_at": null,
    "overdue": false,
    "escalated": false,
    "created_at": "2026-11-25T10:00:00Z",
    "decided_at": null,
    "decided_by": null,
    "on_behalf_of": null,
    "can_act": true,
    "approve_blocked": null,
    "history": [
        {
            "action": "waiting",
            "step": 1,
            "by": null,
            "for": null,
            "to": [
                "Asha Rao"
            ],
            "note": null,
            "at": "2026-11-25T10:00:00Z"
        }
    ],
    "web_url": "https://tasksync.in/leave?tab=team",
    "message": "Rejected. They have been told why."
}

Errors: 403, 404, 409, 422, 423

Basics

POST /companies/{company}/switch Make another of the person's companies the current one Idempotency-Key (optional)

The app may also just send X-Company-Id on each request.

Answer (200)

{
    "current_company_id": 5
}

Errors: 401, 403, 404

GET /me The person, their companies and what the app may show

Only what the person may see — the same rules as the web menu. `location` (MA10): the location notice's state (accepted / outdated / declined / withdrawn / none), whether to show it now, work-moment recording on / off and my work sites (docs/mobile-api/location.md).

Answer (200)

{
    "user": {
        "id": 7,
        "name": "Asha Rao",
        "email": "asha@example.com",
        "avatar_url": null
    },
    "companies": [
        {
            "id": 3,
            "name": "Rao Engineering",
            "role": "admin",
            "add_ons": [
                "sales_crm"
            ],
            "permissions": {
                "tasks.view": true,
                "tasks.create": true
            }
        }
    ],
    "current_company_id": 3,
    "settings": {
        "timezone": "Asia/Kolkata",
        "date_format": "d/m/Y",
        "currency": "INR",
        "week_start": "monday"
    },
    "features": {
        "time_tracking": true
    },
    "location": {
        "consent": "outdated",
        "consent_label": "asked again (recording changed)",
        "notice_required": true,
        "notice": {
            "title": "Your work location is recorded",
            "changed": "Your company has changed what it records, so we're asking again. Nothing new is recorded until you answer.",
            "paragraphs": [
                "…"
            ],
            "accept": "OK, I understand",
            "decline": "No, don't use my location"
        },
        "recording": true,
        "moments": [
            "login",
            "task_complete",
            "timer_start",
            "timer_stop"
        ],
        "recording_me": false,
        "geo_tracked": true,
        "geo": {
            "interval_min": 10,
            "in_hours": true,
            "sites": [
                {
                    "id": 2,
                    "name": "Pune plant",
                    "outside_rule": "reason"
                }
            ],
            "today": {
                "checked_in": false,
                "at": null,
                "site": null,
                "auto_closed": false
            },
            "inside": null
        }
    }
}

Errors: 401, 403

GET /meta API version and the app version policy (forced / soft update) public

Call on start (and every `update_check_hours`) with `?platform=android|ios&app_version=x.y.z` (or the X-Platform / X-App-Version headers). `app.update`: `required` (below min_version — block until updated), `recommended` (below recommended_version — prompt), `available` (below latest_version — a quiet hint), `none`. Without a platform: `min_app_version` is the lower of the two platforms' (MA13).

Query

platformandroid or ios
app_versionx.y.z

Answer (200)

{
    "api_version": "1",
    "min_app_version": "1.2.0",
    "server_time": "2026-11-25T12:00:00Z",
    "app": {
        "platform": "android",
        "min_version": "1.2.0",
        "recommended_version": "1.4.0",
        "latest_version": "1.5.0",
        "store_url": "https://play.google.com/store/apps/details?id=in.tasksync.app",
        "release_notes": [
            {
                "version": "1.5.0",
                "notes": "Faster sync."
            }
        ],
        "update_check_hours": 24,
        "message": null,
        "app_version": "1.3.2",
        "update": "recommended"
    },
    "platforms": {
        "android": {
            "min_version": "1.2.0",
            "recommended_version": "1.4.0",
            "latest_version": "1.5.0",
            "store_url": "https://play.google.com/…",
            "update_check_hours": 24,
            "message": null
        },
        "ios": {
            "min_version": "1.0.0",
            "recommended_version": "1.0.0",
            "latest_version": "1.0.0",
            "store_url": "",
            "update_check_hours": 24,
            "message": null
        }
    }
}

Errors: 429

Chat

GET /chat/contacts People I may start a chat with

The web's list (ChatAccess::contacts): staff with staff; clients / vendors with staff on a shared project; at most 500.

Answer (200)

{
    "data": [
        {
            "id": 9,
            "name": "Asha Iyer",
            "avatar_url": null
        }
    ],
    "can_create_group": true
}

Errors: 401, 403

GET /chat/conversations My chats with the last message and unread count sync list

A chat comes again when it gets a message, its last message is edited / deleted, or my own row changes (read, joined). Leaving a group or losing a project → no_access tombstone.

First load: Every chat I am in (group, one-to-one) + project chats with messages I can open

Answer (200)

{
    "data": [
        {
            "id": 44,
            "type": "group",
            "title": "Site team",
            "project_id": null,
            "unread": 3,
            "last_read_message_id": 1201,
            "last_message": {
                "id": 1204,
                "user_id": 9,
                "who": "Asha",
                "text": "Reached the site",
                "at": "2026-11-25T11:58:01Z"
            },
            "last_message_at": "2026-11-25T11:58:01Z",
            "can_send": true,
            "muted": false,
            "muted_until": null,
            "members": [
                {
                    "id": 7,
                    "name": "Sam Rao",
                    "avatar_url": null
                },
                {
                    "id": 9,
                    "name": "Asha Iyer",
                    "avatar_url": null
                }
            ]
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403

GET /chat/conversations/{conversation} One chat with the people in it (for @mentions)

Answer (200)

{
    "id": 44,
    "type": "group",
    "title": "Site team",
    "project_id": null,
    "unread": 3,
    "last_read_message_id": 1201,
    "last_message": {
        "id": 1204,
        "user_id": 9,
        "who": "Asha",
        "text": "Reached the site",
        "at": "2026-11-25T11:58:01Z"
    },
    "last_message_at": "2026-11-25T11:58:01Z",
    "can_send": true,
    "muted": false,
    "muted_until": null,
    "members": [
        {
            "id": 7,
            "name": "Sam Rao",
            "avatar_url": null
        },
        {
            "id": 9,
            "name": "Asha Iyer",
            "avatar_url": null
        }
    ],
    "people": [
        {
            "id": 9,
            "name": "Asha Iyer",
            "avatar_url": null
        }
    ],
    "max_length": 5000,
    "files": {
        "max_files": 5,
        "max_bytes": 20971520
    }
}

Errors: 401, 403, 404

POST /chat/conversations/{conversation}/leave Leave my group chat Idempotency-Key

Answer (200)

{
    "ok": true,
    "id": 44
}

Errors: 401, 403, 404, 422, 423

POST /chat/conversations/{conversation}/members Add people to my group chat Idempotency-Key

Request

{
    "member_ids": [
        14
    ]
}

Answer (200)

{
    "added": [
        14
    ],
    "id": 51,
    "type": "direct",
    "title": "Asha Iyer",
    "project_id": null,
    "unread": 0,
    "last_read_message_id": null,
    "last_message": null,
    "last_message_at": null,
    "can_send": true,
    "muted": false,
    "muted_until": null,
    "members": [
        {
            "id": 7,
            "name": "Sam Rao",
            "avatar_url": null
        },
        {
            "id": 9,
            "name": "Asha Iyer",
            "avatar_url": null
        }
    ]
}

Errors: 401, 403, 404, 422, 423, 429

GET /chat/conversations/{conversation}/messages A chat's messages (synced); older ones with before= sync list

Deleted messages come as tombstones (`deleted[]`); edits come again. With `before=<message id>` (and `limit`, default 50, at most 200) the answer is one page of older messages instead: `{data, meta: {has_more, next_before}}`. Does not mark the chat read.

First load: The chat's last 200 messages

Query

beforeOlder messages than this id (history page, not a sync)

Answer (200)

{
    "data": [
        {
            "id": 1204,
            "conversation_id": 44,
            "user": {
                "id": 9,
                "name": "Asha Iyer",
                "avatar_url": null
            },
            "body": "Reached the site",
            "deleted": false,
            "edited": false,
            "edited_at": null,
            "files": [
                {
                    "id": 3,
                    "name": "meter.jpg",
                    "size": 120344,
                    "mime_type": "image/jpeg",
                    "is_image": true,
                    "url": "https://tasksync.in/api/mobile/v1/chat/files/3?u=7&expires=1764073800&signature=…",
                    "url_expires_at": "2026-11-25T12:30:00Z"
                }
            ],
            "reply_to": null,
            "mine": false,
            "read_by": 1,
            "can_edit": false,
            "editable_until": null,
            "created_at": "2026-11-25T11:58:01Z"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 404

POST /chat/conversations/{conversation}/messages Send a message (JSON, or multipart with files[]) Idempotency-Key

The web's rules: up to 5,000 characters, up to 5 files of 20 MB (no programs or scripts), mentions = user ids (only people who can open the chat are told). `client_id` comes back. 60 a minute.

Request

{
    "body": "On my way @Asha",
    "mentions": [
        9
    ],
    "client_id": "tmp-8f2c"
}

Answer (201)

{
    "id": 1204,
    "conversation_id": 44,
    "user": {
        "id": 9,
        "name": "Asha Iyer",
        "avatar_url": null
    },
    "body": "Reached the site",
    "deleted": false,
    "edited": false,
    "edited_at": null,
    "files": [
        {
            "id": 3,
            "name": "meter.jpg",
            "size": 120344,
            "mime_type": "image/jpeg",
            "is_image": true,
            "url": "https://tasksync.in/api/mobile/v1/chat/files/3?u=7&expires=1764073800&signature=…",
            "url_expires_at": "2026-11-25T12:30:00Z"
        }
    ],
    "reply_to": null,
    "mine": false,
    "read_by": 1,
    "can_edit": false,
    "editable_until": null,
    "created_at": "2026-11-25T11:58:01Z",
    "version": 1764071881000000,
    "updated_at": "2026-11-25T11:58:01Z",
    "client_id": "tmp-8f2c"
}

Errors: 401, 403, 404, 422, 423, 429

DELETE /chat/conversations/{conversation}/mute Unmute one of my chats Idempotency-Key

Answer (200)

{
    "ok": true,
    "conversation_id": 44,
    "muted": false,
    "muted_until": null
}

Errors: 401, 403, 404, 429

POST /chat/conversations/{conversation}/mute Mute one of my chats for 1 h, 8 h or until I turn it back on Idempotency-Key

New messages then come as a silent sync hint (no notification); an @mention of me and urgent kinds still notify.

Request

{
    "for": "8h"
}

Answer (200)

{
    "ok": true,
    "conversation_id": 44,
    "muted": true,
    "muted_until": "2026-12-01T18:00:00Z"
}

Errors: 401, 403, 404, 422, 429

GET /chat/conversations/{conversation}/presence Who has the chat open, who is typing, who is online, read receipts

Poll every `poll_seconds` (3) while the chat is open and live updates are off; it also marks me as here for 15 s. `online` is null when the company does not show who is online to me. 40 a minute.

Answer (200)

{
    "conversation_id": 44,
    "here": [
        {
            "id": 9,
            "name": "Asha Iyer"
        }
    ],
    "typing": [
        {
            "id": 9,
            "name": "Asha"
        }
    ],
    "online": [
        {
            "id": 9,
            "online": true,
            "web": null,
            "app": true,
            "last_seen_at": "2026-12-01T10:58:00+00:00"
        }
    ],
    "reads": [
        {
            "user_id": 9,
            "last_read_message_id": 1204
        }
    ],
    "realtime": false,
    "poll_seconds": 3
}

Errors: 401, 403, 404, 429

POST /chat/conversations/{conversation}/read Mark the chat read up to its newest message Idempotency-Key

Answer (200)

{
    "unread": 0,
    "id": 44,
    "type": "group",
    "title": "Site team",
    "project_id": null,
    "last_read_message_id": 1201,
    "last_message": {
        "id": 1204,
        "user_id": 9,
        "who": "Asha",
        "text": "Reached the site",
        "at": "2026-11-25T11:58:01Z"
    },
    "last_message_at": "2026-11-25T11:58:01Z",
    "can_send": true,
    "muted": false,
    "muted_until": null,
    "members": [
        {
            "id": 7,
            "name": "Sam Rao",
            "avatar_url": null
        },
        {
            "id": 9,
            "name": "Asha Iyer",
            "avatar_url": null
        }
    ]
}

Errors: 401, 403, 404, 423

POST /chat/conversations/{conversation}/typing "I am typing" (for phones not on the live connection)

Broadcast as the chat channel's `typing` event {id, name} (at most every 3 s) and shown to phones polling …/presence for 5 s. Send at most every 3 s while typing; 20 a minute. On the socket, whisper `client-typing` instead.

Answer (200)

{
    "ok": true,
    "expires_in": 5,
    "broadcast": true
}

Errors: 401, 403, 404, 429

POST /chat/direct Open (or start) my one-to-one chat with a colleague Idempotency-Key

Request

{
    "user_id": 9
}

Answer (200)

{
    "id": 51,
    "type": "direct",
    "title": "Asha Iyer",
    "project_id": null,
    "unread": 0,
    "last_read_message_id": null,
    "last_message": null,
    "last_message_at": null,
    "can_send": true,
    "muted": false,
    "muted_until": null,
    "members": [
        {
            "id": 7,
            "name": "Sam Rao",
            "avatar_url": null
        },
        {
            "id": 9,
            "name": "Asha Iyer",
            "avatar_url": null
        }
    ]
}

Errors: 401, 403, 422, 423, 429

GET /chat/files/{attachment} Download a chat file (signed link) public

The `url` of a message file: works without headers for about 30–60 minutes, for the person it was made for, while they can open the chat and the message is not deleted.

Errors: 403, 404

POST /chat/groups Create a group chat (staff) Idempotency-Key

People I may not talk to are left out (the web's rule).

Request

{
    "name": "Site team",
    "member_ids": [
        9,
        12
    ]
}

Answer (201)

{
    "type": "group",
    "title": "Site team",
    "id": 51,
    "project_id": null,
    "unread": 0,
    "last_read_message_id": null,
    "last_message": null,
    "last_message_at": null,
    "can_send": true,
    "muted": false,
    "muted_until": null,
    "members": [
        {
            "id": 7,
            "name": "Sam Rao",
            "avatar_url": null
        },
        {
            "id": 9,
            "name": "Asha Iyer",
            "avatar_url": null
        }
    ]
}

Errors: 401, 403, 422, 423, 429

DELETE /chat/messages/{message} Delete my message (within 15 minutes) Idempotency-Key

Hidden from the chat (kept for the account owner's review); other phones get a tombstone.

Answer (200)

{
    "ok": true,
    "id": 1204,
    "conversation_id": 44,
    "deleted": true
}

Errors: 401, 403, 404, 423

PATCH /chat/messages/{message} Edit my message (within 15 minutes) Idempotency-Key If-Match

Request

{
    "body": "Reached the site (gate 2)"
}

Answer (200)

{
    "edited": true,
    "body": "Reached the site (gate 2)",
    "id": 1204,
    "conversation_id": 44,
    "user": {
        "id": 9,
        "name": "Asha Iyer",
        "avatar_url": null
    },
    "deleted": false,
    "edited_at": null,
    "files": [
        {
            "id": 3,
            "name": "meter.jpg",
            "size": 120344,
            "mime_type": "image/jpeg",
            "is_image": true,
            "url": "https://tasksync.in/api/mobile/v1/chat/files/3?u=7&expires=1764073800&signature=…",
            "url_expires_at": "2026-11-25T12:30:00Z"
        }
    ],
    "reply_to": null,
    "mine": false,
    "read_by": 1,
    "can_edit": false,
    "editable_until": null,
    "created_at": "2026-11-25T11:58:01Z",
    "version": 1764071881000000,
    "updated_at": "2026-11-25T11:58:01Z"
}

Errors: 401, 403, 404, 422, 423

Devices

GET /devices The person's signed-in devices

Answer (200)

{
    "data": [
        {
            "id": 41,
            "name": "Asha's Pixel 8",
            "platform": "android",
            "app_version": "1.0.0",
            "last_used_at": "2026-11-25T11:58:01Z",
            "current": true
        }
    ]
}

Errors: 401

POST /devices/heartbeat Heartbeat: this phone is in use (online, last active, app version) Idempotency-Key (optional)

Send on app open and on resume, at most every 2–5 minutes (`next_heartbeat_seconds`). Stores this phone's last seen, app / OS version, model and whether the app is in front, and the person's "last active" in the company (X-Company-Id). The server writes at most once per phone every 120 s (`recorded: false` inside that window). Never send a location. Device-level (works in any company). `update` is the version policy for this phone (as in GET /meta).

Request

{
    "app_version": "1.3.2",
    "os_version": "Android 15",
    "device_model": "Pixel 8",
    "foreground": true
}

Answer (200)

{
    "ok": true,
    "recorded": true,
    "next_heartbeat_seconds": 120,
    "online": true,
    "update": {
        "platform": "android",
        "min_version": "1.2.0",
        "recommended_version": "1.4.0",
        "latest_version": "1.5.0",
        "store_url": "https://play.google.com/store/apps/details?id=in.tasksync.app",
        "release_notes": [
            {
                "version": "1.5.0",
                "notes": "Faster sync and offline photos."
            }
        ],
        "update_check_hours": 24,
        "message": null,
        "app_version": "1.3.2",
        "update": "recommended"
    }
}

Errors: 401, 422, 429

DELETE /devices/push Stop push notifications to this device Idempotency-Key (optional)

Answer (200)

{
    "status": "removed"
}

Errors: 401

POST /devices/push Register this device for push notifications Idempotency-Key (optional)

The person's notifications are sent here, payload `{type, title, body, data{entity, id, url}}`.

Request

{
    "provider": "fcm",
    "token": "dQw4w9WgXcQ:APA91b…"
}

Answer (200)

{
    "status": "registered"
}

Errors: 401, 422

Docs

GET /openapi.json This API described in OpenAPI 3.1 public

Public and free of data: built from the endpoint catalogue. Cached; send If-None-Match with the last ETag.

Answer (200)

{
    "openapi": "3.1.0",
    "info": {
        "title": "TaskSync mobile API",
        "version": "1"
    },
    "paths": {
        "…": "…"
    }
}

Errors: 429

E-commerce

GET /commerce/cases Support cases in my stores sync list

Returns, refunds, replacements, cancellations and complaints on orders of the person’s stores / vendors (each with `order_id`, so the app shows them on the order). Needs the service desk.

First load: Open cases + those closed in the last 30 days

Answer (200)

{
    "data": [
        {
            "id": 77,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "ticket_id": 4190,
            "number": "TKT-2026-00050",
            "ticket_status": "open",
            "assignee_id": 31,
            "type": "return",
            "type_label": "Return",
            "step": "requested",
            "step_label": "Requested",
            "next_steps": [
                {
                    "step": "approved",
                    "label": "Approved",
                    "notify": true,
                    "tracking": false
                }
            ],
            "case_flow": false,
            "order_id": 88213,
            "order_ref": "5550012",
            "connection_id": 3,
            "return_ref": null,
            "items": [
                {
                    "sku": "TSHIRT-M",
                    "name": "T-shirt (M)",
                    "qty": 1
                }
            ],
            "reason": "size",
            "reason_label": "Wrong size",
            "reason_note": null,
            "refund": {
                "amount": "999.00",
                "currency": "INR",
                "method": "original",
                "status": "pending",
                "status_label": "Pending"
            },
            "needs_approval": false,
            "closed": false,
            "step_changed_at": "2026-11-25T11:00:00Z",
            "closed_at": null,
            "created_at": "2026-11-25T11:00:00Z"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /commerce/cases/{case}/step Move a case on (one of its `next_steps`) Idempotency-Key If-Match

The case card’s buttons: the same code (history on the ticket, the store update the step implies, the customer e-mail when `notify`). Cases on a case flow are moved on the web.

Request

{
    "step": "approved",
    "notify": true
}

Answer (200)

{
    "store": [],
    "emailed": true,
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "ticket_id": 4190,
    "number": "TKT-2026-00050",
    "ticket_status": "open",
    "assignee_id": 31,
    "type": "return",
    "type_label": "Return",
    "step": "requested",
    "step_label": "Requested",
    "next_steps": [
        {
            "step": "approved",
            "label": "Approved",
            "notify": true,
            "tracking": false
        }
    ],
    "case_flow": false,
    "order_id": 88213,
    "order_ref": "5550012",
    "connection_id": 3,
    "return_ref": null,
    "items": [
        {
            "sku": "TSHIRT-M",
            "name": "T-shirt (M)",
            "qty": 1
        }
    ],
    "reason": "size",
    "reason_label": "Wrong size",
    "reason_note": null,
    "refund": {
        "amount": "999.00",
        "currency": "INR",
        "method": "original",
        "status": "pending",
        "status_label": "Pending"
    },
    "needs_approval": false,
    "closed": false,
    "step_changed_at": "2026-11-25T11:00:00Z",
    "closed_at": null,
    "created_at": "2026-11-25T11:00:00Z"
}

Errors: 403, 404, 409, 422, 423

GET /commerce/orders Orders in my stores sync list

The Orders page’s orders for this person: owners / admins every store, team people their teams’ stores / vendors (archived stores and orders taken off the list left out). An order taken off the list comes as `deleted` (reason `deleted`); orders that leave the person’s store scope (team or store changes) as `no_access`. Lines, timeline and what can be sent to the store: GET /commerce/orders/{order}.

First load: Orders placed in the last 30 days + every order not yet closed or marked handled

Answer (200)

{
    "data": [
        {
            "id": 88213,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "connection_id": 3,
            "store": "Acme Shop",
            "number": "#10442",
            "ref": "5550012",
            "status": "Paid · Unfulfilled",
            "status_code": "paid:unfulfilled",
            "stage": "to_process",
            "stage_label": "To process",
            "stage_since": "2026-11-25T09:12:00Z",
            "closed": false,
            "open": true,
            "handled_at": null,
            "handled_by": null,
            "total": {
                "amount": "2499.00",
                "currency": "INR"
            },
            "placed_at": "2026-11-25T09:12:00Z",
            "customer": {
                "removed": false,
                "name": "Meera Shah",
                "email": "m••••@example.com",
                "country": "IN"
            },
            "vendor": null,
            "items_count": 2,
            "shipping": {
                "status": "not_shipped",
                "label": "Not shipped",
                "carrier": null,
                "tracking_number": null,
                "tracking_url": null,
                "shipped_at": null,
                "delivered_at": null,
                "city": "Pune",
                "state": "MH"
            },
            "payment": {
                "gateway": "razorpay",
                "type": "prepaid",
                "status_parts": [
                    {
                        "kind": "payment",
                        "label": "Paid"
                    },
                    {
                        "kind": "fulfilment",
                        "label": "Unfulfilled"
                    }
                ]
            },
            "marketplace": {
                "channel": "Website",
                "is_marketplace": false,
                "via": null,
                "fulfilled_by_marketplace": false,
                "ship_by": null
            },
            "url": "https://shop.example/admin/orders/5550012"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /commerce/orders/{order} One order with its lines, timeline, cases and store updates

Answer (200)

{
    "id": 88213,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "connection_id": 3,
    "store": "Acme Shop",
    "number": "#10442",
    "ref": "5550012",
    "status": "Paid · Unfulfilled",
    "status_code": "paid:unfulfilled",
    "stage": "to_process",
    "stage_label": "To process",
    "stage_since": "2026-11-25T09:12:00Z",
    "closed": false,
    "open": true,
    "handled_at": null,
    "handled_by": null,
    "total": {
        "amount": "2499.00",
        "currency": "INR"
    },
    "placed_at": "2026-11-25T09:12:00Z",
    "customer": {
        "removed": false,
        "name": "Meera Shah",
        "email": "m••••@example.com",
        "country": "IN"
    },
    "vendor": null,
    "items_count": 2,
    "shipping": {
        "status": "not_shipped",
        "label": "Not shipped",
        "carrier": null,
        "tracking_number": null,
        "tracking_url": null,
        "shipped_at": null,
        "delivered_at": null,
        "city": "Pune",
        "state": "MH"
    },
    "payment": {
        "gateway": "razorpay",
        "type": "prepaid",
        "status_parts": [
            {
                "kind": "payment",
                "label": "Paid"
            },
            {
                "kind": "fulfilment",
                "label": "Unfulfilled"
            }
        ]
    },
    "marketplace": {
        "channel": "Website",
        "is_marketplace": false,
        "via": null,
        "fulfilled_by_marketplace": false,
        "ship_by": null
    },
    "url": "https://shop.example/admin/orders/5550012",
    "lines": [
        {
            "sku": "TSHIRT-M",
            "name": "T-shirt (M)",
            "qty": 1,
            "price": 999
        }
    ],
    "shipments": [],
    "timeline": [
        {
            "kind": "placed",
            "text": "Received with status Paid · Unfulfilled",
            "stage": "To process",
            "at": "2026-11-25T09:12:00+00:00",
            "at_local": "25 Nov 2026, 14:42"
        }
    ],
    "tags": [],
    "note": null,
    "tasks": [],
    "tickets": [],
    "cases": [],
    "parts": [],
    "can_update": true,
    "store_actions": [
        "order.set_status",
        "order.add_note"
    ],
    "store_statuses": {
        "paid:unfulfilled": "Paid · Unfulfilled"
    },
    "can_mark_handled": true,
    "can_raise_case": true
}

Errors: 403, 404

POST /commerce/orders/{order}/cases Open a support case on an order (return, refund, replacement …) Idempotency-Key

The order page’s case form (needs the service desk and “Work tickets”): a desk ticket is opened with the case. Approval rules apply (`needs_approval`). JSON, or multipart with up to 6 photos / PDFs in `files[]`. A retry with the same Idempotency-Key never opens a second case.

Request

{
    "type": "return",
    "reason": "size",
    "items": [
        {
            "sku": "TSHIRT-M",
            "name": "T-shirt (M)",
            "qty": 1
        }
    ],
    "client_id": "tmp-3"
}

Answer (201)

{
    "client_id": "tmp-3",
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "ticket_id": 4190,
    "number": "TKT-2026-00050",
    "ticket_status": "open",
    "assignee_id": 31,
    "type": "return",
    "type_label": "Return",
    "step": "requested",
    "step_label": "Requested",
    "next_steps": [
        {
            "step": "approved",
            "label": "Approved",
            "notify": true,
            "tracking": false
        }
    ],
    "case_flow": false,
    "order_id": 88213,
    "order_ref": "5550012",
    "connection_id": 3,
    "return_ref": null,
    "items": [
        {
            "sku": "TSHIRT-M",
            "name": "T-shirt (M)",
            "qty": 1
        }
    ],
    "reason": "size",
    "reason_label": "Wrong size",
    "reason_note": null,
    "refund": {
        "amount": "999.00",
        "currency": "INR",
        "method": "original",
        "status": "pending",
        "status_label": "Pending"
    },
    "needs_approval": false,
    "closed": false,
    "step_changed_at": "2026-11-25T11:00:00Z",
    "closed_at": null,
    "created_at": "2026-11-25T11:00:00Z"
}

Errors: 403, 404, 422, 423

POST /commerce/orders/{order}/handled Mark handled (a stage in TaskSync only; the store is not changed) Idempotency-Key If-Match

Owners and admins, as the Orders page’s “Mark handled”. Audited.

Request

{
    "stage": "completed",
    "note": "Delivered by hand."
}

Answer (200)

{
    "message": "Marked handled (Completed) in TaskSync. The store is not changed.",
    "stage": "completed",
    "stage_label": "Completed",
    "closed": true,
    "open": false,
    "id": 88213,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "connection_id": 3,
    "store": "Acme Shop",
    "number": "#10442",
    "ref": "5550012",
    "status": "Paid · Unfulfilled",
    "status_code": "paid:unfulfilled",
    "stage_since": "2026-11-25T09:12:00Z",
    "handled_at": null,
    "handled_by": null,
    "total": {
        "amount": "2499.00",
        "currency": "INR"
    },
    "placed_at": "2026-11-25T09:12:00Z",
    "customer": {
        "removed": false,
        "name": "Meera Shah",
        "email": "m••••@example.com",
        "country": "IN"
    },
    "vendor": null,
    "items_count": 2,
    "shipping": {
        "status": "not_shipped",
        "label": "Not shipped",
        "carrier": null,
        "tracking_number": null,
        "tracking_url": null,
        "shipped_at": null,
        "delivered_at": null,
        "city": "Pune",
        "state": "MH"
    },
    "payment": {
        "gateway": "razorpay",
        "type": "prepaid",
        "status_parts": [
            {
                "kind": "payment",
                "label": "Paid"
            },
            {
                "kind": "fulfilment",
                "label": "Unfulfilled"
            }
        ]
    },
    "marketplace": {
        "channel": "Website",
        "is_marketplace": false,
        "via": null,
        "fulfilled_by_marketplace": false,
        "ship_by": null
    },
    "url": "https://shop.example/admin/orders/5550012"
}

Errors: 403, 404, 409, 422, 423

POST /commerce/orders/{order}/store-actions Update the store / marketplace: status, staff note, tracking, pack, dispatch, cancel Idempotency-Key If-Match

The order page’s “Update the store”, through the same code: only the updates switched on for the store, by owners / admins (team people when the store allows it, on orders of their teams’ tasks). This is a call to the store or marketplace: when it refuses or cannot be reached → 422 `store_update_failed` with its answer (kept in the order’s history). `type`: order.set_status (`status` = one of the store’s statuses, `comment`, `notify`), order.add_note (`note`), order.add_tracking (`tracking_number`, `carrier`, `url`, `notify`), order.pack (`invoice_number`, `tax_rate`), order.ready_to_dispatch, order.cancel (`reason`, `comment`), order.mark_delivered.

Request

{
    "type": "order.add_note",
    "note": "Customer asked to deliver after 6 pm."
}

Answer (200)

{
    "store_update": {
        "ok": true,
        "message": "Done.",
        "action_id": 9012
    },
    "id": 88213,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "connection_id": 3,
    "store": "Acme Shop",
    "number": "#10442",
    "ref": "5550012",
    "status": "Paid · Unfulfilled",
    "status_code": "paid:unfulfilled",
    "stage": "to_process",
    "stage_label": "To process",
    "stage_since": "2026-11-25T09:12:00Z",
    "closed": false,
    "open": true,
    "handled_at": null,
    "handled_by": null,
    "total": {
        "amount": "2499.00",
        "currency": "INR"
    },
    "placed_at": "2026-11-25T09:12:00Z",
    "customer": {
        "removed": false,
        "name": "Meera Shah",
        "email": "m••••@example.com",
        "country": "IN"
    },
    "vendor": null,
    "items_count": 2,
    "shipping": {
        "status": "not_shipped",
        "label": "Not shipped",
        "carrier": null,
        "tracking_number": null,
        "tracking_url": null,
        "shipped_at": null,
        "delivered_at": null,
        "city": "Pune",
        "state": "MH"
    },
    "payment": {
        "gateway": "razorpay",
        "type": "prepaid",
        "status_parts": [
            {
                "kind": "payment",
                "label": "Paid"
            },
            {
                "kind": "fulfilment",
                "label": "Unfulfilled"
            }
        ]
    },
    "marketplace": {
        "channel": "Website",
        "is_marketplace": false,
        "via": null,
        "fulfilled_by_marketplace": false,
        "ship_by": null
    },
    "url": "https://shop.example/admin/orders/5550012"
}

Errors: 403, 404, 409, 422, 423

GET /commerce/reference Pickers: my stores, stages, shipping statuses, case types and reasons

Small and whole every time (`meta.full` true): replace the app’s copy. Each store lists the store updates this person may send and the store’s own order statuses.

Answer (200)

{
    "data": {
        "stores": [
            {
                "id": 3,
                "name": "Acme Shop",
                "platform": "shopify",
                "platform_label": "Shopify",
                "marketplace": false,
                "store_actions": [
                    "order.set_status",
                    "order.add_note"
                ],
                "statuses": {
                    "paid:unfulfilled": "Paid · Unfulfilled"
                }
            }
        ],
        "stages": [
            {
                "key": "to_process",
                "label": "To process",
                "closed": false
            }
        ],
        "shipping_statuses": [
            {
                "key": "shipped",
                "label": "Shipped"
            }
        ],
        "handled_stages": [
            "completed",
            "cancelled"
        ],
        "store_actions": {
            "order.set_status": "Change the order status"
        },
        "cancel_reasons": {
            "not_enough_inventory": "Not enough stock"
        },
        "cases": {
            "types": {
                "return": "Return"
            },
            "reasons": {
                "return": {
                    "size": "Wrong size"
                }
            },
            "methods": {
                "original": "Original payment method"
            },
            "refundTypes": [
                "return",
                "refund",
                "cancellation"
            ],
            "steps": {
                "requested": "Requested"
            }
        },
        "me": {
            "id": 31,
            "manages": true,
            "can_work_cases": true,
            "can_approve_cases": true
        }
    },
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

E-commerce hub

GET /commerce/dashboard Today at a glance: orders, to process / ship, packing, returns waiting, low stock

Counted in the person’s scope (store scope for orders, warehouses for stock and packing, the returns’ scope). `packing`, `low_stock` need the Inventory add-on (null otherwise); `returns_waiting` is the Inventory returns by stage, or open return cases without it. Kept 60 seconds. Hub users (403 otherwise). 30 a minute.

Answer (200)

{
    "today": "2026-11-30",
    "orders_today": 14,
    "orders_to_process": 6,
    "ready_to_ship": 3,
    "packing": {
        "to_pick": 4,
        "to_pack": 2,
        "packed": 3,
        "needs_stock": 1
    },
    "returns_waiting": {
        "incoming": 2,
        "to_inspect": 1,
        "to_decide": 0
    },
    "low_stock": 5,
    "inventory": true
}

Errors: 403, 429

POST /commerce/inventory/adjust Receive, adjust (with a reason) or write off stock Idempotency-Key

Inventory → Stock’s “Adjust”, the same action: “Move stock”, the person’s warehouses, marketplace warehouses read-only, lots / serials, the stock ledger and the audit; `unit_cost` follows the role’s field rules. Answers the SKU with its new stock.

Request

{
    "action": "adjustment",
    "sku_id": 551,
    "warehouse_id": 2,
    "qty": -2,
    "reason": "damaged",
    "note": "Torn in the rack"
}

Answer (200)

{
    "message": "Stock adjusted.",
    "id": 551,
    "sku": "TSHIRT-M-BLK",
    "title": "Black / M",
    "kind": "standard",
    "status": "active",
    "barcode": "8901234567890",
    "barcodes": [
        "8901234567890"
    ],
    "image_url": null,
    "product": {
        "id": 120,
        "name": "Classic T-shirt",
        "brand": "Salasar",
        "category": "Apparel",
        "hsn": "6109"
    },
    "components": [],
    "currency": "INR",
    "mrp": "999.00",
    "price": "799.00",
    "sale_price": null,
    "cost": null,
    "stock": [
        {
            "warehouse_id": 2,
            "warehouse": "Pune DC",
            "code": "PNQ",
            "type": "own",
            "on_hand": 40,
            "reserved": 6,
            "available": 34,
            "expired": 0,
            "on_hold": 0,
            "held_available": false,
            "damaged": 1,
            "in_transit": 0,
            "low_stock": 10,
            "low": false,
            "bin": "A-03"
        }
    ],
    "totals": {
        "on_hand": 40,
        "available": 34
    },
    "updated_at": "2026-11-29T10:00:00Z"
}

Errors: 403, 404, 422, 423

POST /commerce/inventory/count Count one SKU at one warehouse (a stock count) Idempotency-Key

Makes a stock count of that SKU through Inventory → Counts’ own code (“Count stock”), sets what was found and submits it. Posted at once when the person may post counts there and no approval chain is on; otherwise it waits for review / approval on the web (`count.status`). A SKU already in an open count of the warehouse → 422. 201 with the count and the SKU.

Request

{
    "sku_id": 551,
    "warehouse_id": 2,
    "qty": 38
}

Answer (201)

{
    "count": {
        "id": 77,
        "number": "CNT-0077",
        "status": "posted"
    },
    "message": "Counted and posted.",
    "id": 551,
    "sku": "TSHIRT-M-BLK",
    "title": "Black / M",
    "kind": "standard",
    "status": "active",
    "barcode": "8901234567890",
    "barcodes": [
        "8901234567890"
    ],
    "image_url": null,
    "product": {
        "id": 120,
        "name": "Classic T-shirt",
        "brand": "Salasar",
        "category": "Apparel",
        "hsn": "6109"
    },
    "components": [],
    "currency": "INR",
    "mrp": "999.00",
    "price": "799.00",
    "sale_price": null,
    "cost": null,
    "stock": [
        {
            "warehouse_id": 2,
            "warehouse": "Pune DC",
            "code": "PNQ",
            "type": "own",
            "on_hand": 40,
            "reserved": 6,
            "available": 34,
            "expired": 0,
            "on_hold": 0,
            "held_available": false,
            "damaged": 1,
            "in_transit": 0,
            "low_stock": 10,
            "low": false,
            "bin": "A-03"
        }
    ],
    "totals": {
        "on_hand": 40,
        "available": 34
    },
    "updated_at": "2026-11-29T10:00:00Z"
}

Errors: 403, 422, 423

GET /commerce/inventory/lookup Find products: by name, SKU, variant, or an exact barcode / pack barcode (20 at most)

Inventory’s SKU picker, plus stock totals in the person’s warehouses. Needs the E-commerce hub and the Inventory & Warehouses add-on (403 plan_required) and “See inventory” (403 forbidden); only the warehouses the person may see (warehouse limits).

Query

qName, SKU or barcode (1–100 characters)

Answer (200)

{
    "data": [
        {
            "id": 551,
            "sku": "TSHIRT-M-BLK",
            "label": "TSHIRT-M-BLK — Classic T-shirt · Black / M",
            "kind": "standard",
            "unit": "pcs",
            "packs": [],
            "pack_id": null,
            "tracking": null,
            "stock": {
                "on_hand": 40,
                "reserved": 6,
                "available": 34,
                "damaged": 1,
                "in_transit": 0
            }
        }
    ]
}

Errors: 403, 422, 429

GET /commerce/inventory/reference Pickers, whole each time: my warehouses, adjust actions and reasons, return stages / grades / dispositions, what I may do

Answer (200)

{
    "data": {
        "warehouses": [
            {
                "id": 2,
                "name": "Pune DC",
                "code": "PNQ",
                "type": "own",
                "read_only": false,
                "can_move": true
            }
        ],
        "adjust_actions": {
            "receipt": "Receive",
            "adjustment": "Adjust",
            "write_off": "Write off"
        },
        "reasons": {
            "count": "Stock count",
            "damaged": "Damaged"
        },
        "return_stages": {
            "arrived": "Arrived — QC to do"
        },
        "return_types": {
            "rto": "Courier return (RTO)"
        },
        "grades": {
            "A": "A — as new"
        },
        "dispositions": {
            "restock": "Restock"
        },
        "media_kinds": {
            "photo": "Photo"
        },
        "fulfilment_tabs": [
            {
                "key": "pack",
                "label": "To pack"
            }
        ],
        "me": {
            "id": 31,
            "moves_stock": true,
            "counts": true,
            "fulfils": true,
            "sees_cost": false,
            "returns": true
        }
    },
    "deleted": [],
    "meta": {
        "server_time": "2026-11-30T09:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /commerce/inventory/scan What a scanned code is (barcode, SKU, QR label, GS1, serial, bin) with its stock

Inventory’s “Scan to find”: `result.kind` item / bin / unknown; an item carries `skuInfo`, `stock[]` (my warehouses), lot / serial. Needs the E-commerce hub and the Inventory & Warehouses add-on (403 plan_required) and “See inventory” (403 forbidden); only the warehouses the person may see (warehouse limits).

Query

codeThe scanned text (max 200)

Answer (200)

{
    "result": {
        "kind": "item",
        "skuInfo": {
            "sku_id": 551,
            "sku": "TSHIRT-M-BLK",
            "title": "Black / M"
        },
        "stock": [
            {
                "warehouse_id": 2,
                "warehouse": "Pune DC",
                "code": "PNQ",
                "type": "own",
                "on_hand": 40,
                "reserved": 6,
                "available": 34,
                "expired": 0,
                "on_hold": 0,
                "held_available": false,
                "damaged": 1,
                "in_transit": 0,
                "low_stock": 10,
                "low": false,
                "bin": "A-03"
            }
        ],
        "can_add": false
    }
}

Errors: 403, 422, 429

GET /commerce/inventory/skus/{sku} One product / SKU with stock per warehouse

Prices follow the role’s field rules (MRP / price / sale price null when hidden); `cost` only for people who see costs (“Buy stock” and cost not hidden), as on the web. Needs the E-commerce hub and the Inventory & Warehouses add-on (403 plan_required) and “See inventory” (403 forbidden); only the warehouses the person may see (warehouse limits).

Answer (200)

{
    "id": 551,
    "sku": "TSHIRT-M-BLK",
    "title": "Black / M",
    "kind": "standard",
    "status": "active",
    "barcode": "8901234567890",
    "barcodes": [
        "8901234567890"
    ],
    "image_url": null,
    "product": {
        "id": 120,
        "name": "Classic T-shirt",
        "brand": "Salasar",
        "category": "Apparel",
        "hsn": "6109"
    },
    "components": [],
    "currency": "INR",
    "mrp": "999.00",
    "price": "799.00",
    "sale_price": null,
    "cost": null,
    "stock": [
        {
            "warehouse_id": 2,
            "warehouse": "Pune DC",
            "code": "PNQ",
            "type": "own",
            "on_hand": 40,
            "reserved": 6,
            "available": 34,
            "expired": 0,
            "on_hold": 0,
            "held_available": false,
            "damaged": 1,
            "in_transit": 0,
            "low_stock": 10,
            "low": false,
            "bin": "A-03"
        }
    ],
    "totals": {
        "on_hand": 40,
        "available": 34
    },
    "updated_at": "2026-11-29T10:00:00Z"
}

Errors: 403, 404, 429

GET /commerce/packing The packing queue of one warehouse: to pick, to pack, packed (ready to ship), needs stock, handed over

Inventory → Fulfilment’s tabs (“Pick and pack”; warehouses the person works in). 50 a page (`page` 1–20). Handover to the courier stays on the web. Without the Inventory add-on, orders to ship are the orders list (stage to_process / processing, `shipping.status` ready) with their store updates (order.pack / order.ready_to_dispatch).

Query

warehouse_id
tab
page

Answer (200)

{
    "data": [
        {
            "id": 3301,
            "order_id": 88213,
            "number": "#10442",
            "channel": "Salasar Shop",
            "status": "to_pack",
            "status_label": "To pack",
            "courier": "fastship",
            "awb": "AWB99812",
            "ship_by": "2026-11-30T12:30:00Z",
            "late": false,
            "units": 2,
            "packed": 0,
            "short": 0
        }
    ],
    "warehouses": [
        {
            "id": 2,
            "name": "Pune DC",
            "code": "PNQ"
        }
    ],
    "warehouse_id": 2,
    "tab": "pack",
    "counts": {
        "pick": 4,
        "pack": 2,
        "packed": 3,
        "needs": 1,
        "done": 12
    },
    "meta": {
        "page": 1,
        "has_more": false
    }
}

Errors: 403, 404, 422, 429

POST /commerce/packing/find Find the order to pack by number / AWB / label Idempotency-Key

The pack screen’s scan: 404 none here; 409 `ambiguous` with `error.choices` when a label fits several orders (send one back as `allocation_id`).

Request

{
    "warehouse_id": 2,
    "code": "AWB99812"
}

Answer (200)

{
    "allocation": {
        "id": 3301,
        "status": "to_pack",
        "status_label": "To pack",
        "order": {
            "id": 88213,
            "number": "#10442"
        },
        "lines": [
            {
                "id": 1,
                "sku": "TSHIRT-M-BLK",
                "units": 2,
                "packed": 0
            }
        ],
        "complete": false,
        "missing": []
    }
}

Errors: 403, 404, 409, 422

POST /commerce/packing/picked Mark orders picked (To pick → To pack) Idempotency-Key

Request

{
    "ids": [
        3301
    ]
}

Answer (200)

{
    "message": "1 order marked picked."
}

Errors: 403, 422, 423

POST /commerce/packing/{allocation}/done Packed (every line scanned; 422 otherwise) Idempotency-Key

Request

{}

Answer (200)

{
    "allocation": {
        "id": 3301,
        "status": "packed",
        "complete": true
    },
    "message": "Packed."
}

Errors: 403, 404, 422, 423

POST /commerce/packing/{allocation}/scan Scan an item into the parcel Idempotency-Key

`result`: ok / over / wrong / unknown with a message, and the allocation as it is now.

Request

{
    "code": "8901234567890"
}

Answer (200)

{
    "result": "ok",
    "message": "TSHIRT-M-BLK 1 of 2.",
    "line_id": 1,
    "tag_needed": false,
    "allocation": {
        "id": 3301,
        "status": "to_pack",
        "complete": false
    }
}

Errors: 403, 404, 422

GET /commerce/returns Returns and RTOs I may see sync list

Inventory → Returns (customer returns, courier RTOs, unknown arrivals) in the person’s stores and warehouses — the same scope class as the web. A return changes when it, its units (QC / disposition) or its claims do. Merged into another → `deleted`. `next`: what can be done (arrive, qc, dispose, close …). Needs the Inventory add-on.

First load: Open returns + those closed or changed in the last 30 days

Answer (200)

{
    "data": [
        {
            "id": 640,
            "version": 1764072000000000,
            "updated_at": "2026-11-30T08:00:00Z",
            "number": "RT-640",
            "type": "rto",
            "type_label": "Courier return (RTO)",
            "source": "courier",
            "source_label": "Courier (RTO)",
            "stage": "in_transit",
            "stage_label": "In transit",
            "channel": "Salasar Shop",
            "channel_status": null,
            "order_id": 88213,
            "order_ref": "5550012",
            "tracking_number": "AWB99812",
            "carrier": "FastShip",
            "reason": "Customer not reachable",
            "warehouse": "Pune DC",
            "expected_warehouse_id": 2,
            "warehouse_id": null,
            "units": null,
            "claim_due_at": null,
            "claim_overdue": false,
            "channel_delivered": false,
            "merged_into": null,
            "created_at": "2026-11-28T06:00:00Z",
            "arrived_at": null,
            "closed_at": null,
            "amount": 799,
            "currency": "INR",
            "next": [
                "arrive",
                "cancel"
            ]
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /commerce/returns/{return} One return: lines, units (QC, disposition), claims, timeline, QC checklist

Answer (200)

{
    "message": "Saved.",
    "stage": "in_transit",
    "id": 640,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T08:00:00Z",
    "number": "RT-640",
    "type": "rto",
    "type_label": "Courier return (RTO)",
    "source": "courier",
    "source_label": "Courier (RTO)",
    "stage_label": "In transit",
    "channel": "Salasar Shop",
    "channel_status": null,
    "order_id": 88213,
    "order_ref": "5550012",
    "tracking_number": "AWB99812",
    "carrier": "FastShip",
    "reason": "Customer not reachable",
    "warehouse": "Pune DC",
    "expected_warehouse_id": 2,
    "warehouse_id": null,
    "units": null,
    "claim_due_at": null,
    "claim_overdue": false,
    "channel_delivered": false,
    "merged_into": null,
    "created_at": "2026-11-28T06:00:00Z",
    "arrived_at": null,
    "closed_at": null,
    "amount": 799,
    "currency": "INR",
    "next": [
        "arrive",
        "cancel"
    ],
    "unit_rows": [
        {
            "id": 9001,
            "unit_no": 1,
            "line_name": "Classic T-shirt Black / M",
            "sku": {
                "id": 551,
                "sku": "TSHIRT-M-BLK",
                "title": "Black / M",
                "barcode": "8901234567890"
            },
            "grade": null,
            "disposition": null,
            "suggest": null
        }
    ],
    "lines": [],
    "media": [],
    "claims": [],
    "timeline": [],
    "checklist": {
        "grade": true,
        "photos_min": 1
    }
}

Errors: 403, 404, 429

POST /commerce/returns/{return}/close Close a return (every unit decided, no claim open) Idempotency-Key If-Match

Request

{
    "note": "No claim"
}

Answer (200)

{
    "message": "Saved.",
    "stage": "closed",
    "id": 640,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T08:00:00Z",
    "number": "RT-640",
    "type": "rto",
    "type_label": "Courier return (RTO)",
    "source": "courier",
    "source_label": "Courier (RTO)",
    "stage_label": "In transit",
    "channel": "Salasar Shop",
    "channel_status": null,
    "order_id": 88213,
    "order_ref": "5550012",
    "tracking_number": "AWB99812",
    "carrier": "FastShip",
    "reason": "Customer not reachable",
    "warehouse": "Pune DC",
    "expected_warehouse_id": 2,
    "warehouse_id": null,
    "units": null,
    "claim_due_at": null,
    "claim_overdue": false,
    "channel_delivered": false,
    "merged_into": null,
    "created_at": "2026-11-28T06:00:00Z",
    "arrived_at": null,
    "closed_at": null,
    "amount": 799,
    "currency": "INR",
    "next": [
        "arrive",
        "cancel"
    ],
    "unit_rows": [
        {
            "id": 9001,
            "unit_no": 1,
            "line_name": "Classic T-shirt Black / M",
            "sku": {
                "id": 551,
                "sku": "TSHIRT-M-BLK",
                "title": "Black / M",
                "barcode": "8901234567890"
            },
            "grade": null,
            "disposition": null,
            "suggest": null
        }
    ],
    "lines": [],
    "media": [],
    "claims": [],
    "timeline": [],
    "checklist": {
        "grade": true,
        "photos_min": 1
    }
}

Errors: 403, 404, 409, 422, 423

POST /commerce/returns/{return}/decide Decide each unit: restock / damaged / vendor / dispose (moves stock) Idempotency-Key If-Match

Returns’ disposition: restock into a warehouse (lot for lot-tracked SKUs), to damaged stock, back to the vendor, or dispose (a note needed). The stock ledger moves as on the web; a unit already decided the same way is fine (idempotent).

Request

{
    "units": [
        {
            "id": 9001,
            "action": "restock",
            "warehouse_id": 2
        }
    ]
}

Answer (200)

{
    "message": "Saved.",
    "stage": "closed",
    "id": 640,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T08:00:00Z",
    "number": "RT-640",
    "type": "rto",
    "type_label": "Courier return (RTO)",
    "source": "courier",
    "source_label": "Courier (RTO)",
    "stage_label": "In transit",
    "channel": "Salasar Shop",
    "channel_status": null,
    "order_id": 88213,
    "order_ref": "5550012",
    "tracking_number": "AWB99812",
    "carrier": "FastShip",
    "reason": "Customer not reachable",
    "warehouse": "Pune DC",
    "expected_warehouse_id": 2,
    "warehouse_id": null,
    "units": null,
    "claim_due_at": null,
    "claim_overdue": false,
    "channel_delivered": false,
    "merged_into": null,
    "created_at": "2026-11-28T06:00:00Z",
    "arrived_at": null,
    "closed_at": null,
    "amount": 799,
    "currency": "INR",
    "next": [
        "arrive",
        "cancel"
    ],
    "unit_rows": [
        {
            "id": 9001,
            "unit_no": 1,
            "line_name": "Classic T-shirt Black / M",
            "sku": {
                "id": 551,
                "sku": "TSHIRT-M-BLK",
                "title": "Black / M",
                "barcode": "8901234567890"
            },
            "grade": null,
            "disposition": null,
            "suggest": null
        }
    ],
    "lines": [],
    "media": [],
    "claims": [],
    "timeline": [],
    "checklist": {
        "grade": true,
        "photos_min": 1
    }
}

Errors: 403, 404, 409, 422, 423

POST /commerce/returns/{return}/inspect Inspect (QC) units: grade, scanned code, tag, note, serial Idempotency-Key If-Match

Returns’ QC: the company’s checklist (scan the SKU, tag, photos — upload them first with /media; when every unit is graded the photos are required). All units graded → stage `qc`.

Request

{
    "units": [
        {
            "id": 9001,
            "grade": "A",
            "scanned_code": "8901234567890"
        }
    ]
}

Answer (200)

{
    "message": "Saved.",
    "stage": "qc",
    "id": 640,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T08:00:00Z",
    "number": "RT-640",
    "type": "rto",
    "type_label": "Courier return (RTO)",
    "source": "courier",
    "source_label": "Courier (RTO)",
    "stage_label": "In transit",
    "channel": "Salasar Shop",
    "channel_status": null,
    "order_id": 88213,
    "order_ref": "5550012",
    "tracking_number": "AWB99812",
    "carrier": "FastShip",
    "reason": "Customer not reachable",
    "warehouse": "Pune DC",
    "expected_warehouse_id": 2,
    "warehouse_id": null,
    "units": null,
    "claim_due_at": null,
    "claim_overdue": false,
    "channel_delivered": false,
    "merged_into": null,
    "created_at": "2026-11-28T06:00:00Z",
    "arrived_at": null,
    "closed_at": null,
    "amount": 799,
    "currency": "INR",
    "next": [
        "arrive",
        "cancel"
    ],
    "unit_rows": [
        {
            "id": 9001,
            "unit_no": 1,
            "line_name": "Classic T-shirt Black / M",
            "sku": {
                "id": 551,
                "sku": "TSHIRT-M-BLK",
                "title": "Black / M",
                "barcode": "8901234567890"
            },
            "grade": null,
            "disposition": null,
            "suggest": null
        }
    ],
    "lines": [],
    "media": [],
    "claims": [],
    "timeline": [],
    "checklist": {
        "grade": true,
        "photos_min": 1
    }
}

Errors: 403, 404, 409, 422, 423

POST /commerce/returns/{return}/media Add QC photos / video / tag pictures (multipart files[]) Idempotency-Key If-Match

Request

{
    "kind": "photo",
    "unit_id": 9001
}

Answer (201)

{
    "message": "Saved.",
    "stage": "arrived",
    "id": 640,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T08:00:00Z",
    "number": "RT-640",
    "type": "rto",
    "type_label": "Courier return (RTO)",
    "source": "courier",
    "source_label": "Courier (RTO)",
    "stage_label": "In transit",
    "channel": "Salasar Shop",
    "channel_status": null,
    "order_id": 88213,
    "order_ref": "5550012",
    "tracking_number": "AWB99812",
    "carrier": "FastShip",
    "reason": "Customer not reachable",
    "warehouse": "Pune DC",
    "expected_warehouse_id": 2,
    "warehouse_id": null,
    "units": null,
    "claim_due_at": null,
    "claim_overdue": false,
    "channel_delivered": false,
    "merged_into": null,
    "created_at": "2026-11-28T06:00:00Z",
    "arrived_at": null,
    "closed_at": null,
    "amount": 799,
    "currency": "INR",
    "next": [
        "arrive",
        "cancel"
    ],
    "unit_rows": [
        {
            "id": 9001,
            "unit_no": 1,
            "line_name": "Classic T-shirt Black / M",
            "sku": {
                "id": 551,
                "sku": "TSHIRT-M-BLK",
                "title": "Black / M",
                "barcode": "8901234567890"
            },
            "grade": null,
            "disposition": null,
            "suggest": null
        }
    ],
    "lines": [],
    "media": [],
    "claims": [],
    "timeline": [],
    "checklist": {
        "grade": true,
        "photos_min": 1
    }
}

Errors: 403, 404, 409, 422, 423

POST /commerce/returns/{return}/receive Receive at the warehouse (Arrived) Idempotency-Key If-Match

Returns’ “Arrived”: “Move stock”; into `warehouse_id` (a limited person: one of theirs; default the expected one). No stock moves yet.

Request

{
    "warehouse_id": 2
}

Answer (200)

{
    "message": "Saved.",
    "stage": "arrived",
    "id": 640,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T08:00:00Z",
    "number": "RT-640",
    "type": "rto",
    "type_label": "Courier return (RTO)",
    "source": "courier",
    "source_label": "Courier (RTO)",
    "stage_label": "In transit",
    "channel": "Salasar Shop",
    "channel_status": null,
    "order_id": 88213,
    "order_ref": "5550012",
    "tracking_number": "AWB99812",
    "carrier": "FastShip",
    "reason": "Customer not reachable",
    "warehouse": "Pune DC",
    "expected_warehouse_id": 2,
    "warehouse_id": null,
    "units": null,
    "claim_due_at": null,
    "claim_overdue": false,
    "channel_delivered": false,
    "merged_into": null,
    "created_at": "2026-11-28T06:00:00Z",
    "arrived_at": null,
    "closed_at": null,
    "amount": 799,
    "currency": "INR",
    "next": [
        "arrive",
        "cancel"
    ],
    "unit_rows": [
        {
            "id": 9001,
            "unit_no": 1,
            "line_name": "Classic T-shirt Black / M",
            "sku": {
                "id": 551,
                "sku": "TSHIRT-M-BLK",
                "title": "Black / M",
                "barcode": "8901234567890"
            },
            "grade": null,
            "disposition": null,
            "suggest": null
        }
    ],
    "lines": [],
    "media": [],
    "claims": [],
    "timeline": [],
    "checklist": {
        "grade": true,
        "photos_min": 1
    }
}

Errors: 403, 404, 409, 422, 423

Inbox

GET /me/counts Badge counts in one call

Unread notifications (this company + notifications with no company), unread chat messages (the web's chat badge), unread announcements, and (MA10) `approvals` waiting for my decision (the web menu's count), `leave_approvals` (leave to decide outside any chain) and `desk_attention` (tickets at risk or breached — the web menu's desk count), in the X-Company-Id company. A count the person has no access to is left out. POST /sync carries the same in `meta.counts`.

Answer (200)

{
    "counts": {
        "notifications": 4,
        "chat": 3,
        "announcements": 1,
        "approvals": 2,
        "leave_approvals": 1,
        "desk_attention": 3
    },
    "company_id": 5
}

Errors: 401, 403

Leave

GET /leave/balances My leave balance per type, this leave year sync list

Always a full answer. `left` null = no allowance set.

First load: This leave year

Answer (200)

{
    "data": [
        {
            "id": 3,
            "key": "annual",
            "name": "Annual leave",
            "color": "emerald",
            "paid": true,
            "leave_year": "Apr 2026 – Mar 2027",
            "year_from": "2026-04-01",
            "year_to": "2027-03-31",
            "allowance": 18,
            "taken": 4,
            "pending": 1,
            "left": 14,
            "carried": 0,
            "accrued": null,
            "lapsed": 0,
            "encashed": 0,
            "carry_expires": null
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /leave/holidays The company's holidays (company calendar) sync list

Optional holidays have `optional: true`. A holiday removed on the web comes with `status: cancelled` (drop it from the calendar); one deleted outright in `deleted`.

First load: This leave year and the next

Answer (200)

{
    "data": [
        {
            "id": 501,
            "title": "Diwali",
            "from": "2026-11-08",
            "to": "2026-11-08",
            "weekday": "Sunday",
            "optional": false,
            "status": "approved",
            "movable": true,
            "note": null
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /leave/people Who can cover for me (picker) sync list

Always a full answer: the company's own people, without me.

First load: Everyone who can cover

Answer (200)

{
    "data": [
        {
            "id": 14,
            "name": "Nik Rao"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /leave/requests My leave requests, every status sync list

First load: Requests ending in this or the previous leave year

Answer (200)

{
    "data": [
        {
            "id": 77,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T10:00:00Z",
            "person": {
                "id": 12,
                "name": "Mia One"
            },
            "kind": "annual",
            "kind_label": "Annual leave",
            "from": "2026-12-02",
            "to": "2026-12-02",
            "half_day": false,
            "half_day_part": null,
            "days": 1,
            "note": "Family visit",
            "status": "pending",
            "reject_reason": null,
            "cover": {
                "id": 14,
                "name": "Nik Rao"
            },
            "decided_at": null,
            "waiting_on": "Waiting on Asha Rao (step 1 of 2)",
            "approval_id": 311,
            "advance_days": 0,
            "advance_reason": null,
            "attachment": null,
            "edited": false,
            "can_decide": false,
            "can_cancel": true
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /leave/requests Apply for leave Idempotency-Key

The Leave page's rules: the type's half days, notice, balance and document rules; one request per day; advance days need `advance: true` and `advance_reason`. JSON, or multipart/form-data with `attachment` (10 MB, the web's blocked file types) where the type asks for a document. It waits for approval (`status: pending`, `waiting_on`), or is recorded at once where the web does that (owners / admins).

Request

{
    "client_id": "lv-1",
    "kind": "annual",
    "from_date": "2026-12-02",
    "to_date": "2026-12-02",
    "note": "Family visit",
    "cover_user_id": 14
}

Answer (201)

{
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T10:00:00Z",
    "person": {
        "id": 12,
        "name": "Mia One"
    },
    "kind": "annual",
    "kind_label": "Annual leave",
    "from": "2026-12-02",
    "to": "2026-12-02",
    "half_day": false,
    "half_day_part": null,
    "days": 1,
    "note": "Family visit",
    "status": "pending",
    "reject_reason": null,
    "cover": {
        "id": 14,
        "name": "Nik Rao"
    },
    "decided_at": null,
    "waiting_on": "Waiting on Asha Rao (step 1 of 2)",
    "approval_id": 311,
    "advance_days": 0,
    "advance_reason": null,
    "attachment": null,
    "edited": false,
    "can_decide": false,
    "can_cancel": true,
    "client_id": "lv-1",
    "message": "Leave sent for approval."
}

Errors: 403, 422, 423

POST /leave/requests/{leave}/cancel Cancel (withdraw) one of my requests Idempotency-Key If-Match

A waiting request can always be withdrawn; approved leave only where the web allows (owners / admins). Already decided otherwise → 409.

Answer (200)

{
    "status": "cancelled",
    "can_cancel": false,
    "waiting_on": null,
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T10:00:00Z",
    "person": {
        "id": 12,
        "name": "Mia One"
    },
    "kind": "annual",
    "kind_label": "Annual leave",
    "from": "2026-12-02",
    "to": "2026-12-02",
    "half_day": false,
    "half_day_part": null,
    "days": 1,
    "note": "Family visit",
    "reject_reason": null,
    "cover": {
        "id": 14,
        "name": "Nik Rao"
    },
    "decided_at": null,
    "approval_id": 311,
    "advance_days": 0,
    "advance_reason": null,
    "attachment": null,
    "edited": false,
    "can_decide": false,
    "message": "Cancelled (kept in the history)."
}

Errors: 403, 404, 409, 422, 423

GET /leave/types Leave types I may apply for (with their rules) sync list

Always a full answer.

First load: The company's active types

Answer (200)

{
    "data": [
        {
            "id": 3,
            "key": "annual",
            "name": "Annual leave",
            "color": "emerald",
            "paid": true,
            "half_day_allowed": true,
            "min_notice_days": 3,
            "document_after_days": null,
            "advance": "none"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

Location & attendance

GET /location My location notice, recording and work sites

The same block as `location` on GET /me: the notice's state (accepted / outdated / declined / withdrawn / none) and wording, whether to show it now, work-moment recording on / off, and — when check-in is switched on for me — my sites, the ping interval and today's check-in.

Answer (200)

{
    "consent": "accepted",
    "consent_label": "notice accepted",
    "notice_required": false,
    "notice": {
        "title": "Your work location is recorded",
        "changed": null,
        "paragraphs": [
            "Your company records where you are when you sign in and at some work moments …"
        ],
        "accept": "OK, I understand",
        "decline": "No, don't use my location"
    },
    "recording": true,
    "moments": [
        "login",
        "task_complete",
        "timer_start",
        "timer_stop"
    ],
    "recording_me": true,
    "geo_tracked": true,
    "geo": {
        "interval_min": 10,
        "in_hours": true,
        "sites": [
            {
                "id": 2,
                "name": "Pune plant",
                "outside_rule": "reason"
            }
        ],
        "today": {
            "checked_in": false,
            "at": null,
            "site": null,
            "auto_closed": false
        },
        "inside": null
    }
}

Errors: 401, 403

POST /location/check-in Check in at a work site (GPS fix) Idempotency-Key

The web's check-in (GeoController::check). Outside every site: `422 reason_required` (send again with `reason`) or `422 outside_site` when the site does not allow it; `422 already_checked_in`. `403 geo_not_enabled` when check-in is not switched on for me; `409 location_consent_required` (with `consent`) until the notice is accepted. 20 a minute. MA14: send `accuracy` (or `accuracy_m`), `is_mock`, `provider`, `battery`. A mock location or a fix less precise than the site's radius is flagged for admins — or, when the company refuses them, `422 mock_location` / `422 poor_accuracy` (with `flags`).

Request

{
    "latitude": 18.5204,
    "longitude": 73.8567,
    "accuracy": 12,
    "is_mock": false,
    "provider": "fused",
    "battery": 64
}

Answer (200)

{
    "ok": true,
    "message": "Checked in at Pune plant.",
    "status": {
        "accepted": true,
        "consent": "accepted",
        "interval_min": 10,
        "in_hours": true,
        "sites": [
            {
                "id": 2,
                "name": "Pune plant",
                "rule": "reason"
            }
        ],
        "today": {
            "checked_in": true,
            "at": "09:12",
            "site": "Pune plant",
            "auto_closed": false
        },
        "inside": true
    },
    "location": {
        "consent": "accepted",
        "consent_label": "notice accepted",
        "notice_required": false,
        "notice": {
            "title": "Your work location is recorded",
            "changed": null,
            "paragraphs": [
                "Your company records where you are when you sign in and at some work moments …"
            ],
            "accept": "OK, I understand",
            "decline": "No, don't use my location"
        },
        "recording": true,
        "moments": [
            "login",
            "task_complete",
            "timer_start",
            "timer_stop"
        ],
        "recording_me": true,
        "geo_tracked": true,
        "geo": {
            "interval_min": 10,
            "in_hours": true,
            "sites": [
                {
                    "id": 2,
                    "name": "Pune plant",
                    "outside_rule": "reason"
                }
            ],
            "today": {
                "checked_in": false,
                "at": null,
                "site": null,
                "auto_closed": false
            },
            "inside": null
        }
    }
}

Errors: 401, 403, 409, 422, 423, 429

POST /location/check-out Check out (GPS fix) Idempotency-Key

As check-in; `422 not_checked_in` when there is no open check-in. A check-out is never refused for its fix (MA14: flagged only).

Request

{
    "latitude": 18.5204,
    "longitude": 73.8567,
    "accuracy": 15
}

Answer (200)

{
    "ok": true,
    "message": "Checked out at Pune plant.",
    "status": {
        "accepted": true,
        "consent": "accepted",
        "interval_min": 10,
        "in_hours": true,
        "sites": [
            {
                "id": 2,
                "name": "Pune plant",
                "rule": "reason"
            }
        ],
        "today": {
            "checked_in": true,
            "at": "09:12",
            "site": "Pune plant",
            "auto_closed": false
        },
        "inside": true
    },
    "location": {
        "consent": "accepted",
        "consent_label": "notice accepted",
        "notice_required": false,
        "notice": {
            "title": "Your work location is recorded",
            "changed": null,
            "paragraphs": [
                "Your company records where you are when you sign in and at some work moments …"
            ],
            "accept": "OK, I understand",
            "decline": "No, don't use my location"
        },
        "recording": true,
        "moments": [
            "login",
            "task_complete",
            "timer_start",
            "timer_stop"
        ],
        "recording_me": true,
        "geo_tracked": true,
        "geo": {
            "interval_min": 10,
            "in_hours": true,
            "sites": [
                {
                    "id": 2,
                    "name": "Pune plant",
                    "outside_rule": "reason"
                }
            ],
            "today": {
                "checked_in": false,
                "at": null,
                "site": null,
                "auto_closed": false
            },
            "inside": null
        }
    }
}

Errors: 401, 403, 409, 422, 423, 429

POST /location/moments/{moment}/fix The GPS fix for a work moment Idempotency-Key (optional)

When an answer carries `X-Location-Request: <id>:<token>` (also `meta.location_request {id, token, expires_at}`) — a task completed, a timer started or stopped while the company records work moments — the app takes one GPS fix and sends it here with the token. Own, once, within 10 minutes; `404` otherwise. If the person refuses the phone's permission, send nothing: the approximate city from the internet address stays.

Request

{
    "token": "Qx3…(40 characters)",
    "latitude": 18.5204,
    "longitude": 73.8567,
    "accuracy": 9
}

Answer (200)

{
    "ok": true
}

Errors: 401, 404, 422, 429

POST /location/notice Answer the location notice (accept / decline) Idempotency-Key

The notice's two buttons, as on the web (EmployeeActivityController: notice / decline). Accept covers what is recorded now; declining records nothing (check-in then needs an admin to mark attendance by hand). Changed later under Profile → Location on the web.

Request

{
    "answer": "accept"
}

Answer (200)

{
    "ok": true,
    "message": null,
    "location": {
        "consent": "accepted",
        "consent_label": "notice accepted",
        "notice_required": false,
        "notice": {
            "title": "Your work location is recorded",
            "changed": null,
            "paragraphs": [
                "Your company records where you are when you sign in and at some work moments …"
            ],
            "accept": "OK, I understand",
            "decline": "No, don't use my location"
        },
        "recording": true,
        "moments": [
            "login",
            "task_complete",
            "timer_start",
            "timer_stop"
        ],
        "recording_me": true,
        "geo_tracked": true,
        "geo": {
            "interval_min": 10,
            "in_hours": true,
            "sites": [
                {
                    "id": 2,
                    "name": "Pune plant",
                    "outside_rule": "reason"
                }
            ],
            "today": {
                "checked_in": false,
                "at": null,
                "site": null,
                "auto_closed": false
            },
            "inside": null
        }
    }
}

Errors: 401, 403, 422, 423

POST /location/ping Foreground check while checked in Idempotency-Key (optional)

Only while the app is open (foreground), I am checked in and `geo.in_hours`, every `geo.interval_min` minutes — never in the background. Only leaving and coming back is kept (`change`: left / returned / null). `status: null` when nothing is tracked (stop pinging). 30 a minute. MA14: `tracking: false` — not checked in or outside working hours: nothing was stored, stop pinging; `ignored: "mock_location"` — a mock position the company refuses changed nothing.

Request

{
    "latitude": 18.5207,
    "longitude": 73.8571,
    "accuracy": 20
}

Answer (200)

{
    "change": null,
    "status": {
        "accepted": true,
        "consent": "accepted",
        "interval_min": 10,
        "in_hours": true,
        "sites": [
            {
                "id": 2,
                "name": "Pune plant",
                "rule": "reason"
            }
        ],
        "today": {
            "checked_in": true,
            "at": "09:12",
            "site": "Pune plant",
            "auto_closed": false
        },
        "inside": true
    },
    "tracking": true
}

Errors: 401, 403, 422, 429

GET /location/sites My work sites with their circles (for arrival reminders)

MA14: my sites in this company — centre, `radius_m`, hours — so the phone can register OS geofences and show a local "You're at Pune plant — check in?" reminder (the nearest 20 on iOS). The phone decides locally and sends nothing until the person taps Check in; the server's own check stays authoritative. `403 geo_not_enabled` when check-in is not on for me, `409 location_consent_required` until the notice is accepted. 30 a minute.

Answer (200)

{
    "data": [
        {
            "id": 2,
            "name": "Pune plant",
            "latitude": 18.5204,
            "longitude": 73.8567,
            "radius_m": 200,
            "outside_rule": "reason",
            "work_start": "09:00",
            "work_end": "18:00",
            "work_days": [
                1,
                2,
                3,
                4,
                5,
                6
            ],
            "in_hours": true
        }
    ],
    "timezone": "Asia/Kolkata",
    "fix_rule": "flag",
    "reminders": {
        "enabled": true,
        "max_regions_ios": 20,
        "max_regions_android": 100,
        "advice": "…",
        "enter_text": "You're at {site} — check in?",
        "exit_text": "You left {site} — check out?"
    },
    "meta": {
        "server_time": "2026-12-01T09:00:00Z"
    }
}

Errors: 401, 403, 409, 429

Notification settings

GET /me/notification-settings My notification settings for the phone

Push per category (Settings → Notifications groups + `chat_messages`), the web's per-type push switches (`types`), sound per priority, vibrate, quiet hours (shared with the web: days, own time zone, urgent breaks through, `no_push` = no push at all then), do not disturb, muted chats and projects in this company, and whether push is configured on the server / this phone has a token.

Answer (200)

{
    "push": {
        "configured": false,
        "this_device": {
            "registered": true,
            "provider": "fcm"
        }
    },
    "categories": [
        {
            "key": "tasks",
            "label": "Tasks",
            "push": true
        },
        {
            "key": "chat",
            "label": "Chat and conversations",
            "push": true
        },
        {
            "key": "chat_messages",
            "label": "Every new chat message (mentions are under \"Chat and conversations\")",
            "push": false
        }
    ],
    "types": [
        {
            "type": "task_assigned",
            "label": "Task assigned to you",
            "category": "tasks",
            "push": true,
            "priority": "high"
        }
    ],
    "sounds": {
        "urgent": true,
        "high": true,
        "normal": false,
        "low": false
    },
    "vibrate": true,
    "quiet_hours": {
        "enabled": true,
        "from": "22:00",
        "to": "07:00",
        "days": [
            1,
            2,
            3,
            4,
            5
        ],
        "timezone": "Asia/Kolkata",
        "timezone_own": null,
        "urgent_breaks_through": true,
        "no_push": false,
        "now": false
    },
    "dnd_until": null,
    "mutes": {
        "chats": [
            {
                "conversation_id": 44,
                "until": "2026-12-01T18:00:00Z"
            }
        ],
        "projects": [
            {
                "project_id": 3,
                "title": "Plant 4 retrofit",
                "until": "forever"
            }
        ]
    },
    "mute_options": [
        "1h",
        "8h",
        "forever"
    ],
    "channels": [
        {
            "id": "ts_urgent",
            "priority": "urgent",
            "name": "Urgent (SLA breaches, escalations)",
            "sound": true
        }
    ],
    "saved": true
}

Errors: 401, 403

PUT /me/notification-settings Change my notification settings (any part) Idempotency-Key

Send only what changes; the answer is the full settings (as GET). Quiet hours are shared with the web.

Request

{
    "categories": {
        "chat_messages": false
    },
    "sounds": {
        "normal": false
    },
    "quiet_hours": {
        "enabled": true,
        "from": "22:00",
        "to": "07:00",
        "days": [
            1,
            2,
            3,
            4,
            5
        ],
        "timezone": null,
        "urgent_breaks_through": true
    }
}

Answer (200)

{
    "push": {
        "configured": false,
        "this_device": {
            "registered": true,
            "provider": "fcm"
        }
    },
    "categories": [
        {
            "key": "tasks",
            "label": "Tasks",
            "push": true
        },
        {
            "key": "chat",
            "label": "Chat and conversations",
            "push": true
        },
        {
            "key": "chat_messages",
            "label": "Every new chat message (mentions are under \"Chat and conversations\")",
            "push": false
        }
    ],
    "types": [
        {
            "type": "task_assigned",
            "label": "Task assigned to you",
            "category": "tasks",
            "push": true,
            "priority": "high"
        }
    ],
    "sounds": {
        "urgent": true,
        "high": true,
        "normal": false,
        "low": false
    },
    "vibrate": true,
    "quiet_hours": {
        "enabled": true,
        "from": "22:00",
        "to": "07:00",
        "days": [
            1,
            2,
            3,
            4,
            5
        ],
        "timezone": "Asia/Kolkata",
        "timezone_own": null,
        "urgent_breaks_through": true,
        "no_push": false,
        "now": false
    },
    "dnd_until": null,
    "mutes": {
        "chats": [
            {
                "conversation_id": 44,
                "until": "2026-12-01T18:00:00Z"
            }
        ],
        "projects": [
            {
                "project_id": 3,
                "title": "Plant 4 retrofit",
                "until": "forever"
            }
        ]
    },
    "mute_options": [
        "1h",
        "8h",
        "forever"
    ],
    "channels": [
        {
            "id": "ts_urgent",
            "priority": "urgent",
            "name": "Urgent (SLA breaches, escalations)",
            "sound": true
        }
    ],
    "saved": true
}

Errors: 401, 403, 422, 423

POST /me/notification-settings/test Send a test notification to this phone (per priority) Idempotency-Key (optional)

After my settings (silent in quiet hours / with that sound off). `sending: false` with `reason` (not_configured — no FCM credentials on the server; no_push_token; apns_not_supported). 6 calls per 10 minutes.

Request

{
    "priority": "all"
}

Answer (200)

{
    "ok": true,
    "sending": false,
    "reason": "not_configured",
    "results": [
        {
            "priority": "urgent",
            "channel_id": "ts_urgent",
            "sound": true,
            "silent_reason": null,
            "vibrate": true,
            "queued": false
        }
    ]
}

Errors: 401, 403, 422, 429

DELETE /projects/{project}/mute Unmute a project Idempotency-Key

Answer (200)

{
    "ok": true,
    "project_id": 3,
    "muted": false,
    "muted_until": null
}

Errors: 401, 403, 404, 429

POST /projects/{project}/mute Mute a project's notifications on the phone (1 h, 8 h, until turned back on) Idempotency-Key

Notifications about the project and its tasks come as silent sync hints (still in the app's list); urgent kinds still notify.

Request

{
    "for": "forever"
}

Answer (200)

{
    "ok": true,
    "project_id": 3,
    "muted": true,
    "muted_until": "forever"
}

Errors: 401, 403, 404, 422, 429

Notifications

GET /notifications My notifications (this company + those with no company) sync list

Ids are UUID strings. Reading one (here or on the web) changes it, so it comes again with `read: true`. Notifications are never deleted (no tombstones). `link` is the app screen for `action_url` (see the deep link table).

First load: Unread notifications of any age + everything of the last 30 days

Answer (200)

{
    "data": [
        {
            "id": "9b2f6c1e-4a7d-4c55-8a51-2f0e6f1d7a10",
            "type": "task_assigned",
            "title": "Task assigned to you",
            "body": "Replace UPS battery",
            "icon": "check-circle",
            "icon_color": "primary",
            "action_url": "/tasks/12",
            "link": {
                "screen": "task",
                "params": {
                    "task_id": 12
                },
                "area": "tasks"
            },
            "priority": "high",
            "data": {
                "task_id": 12
            },
            "organization_id": 5,
            "read": false,
            "read_at": null,
            "created_at": "2026-11-25T11:58:01Z"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403

POST /notifications/read-all Mark all read in this company Idempotency-Key

`until` (optional): only those that arrived by then — send the server_time of the list the person saw.

Request

{
    "until": "2026-11-25T12:00:00Z"
}

Answer (200)

{
    "ok": true,
    "marked": 4,
    "unread": 0
}

Errors: 401, 403, 422, 423

POST /notifications/{notification}/read Mark one notification read (idempotent) Idempotency-Key

Answer (200)

{
    "read": true,
    "read_at": "2026-11-25T12:00:00Z",
    "id": "9b2f6c1e-4a7d-4c55-8a51-2f0e6f1d7a10",
    "type": "task_assigned",
    "title": "Task assigned to you",
    "body": "Replace UPS battery",
    "icon": "check-circle",
    "icon_color": "primary",
    "action_url": "/tasks/12",
    "link": {
        "screen": "task",
        "params": {
            "task_id": 12
        },
        "area": "tasks"
    },
    "priority": "high",
    "data": {
        "task_id": 12
    },
    "organization_id": 5,
    "created_at": "2026-11-25T11:58:01Z"
}

Errors: 401, 403, 404, 423

Realtime

POST /broadcasting/auth Sign a private / presence channel subscription

The Pusher / Reverb client's auth endpoint, with the device token. The web's channel rules (routes/channels.php): presence-chat.{id} for people who may open that chat. 503 realtime_unavailable while live updates are off.

Request

{
    "socket_id": "123456.7890123",
    "channel_name": "presence-chat.44"
}

Answer (200)

{
    "auth": "tasksync-key:5d3f…",
    "channel_data": "{\"user_id\":7,\"user_info\":{\"id\":7,\"name\":\"Sam Rao\"}}"
}

Errors: 401, 403, 422, 503

GET /realtime How to connect for live updates (Pusher protocol / Reverb)

`enabled: false` (e.g. staging) → no live connection: check for changes every `poll_seconds`.

Answer (200)

{
    "enabled": true,
    "driver": "reverb",
    "key": "tasksync-key",
    "host": "ws.tasksync.in",
    "port": 443,
    "scheme": "https",
    "cluster": null,
    "auth_endpoint": "/api/mobile/v1/broadcasting/auth",
    "channels": {
        "chat": "presence-chat.{conversation_id}"
    },
    "events": {
        "chat": {
            "name": "changed",
            "payload": {
                "what": "new|edited|deleted",
                "message_id": 123
            }
        }
    },
    "poll_seconds": {
        "open_chat": 3,
        "lists": 30,
        "background": 300
    }
}

Errors: 401, 403

Sales CRM

GET /sales/activities Activities on those leads (calls, meetings, notes…), done and planned sync list

Activities of the leads in the same view, and activities planned for me on any lead I see. Older ones: GET /sales/leads/{lead}/activities.

First load: Planned (not done, not cancelled) + done in the last 90 days

Query

viewMine (leads I own, default) or Team (every lead I may see; only for people the web offers "Team" to)

Answer (200)

{
    "data": [
        {
            "id": 5021,
            "version": 1764072100000000,
            "updated_at": "2026-11-25T12:01:40Z",
            "lead_id": 812,
            "type": "call",
            "label": "Call",
            "direction": "out",
            "outcome": "connected",
            "outcome_label": "Connected",
            "subject": null,
            "notes": "Wants a demo next week",
            "duration_minutes": 6,
            "channel": "mobile",
            "user_id": 7,
            "user": "Asha Rao",
            "due_at": null,
            "done_at": "2026-11-25T12:01:40Z",
            "cancelled": false,
            "planned": false,
            "overdue": false
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /sales/activities/{activity}/cancel Cancel a planned activity Idempotency-Key If-Match

Answer (200)

{
    "client_id": null,
    "activity": {
        "cancelled": true,
        "planned": false,
        "id": 5022,
        "type": "meeting",
        "due_at": "2026-11-27T05:30:00Z",
        "done_at": null,
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "label": "Call",
        "direction": "out",
        "outcome": "connected",
        "outcome_label": "Connected",
        "subject": null,
        "notes": "Wants a demo next week",
        "duration_minutes": 6,
        "channel": "mobile",
        "user_id": 7,
        "user": "Asha Rao",
        "overdue": false
    },
    "next_activity": null,
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "Cancelled."
}

Errors: 403, 404, 422, 423

POST /sales/activities/{activity}/done Mark a planned follow-up / meeting done (with the next step) Idempotency-Key If-Match

Request

{
    "outcome": "interested",
    "notes": "Demo went well",
    "next_step": "3d"
}

Answer (200)

{
    "client_id": null,
    "activity": {
        "done_at": "2026-11-27T06:30:00Z",
        "planned": false,
        "id": 5022,
        "type": "meeting",
        "due_at": "2026-11-27T05:30:00Z",
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "label": "Call",
        "direction": "out",
        "outcome": "connected",
        "outcome_label": "Connected",
        "subject": null,
        "notes": "Wants a demo next week",
        "duration_minutes": 6,
        "channel": "mobile",
        "user_id": 7,
        "user": "Asha Rao",
        "cancelled": false,
        "overdue": false
    },
    "next_activity": null,
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "Done · next follow-up 30 Nov, 10:00 AM."
}

Errors: 403, 404, 422, 423

POST /sales/activities/{activity}/reschedule Move a planned activity to another time (the old one is cancelled, the same one planned again) Idempotency-Key If-Match

Request

{
    "due_at": "2026-11-28T05:30:00Z"
}

Answer (200)

{
    "activity": {
        "id": 5030,
        "due_at": "2026-11-28T05:30:00Z",
        "type": "meeting",
        "done_at": null,
        "planned": true,
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "label": "Call",
        "direction": "out",
        "outcome": "connected",
        "outcome_label": "Connected",
        "subject": null,
        "notes": "Wants a demo next week",
        "duration_minutes": 6,
        "channel": "mobile",
        "user_id": 7,
        "user": "Asha Rao",
        "cancelled": false,
        "overdue": false
    },
    "cancelled": {
        "cancelled": true,
        "planned": false,
        "id": 5022,
        "type": "meeting",
        "due_at": "2026-11-27T05:30:00Z",
        "done_at": null,
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "label": "Call",
        "direction": "out",
        "outcome": "connected",
        "outcome_label": "Connected",
        "subject": null,
        "notes": "Wants a demo next week",
        "duration_minutes": 6,
        "channel": "mobile",
        "user_id": 7,
        "user": "Asha Rao",
        "overdue": false
    },
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "Rescheduled."
}

Errors: 403, 404, 422, 423

POST /sales/check-ins/{checkin}/out Check out of a visit (a meeting it was for is marked done) Idempotency-Key

Request

{
    "note": "Quotation promised by Friday"
}

Answer (200)

{
    "checkin": {
        "out_at": "2026-11-25T07:00:00+00:00",
        "id": 301,
        "lead_id": 812,
        "user_id": 7,
        "in_at": "2026-11-25T06:10:00+00:00",
        "lat": 18.5204,
        "lng": 73.8567,
        "accuracy": 12,
        "distance": 40,
        "note": "Met the purchase head",
        "status": "ok",
        "photo": true,
        "offline": false,
        "photo_url": "https://tasksync.in/api/mobile/v1/sales/check-ins/301/photo?org=3&expires=1764051000&signature=…"
    },
    "checkins": null,
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "Checked out."
}

Errors: 403, 404, 422, 423

GET /sales/check-ins/{checkin}/photo A check-in photo through its signed link (photo_url, valid at least 10 minutes) public

Use the `photo_url` of a check-in as it is (no token: the link is signed for at least 10 minutes). Expired → 403: read the lead again for a fresh link.

Answer (200)

"(the image)"

Errors: 403, 404

GET /sales/leads Leads I may see — mine or my team's sync list

The web's Leads scope (everyone / department / team / own, plus leads I added and ones waiting for my approval). Deleted and merged leads come as tombstones (`deleted[]`; a merged one has `merged_into_id` — open that lead instead). A lead given to someone else leaves my Mine list (`no_access`), and my Team list when I can no longer see it. When a lead is dropped, drop its activities too. Values of fields hidden for my role are null (V3).

First load: Open and parked leads + leads that went to Won / Lost / Invalid in the last 30 days

Query

viewMine (leads I own, default) or Team (every lead I may see; only for people the web offers "Team" to)

Answer (200)

{
    "data": [
        {
            "id": 812,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T11:58:01Z",
            "title": "Office chairs for 40 staff",
            "contact_name": "Ravi Kumar",
            "company_name": "Kumar Traders",
            "phone": "+91 98450 11111",
            "email": "ravi@kumartraders.in",
            "source": "indiamart",
            "origin": "IndiaMART",
            "value": {
                "amount": "250000.00",
                "currency": "INR"
            },
            "city": "Pune",
            "country": "IN",
            "pipeline_id": 3,
            "stage_id": 14,
            "pending_stage_id": null,
            "status": "open",
            "owner_id": 7,
            "owner_name": "Asha Rao",
            "next_follow_up_at": "2026-11-26T04:30:00Z",
            "overdue": false,
            "contacted": true,
            "awaiting_response": false,
            "hot": true,
            "hot_why": "Value ≥ 2,00,000",
            "score": 72,
            "score_band": "hot",
            "stuck": false,
            "geo": {
                "state_code": "MH",
                "state": "Maharashtra",
                "zone": "W",
                "city": "Pune",
                "city_tier": 1,
                "pincode": "411001",
                "timezone": "Asia/Kolkata",
                "phone_e164": "+919845011111"
            },
            "fields": {
                "gst_number": "27ABCDE1234F1Z5"
            },
            "interests": [
                {
                    "id": 5,
                    "name": "Ergonomic chairs"
                }
            ],
            "next_planned": {
                "type": "meeting",
                "label": "Meeting",
                "what": "Demo at their office",
                "due_at": "2026-11-27T05:30:00Z"
            },
            "url": "/sales/leads/812"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /sales/leads Add a lead (client_id echoed; duplicate check as on the web) Idempotency-Key

The web's New lead: validation, assignment rules (or `owner_id` with crm.assign), own lead fields (`fields`), interests. A lead with the same phone or e-mail → 409 `duplicate` with `existing_lead_id` (when I may open it) — open it, or send again with `confirm_duplicate: true` (the new lead is linked to it).

Request

{
    "client_id": "tmp-lead-1",
    "title": "Office chairs for 40 staff",
    "contact_name": "Ravi Kumar",
    "phone": "+91 98450 11111",
    "source": "manual",
    "value": 250000
}

Answer (201)

{
    "client_id": "tmp-lead-1",
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T11:58:01Z",
    "title": "Office chairs for 40 staff",
    "contact_name": "Ravi Kumar",
    "company_name": "Kumar Traders",
    "phone": "+91 98450 11111",
    "email": "ravi@kumartraders.in",
    "source": "indiamart",
    "origin": "IndiaMART",
    "value": {
        "amount": "250000.00",
        "currency": "INR"
    },
    "city": "Pune",
    "country": "IN",
    "pipeline_id": 3,
    "stage_id": 14,
    "pending_stage_id": null,
    "status": "open",
    "owner_id": 7,
    "owner_name": "Asha Rao",
    "next_follow_up_at": "2026-11-26T04:30:00Z",
    "overdue": false,
    "contacted": true,
    "awaiting_response": false,
    "hot": true,
    "hot_why": "Value ≥ 2,00,000",
    "score": 72,
    "score_band": "hot",
    "stuck": false,
    "geo": {
        "state_code": "MH",
        "state": "Maharashtra",
        "zone": "W",
        "city": "Pune",
        "city_tier": 1,
        "pincode": "411001",
        "timezone": "Asia/Kolkata",
        "phone_e164": "+919845011111"
    },
    "fields": {
        "gst_number": "27ABCDE1234F1Z5"
    },
    "interests": [
        {
            "id": 5,
            "name": "Ergonomic chairs"
        }
    ],
    "next_planned": {
        "type": "meeting",
        "label": "Meeting",
        "what": "Demo at their office",
        "due_at": "2026-11-27T05:30:00Z"
    },
    "url": "/sales/leads/812"
}

Errors: 403, 409, 422, 423

GET /sales/leads/{lead} One lead with its timeline, activities and check-ins (the lead page)

404 when it is not mine to see. 410 `gone` when it was deleted — with `merged_into_id` when it was merged: open that lead.

Answer (200)

{
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "timeline": [
        {
            "id": 90,
            "type": "stage",
            "body": "“New” → “Qualified”",
            "user": "Asha Rao",
            "at": "2026-11-25T11:58:01+00:00",
            "data": []
        }
    ],
    "activities": {
        "planned": [
            {
                "id": 5022,
                "type": "meeting",
                "due_at": "2026-11-27T05:30:00Z",
                "done_at": null,
                "planned": true,
                "version": 1764072100000000,
                "updated_at": "2026-11-25T12:01:40Z",
                "lead_id": 812,
                "label": "Call",
                "direction": "out",
                "outcome": "connected",
                "outcome_label": "Connected",
                "subject": null,
                "notes": "Wants a demo next week",
                "duration_minutes": 6,
                "channel": "mobile",
                "user_id": 7,
                "user": "Asha Rao",
                "cancelled": false,
                "overdue": false
            }
        ],
        "done": [
            {
                "id": 5021,
                "version": 1764072100000000,
                "updated_at": "2026-11-25T12:01:40Z",
                "lead_id": 812,
                "type": "call",
                "label": "Call",
                "direction": "out",
                "outcome": "connected",
                "outcome_label": "Connected",
                "subject": null,
                "notes": "Wants a demo next week",
                "duration_minutes": 6,
                "channel": "mobile",
                "user_id": 7,
                "user": "Asha Rao",
                "due_at": null,
                "done_at": "2026-11-25T12:01:40Z",
                "cancelled": false,
                "planned": false,
                "overdue": false
            }
        ],
        "counts": {
            "call": 3
        }
    },
    "checkins": {
        "list": [
            {
                "id": 301,
                "lead_id": 812,
                "user_id": 7,
                "in_at": "2026-11-25T06:10:00+00:00",
                "out_at": null,
                "lat": 18.5204,
                "lng": 73.8567,
                "accuracy": 12,
                "distance": 40,
                "note": "Met the purchase head",
                "status": "ok",
                "photo": true,
                "offline": false,
                "photo_url": "https://tasksync.in/api/mobile/v1/sales/check-ins/301/photo?org=3&expires=1764051000&signature=…"
            }
        ],
        "open": null,
        "place": null,
        "meetings": []
    },
    "can": {
        "create": true,
        "edit": true,
        "assign": false,
        "delete": false,
        "purge": false,
        "won_customer": false
    },
    "meta": {
        "server_time": "2026-11-25T12:00:00Z"
    }
}

Errors: 403, 404, 410

PATCH /sales/leads/{lead} Change a lead (only the fields sent; own lead fields in `fields`) Idempotency-Key If-Match

A field my role shows read-only → 422 "You can't change …"; a hidden one is ignored (V3, as on the web).

Request

{
    "value": 275000,
    "fields": {
        "gst_number": "27ABCDE1234F1Z5"
    }
}

Answer (200)

{
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T11:58:01Z",
    "title": "Office chairs for 40 staff",
    "contact_name": "Ravi Kumar",
    "company_name": "Kumar Traders",
    "phone": "+91 98450 11111",
    "email": "ravi@kumartraders.in",
    "source": "indiamart",
    "origin": "IndiaMART",
    "value": {
        "amount": "250000.00",
        "currency": "INR"
    },
    "city": "Pune",
    "country": "IN",
    "pipeline_id": 3,
    "stage_id": 14,
    "pending_stage_id": null,
    "status": "open",
    "owner_id": 7,
    "owner_name": "Asha Rao",
    "next_follow_up_at": "2026-11-26T04:30:00Z",
    "overdue": false,
    "contacted": true,
    "awaiting_response": false,
    "hot": true,
    "hot_why": "Value ≥ 2,00,000",
    "score": 72,
    "score_band": "hot",
    "stuck": false,
    "geo": {
        "state_code": "MH",
        "state": "Maharashtra",
        "zone": "W",
        "city": "Pune",
        "city_tier": 1,
        "pincode": "411001",
        "timezone": "Asia/Kolkata",
        "phone_e164": "+919845011111"
    },
    "fields": {
        "gst_number": "27ABCDE1234F1Z5"
    },
    "interests": [
        {
            "id": 5,
            "name": "Ergonomic chairs"
        }
    ],
    "next_planned": {
        "type": "meeting",
        "label": "Meeting",
        "what": "Demo at their office",
        "due_at": "2026-11-27T05:30:00Z"
    },
    "url": "/sales/leads/812"
}

Errors: 403, 404, 422, 423

GET /sales/leads/{lead}/activities A lead's whole activity history, newest first (paged)

Query

before_idmeta.next_before_id of the previous page
limit

Answer (200)

{
    "data": [
        {
            "id": 5021,
            "version": 1764072100000000,
            "updated_at": "2026-11-25T12:01:40Z",
            "lead_id": 812,
            "type": "call",
            "label": "Call",
            "direction": "out",
            "outcome": "connected",
            "outcome_label": "Connected",
            "subject": null,
            "notes": "Wants a demo next week",
            "duration_minutes": 6,
            "channel": "mobile",
            "user_id": 7,
            "user": "Asha Rao",
            "due_at": null,
            "done_at": "2026-11-25T12:01:40Z",
            "cancelled": false,
            "planned": false,
            "overdue": false
        }
    ],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "has_more": true,
        "next_before_id": 4980
    }
}

Errors: 403, 404, 422

POST /sales/leads/{lead}/activities Log a call (outcome, duration, notes, next step) / meeting / message, or plan one Idempotency-Key

mode=log: done now (or `done_at`). Logging a call or meeting on an open lead needs the next step (no lead without one): `next` (plan an activity) or `next_step` (tomorrow / 3d / week / date + next_step_at / none + no_next_reason) — else 422 on next_step. mode=plan: `due_at` (a follow-up call, a meeting…; for someone else needs crm.assign).

Request

{
    "client_id": "tmp-act-1",
    "mode": "log",
    "type": "call",
    "outcome": "connected",
    "duration_minutes": 6,
    "notes": "Wants a demo next week",
    "next": {
        "type": "meeting",
        "due_at": "2026-11-27T05:30:00Z",
        "subject": "Demo at their office"
    }
}

Answer (201)

{
    "client_id": "tmp-act-1",
    "activity": {
        "id": 5021,
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "type": "call",
        "label": "Call",
        "direction": "out",
        "outcome": "connected",
        "outcome_label": "Connected",
        "subject": null,
        "notes": "Wants a demo next week",
        "duration_minutes": 6,
        "channel": "mobile",
        "user_id": 7,
        "user": "Asha Rao",
        "due_at": null,
        "done_at": "2026-11-25T12:01:40Z",
        "cancelled": false,
        "planned": false,
        "overdue": false
    },
    "next_activity": {
        "id": 5022,
        "type": "meeting",
        "due_at": "2026-11-27T05:30:00Z",
        "done_at": null,
        "planned": true,
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "label": "Call",
        "direction": "out",
        "outcome": "connected",
        "outcome_label": "Connected",
        "subject": null,
        "notes": "Wants a demo next week",
        "duration_minutes": 6,
        "channel": "mobile",
        "user_id": 7,
        "user": "Asha Rao",
        "cancelled": false,
        "overdue": false
    },
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "Call logged and the next one planned."
}

Errors: 403, 404, 422, 423

POST /sales/leads/{lead}/call Click-to-call through the company's telephony (my phone / extension rings first) Idempotency-Key

Only through the connection set up in Sales → Settings → Telephony; 422 with the web's message when it is not set up, the lead has no number, I have no phone / extension, or someone is already on a call with the lead. Follow a PBX Panel call with GET …/call-status; log the outcome with POST …/activities.

Answer (201)

{
    "call": {
        "id": 77,
        "status": "ringing",
        "provider": "exotel",
        "direction": "out",
        "started_at": "2026-11-25T12:00:00+00:00"
    },
    "live": null,
    "message": "Calling — your phone rings first, then Ravi Kumar."
}

Errors: 403, 404, 422, 423, 429

GET /sales/leads/{lead}/call-status The live call on a lead (PBX Panel; null for other providers)

Query

watchingthe call id the app is following (answered as ended_id once it ends)

Answer (200)

{
    "live": {
        "id": 77,
        "status": "answered",
        "direction": "out",
        "by": "Asha Rao",
        "user_id": 7,
        "extension": "1046",
        "started_at": "2026-11-25T12:00:00+00:00",
        "answered_at": "2026-11-25T12:00:09+00:00"
    },
    "ended_id": null,
    "meta": {
        "server_time": "2026-11-25T12:00:10Z"
    }
}

Errors: 403, 404

POST /sales/leads/{lead}/check-in Field check-in at a lead (GPS with consent, note, photo — multipart) Idempotency-Key

Send latitude / longitude only when the person allowed location; otherwise location_status denied | unavailable (the time is still recorded). photo: jpg, jpeg, png, webp or heic up to 10 MB. One open check-in at a time ("Check out of … first."). recorded_offline: true for a check-in made offline and sent later.

Request

{
    "latitude": 18.5204,
    "longitude": 73.8567,
    "accuracy": 12,
    "location_status": "ok",
    "note": "Met the purchase head"
}

Answer (201)

{
    "client_id": null,
    "checkin": {
        "id": 301,
        "lead_id": 812,
        "user_id": 7,
        "in_at": "2026-11-25T06:10:00+00:00",
        "out_at": null,
        "lat": 18.5204,
        "lng": 73.8567,
        "accuracy": 12,
        "distance": 40,
        "note": "Met the purchase head",
        "status": "ok",
        "photo": true,
        "offline": false,
        "photo_url": "https://tasksync.in/api/mobile/v1/sales/check-ins/301/photo?org=3&expires=1764051000&signature=…"
    },
    "checkins": {
        "list": [
            {
                "id": 301,
                "lead_id": 812,
                "user_id": 7,
                "in_at": "2026-11-25T06:10:00+00:00",
                "out_at": null,
                "lat": 18.5204,
                "lng": 73.8567,
                "accuracy": 12,
                "distance": 40,
                "note": "Met the purchase head",
                "status": "ok",
                "photo": true,
                "offline": false,
                "photo_url": "https://tasksync.in/api/mobile/v1/sales/check-ins/301/photo?org=3&expires=1764051000&signature=…"
            }
        ],
        "open": {
            "id": 301,
            "lead_id": 812,
            "user_id": 7,
            "in_at": "2026-11-25T06:10:00+00:00",
            "out_at": null,
            "lat": 18.5204,
            "lng": 73.8567,
            "accuracy": 12,
            "distance": 40,
            "note": "Met the purchase head",
            "status": "ok",
            "photo": true,
            "offline": false,
            "photo_url": "https://tasksync.in/api/mobile/v1/sales/check-ins/301/photo?org=3&expires=1764051000&signature=…"
        },
        "place": null,
        "meetings": []
    },
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "Checked in."
}

Errors: 403, 404, 422, 423

POST /sales/leads/{lead}/follow-up Set, move or clear the lead's next follow-up Idempotency-Key If-Match

Request

{
    "at": "2026-11-28T05:00:00Z"
}

Answer (200)

{
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T11:58:01Z",
    "title": "Office chairs for 40 staff",
    "contact_name": "Ravi Kumar",
    "company_name": "Kumar Traders",
    "phone": "+91 98450 11111",
    "email": "ravi@kumartraders.in",
    "source": "indiamart",
    "origin": "IndiaMART",
    "value": {
        "amount": "250000.00",
        "currency": "INR"
    },
    "city": "Pune",
    "country": "IN",
    "pipeline_id": 3,
    "stage_id": 14,
    "pending_stage_id": null,
    "status": "open",
    "owner_id": 7,
    "owner_name": "Asha Rao",
    "next_follow_up_at": "2026-11-26T04:30:00Z",
    "overdue": false,
    "contacted": true,
    "awaiting_response": false,
    "hot": true,
    "hot_why": "Value ≥ 2,00,000",
    "score": 72,
    "score_band": "hot",
    "stuck": false,
    "geo": {
        "state_code": "MH",
        "state": "Maharashtra",
        "zone": "W",
        "city": "Pune",
        "city_tier": 1,
        "pincode": "411001",
        "timezone": "Asia/Kolkata",
        "phone_e164": "+919845011111"
    },
    "fields": {
        "gst_number": "27ABCDE1234F1Z5"
    },
    "interests": [
        {
            "id": 5,
            "name": "Ergonomic chairs"
        }
    ],
    "next_planned": {
        "type": "meeting",
        "label": "Meeting",
        "what": "Demo at their office",
        "due_at": "2026-11-27T05:30:00Z"
    },
    "url": "/sales/leads/812"
}

Errors: 403, 404, 422, 423

POST /sales/leads/{lead}/notes Add a note to the lead's timeline Idempotency-Key

Request

{
    "body": "Asked for the GST invoice format."
}

Answer (201)

{
    "client_id": null,
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T11:58:01Z",
    "title": "Office chairs for 40 staff",
    "contact_name": "Ravi Kumar",
    "company_name": "Kumar Traders",
    "phone": "+91 98450 11111",
    "email": "ravi@kumartraders.in",
    "source": "indiamart",
    "origin": "IndiaMART",
    "value": {
        "amount": "250000.00",
        "currency": "INR"
    },
    "city": "Pune",
    "country": "IN",
    "pipeline_id": 3,
    "stage_id": 14,
    "pending_stage_id": null,
    "status": "open",
    "owner_id": 7,
    "owner_name": "Asha Rao",
    "next_follow_up_at": "2026-11-26T04:30:00Z",
    "overdue": false,
    "contacted": true,
    "awaiting_response": false,
    "hot": true,
    "hot_why": "Value ≥ 2,00,000",
    "score": 72,
    "score_band": "hot",
    "stuck": false,
    "geo": {
        "state_code": "MH",
        "state": "Maharashtra",
        "zone": "W",
        "city": "Pune",
        "city_tier": 1,
        "pincode": "411001",
        "timezone": "Asia/Kolkata",
        "phone_e164": "+919845011111"
    },
    "fields": {
        "gst_number": "27ABCDE1234F1Z5"
    },
    "interests": [
        {
            "id": 5,
            "name": "Ergonomic chairs"
        }
    ],
    "next_planned": {
        "type": "meeting",
        "label": "Meeting",
        "what": "Demo at their office",
        "due_at": "2026-11-27T05:30:00Z"
    },
    "url": "/sales/leads/812"
}

Errors: 403, 404, 422, 423

POST /sales/leads/{lead}/stage Move a lead to a stage (won / lost with a reason) Idempotency-Key If-Match

The web's rules and messages: the stage's required fields (send them in `fields`), stage questions (422 with `error.questions` — answer them in `answers`), Lost needs `lost_reason`, Nurture `park.reengage_on`, Invalid `park.invalid_reason`. A stage that needs approval → 202 `pending_approval`.

Request

{
    "stage_id": 19,
    "lost_reason": "Bought elsewhere"
}

Answer (200)

{
    "status": "moved",
    "message": "Moved to “Lost”.",
    "lead": {
        "status": "lost",
        "stage_id": 19,
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "pending_stage_id": null,
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    }
}

Errors: 403, 404, 422, 423

GET /sales/leads/{lead}/stage-questions The questions a move into a stage must answer (ask them before POST …/stage)

Query

stage_idthe stage the lead is moving to

Answer (200)

{
    "sets": [
        {
            "set_id": 4,
            "name": "Qualification",
            "questions": [
                {
                    "key": "budget",
                    "label": "Budget confirmed?",
                    "type": "yes_no",
                    "required": true
                }
            ]
        }
    ]
}

Errors: 403, 404, 422

GET /sales/leads/{lead}/whatsapp A lead's WhatsApp messages (in and out, with delivery ticks) and the composer's state

First read: the last `limit` messages, oldest first. Then `updated_since=<meta.server_time>`: only messages written or whose status moved (sent → delivered → read, failed with the provider's reason in `error`) since — messages are never deleted, so there are no tombstones. `state`: connected, window_open / window_ends_at, text_off_reason (why free text is off), opted_out, can_send, media, unavailable (TaskSync's account switched off for the company). A phone hidden by field rules is null.

Query

updated_since
limit

Answer (200)

{
    "data": [
        {
            "id": 9001,
            "version": 1764072100000000,
            "updated_at": "2026-11-25T12:01:40Z",
            "lead_id": 812,
            "activity_id": 5030,
            "direction": "out",
            "kind": "template",
            "body": "Hello Ravi, thanks for asking about Chairs.",
            "template_name": "lead_hello",
            "status": "delivered",
            "error": null,
            "sent_at": "2026-11-25T12:00:05Z",
            "delivered_at": "2026-11-25T12:00:09Z",
            "read_at": null,
            "created_at": "2026-11-25T12:00:00Z",
            "by": "Asha Rao"
        }
    ],
    "state": {
        "connected": true,
        "phone": "+919845011111",
        "display_phone": "+91 80000 11111",
        "opted_out": false,
        "can_send": true,
        "window_open": false,
        "window_ends_at": null,
        "last_inbound_at": "2026-11-23T09:00:00+00:00",
        "text_off_reason": "Last customer message more than 24 h ago — use a template.",
        "media": true,
        "can_send_here": true
    },
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "has_more": false
    }
}

Errors: 403, 404, 422

POST /sales/leads/{lead}/whatsapp Send a WhatsApp from the lead (text inside the 24-hour window, else an approved template) Idempotency-Key

The web's Send WhatsApp: `{body}` only within 24 hours of the customer's last message, otherwise `{template_id, vars[]}` (every {{n}} filled); `media_url` (public https photo / PDF, inside the window, when the provider sends media); `activity_id` sends a planned WhatsApp and marks it done. 422 with the web's message: not connected, no mobile number, opted out, window closed, a cap reached on TaskSync's account. Queued: the ticks come in GET …/whatsapp. Never sends twice for one Idempotency-Key.

Request

{
    "template_id": 4,
    "vars": [
        "Ravi",
        "Chairs"
    ],
    "client_id": "tmp-wa-1"
}

Answer (201)

{
    "client_id": "tmp-wa-1",
    "whatsapp_message": {
        "status": "queued",
        "id": 9001,
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "activity_id": 5030,
        "direction": "out",
        "kind": "template",
        "body": "Hello Ravi, thanks for asking about Chairs.",
        "template_name": "lead_hello",
        "error": null,
        "sent_at": "2026-11-25T12:00:05Z",
        "delivered_at": "2026-11-25T12:00:09Z",
        "read_at": null,
        "created_at": "2026-11-25T12:00:00Z",
        "by": "Asha Rao"
    },
    "activity_id": 5030,
    "state": {
        "connected": true,
        "window_open": false
    },
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "WhatsApp message queued — the ticks show when it is delivered and read."
}

Errors: 403, 404, 422, 423, 429

GET /sales/leads/{lead}/whatsapp/templates Approved WhatsApp templates, filled for the lead

The company account's approved templates (synced from the provider in Settings → WhatsApp): name, language, category (MARKETING | UTILITY | AUTHENTICATION) with its label, body with {{1}} {{2}}…, `vars` (how many) and `values` — {{1}} first name, {{2}} interest, {{3}} company; the rest empty for the person to fill in.

Answer (200)

{
    "data": [
        {
            "id": 4,
            "name": "lead_hello",
            "language": "en",
            "category": "MARKETING",
            "category_label": "Marketing",
            "body": "Hello {{1}}, thanks for asking about {{2}}.",
            "vars": 2,
            "status": "approved",
            "source": "sync",
            "values": [
                "Ravi",
                "Chairs"
            ]
        }
    ],
    "connected": true,
    "window_open": false,
    "meta": {
        "server_time": "2026-11-25T12:00:00Z"
    }
}

Errors: 403, 404

POST /sales/leads/{lead}/won/customer A won lead becomes a customer (again: answers "exists") Idempotency-Key

Answer (200)

{
    "status": "created",
    "company_id": 55,
    "name": "Kumar Traders",
    "message": "“Kumar Traders” is now a customer.",
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    }
}

Errors: 403, 404, 422, 423

GET /sales/my-work My work: Overdue · Today · Next 7 days · Later

The web's timeline (Sales → Follow-ups → My work): follow-ups of contacted leads, planned activities and customer requests, with the side counts (waiting for a first response, no next step, unassigned). A snapshot, not a delta: ask with If-None-Match.

Query

viewMine (leads I own, default) or Team (every lead I may see; only for people the web offers "Team" to)

Answer (200)

{
    "data": {
        "sections": {
            "overdue": [
                {
                    "key": "f812",
                    "kind": "follow_up",
                    "at": "2026-11-25T04:30:00+00:00",
                    "lead": {
                        "id": 812,
                        "title": "Office chairs for 40 staff"
                    }
                }
            ],
            "today": [],
            "week": [
                {
                    "key": "a5022",
                    "kind": "activity",
                    "at": "2026-11-27T05:30:00+00:00"
                }
            ],
            "later": []
        },
        "labels": {
            "overdue": "Overdue",
            "today": "Today",
            "week": "Next 7 days",
            "later": "Later"
        },
        "counts": {
            "overdue": 1,
            "today": 0,
            "week": 1,
            "later": 0
        },
        "kinds": {
            "follow_up": 1,
            "activity": 1,
            "request": 0
        },
        "no_next_step": 2,
        "waiting_first_response": 3,
        "without_follow_up": 5,
        "unassigned": null
    },
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "view": "mine",
        "can_team": false,
        "timezone": "Asia/Kolkata"
    }
}

Errors: 403

GET /sales/people-scorecard My People scorecard: a record per person I may see + the team median sync list

The web's Reports → Team → People for me (the last 30 days): myself only (and the team median) with my own Leads scope, my team with a team / department / group scope, everyone for owners and admins. A record changes only when its numbers do. A person who leaves my scorecard comes as a tombstone (`deleted`: no work in the period; `no_access`: I may no longer see them) — drop their coaching summary too. Ranks only for managers.

First load: Every record (one per person on my scorecard, kind person; one kind team)

Answer (200)

{
    "data": [
        {
            "id": 41,
            "version": 3,
            "updated_at": "2026-11-27T04:00:00Z",
            "kind": "person",
            "user_id": 7,
            "name": "Asha Rao",
            "me": false,
            "working_days": 21,
            "values": {
                "received": 42,
                "contacted_pct": 95.2,
                "resp_median": 12.5,
                "resp_p90": 85,
                "fu_due": 30,
                "fu_on_time_pct": 80,
                "fu_missed": 2,
                "untouched": 1,
                "activities": 160,
                "calls": 90,
                "won": 6,
                "win_rate": 40,
                "won_value": 450000
            },
            "trend": {
                "received": "up",
                "resp_median": "down"
            },
            "ranks": {
                "received": 2
            },
            "received_by": {
                "routed": 38,
                "manual": 4
            },
            "week": {
                "received": 11,
                "fu_missed": 0
            },
            "week_before": {
                "received": 9,
                "fu_missed": 1
            },
            "from": "2026-10-29",
            "to": "2026-11-27",
            "coaching_url": "/sales/reports/people/7"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /sales/people/{user}/coaching A person's coaching summary: 12-week trends against the team, leads to look at, calls, replies, meetings, lost reasons

The web's coaching page (/sales/reports/people/{user}) without the long lists. Myself, the people my Leads scope covers, everyone for owners and admins; anyone else → 404. `updated_since` (the record's last `updated_at`): `{data: null, unchanged: true}` when nothing changed. `days`: 30 (default) or 90.

Query

days
updated_since

Answer (200)

{
    "data": {
        "id": 57,
        "version": 2,
        "updated_at": "2026-11-27T04:05:00Z",
        "kind": "coaching",
        "user_id": 7,
        "person": {
            "id": 7,
            "name": "Asha Rao",
            "me": false
        },
        "from": "2026-10-29",
        "to": "2026-11-27",
        "days": 30,
        "timezone": "Asia/Kolkata",
        "values": {
            "received": 42,
            "resp_median": 12.5
        },
        "team": {
            "received": 30,
            "resp_median": 20
        },
        "trends": {
            "weeks": [
                {
                    "from": "2026-11-23",
                    "to": "2026-11-27",
                    "label": "23 Nov"
                }
            ],
            "series": {
                "received": {
                    "better": "up",
                    "mine": [
                        11
                    ],
                    "team": [
                        8
                    ]
                }
            }
        },
        "worst": {
            "untouched": {
                "total": 1,
                "items": [
                    {
                        "lead_id": 812,
                        "title": "Office chairs",
                        "at": "2026-11-20T05:00:00+00:00",
                        "working_days": 4
                    }
                ]
            }
        },
        "lost_reasons": [
            {
                "reason": "Price too high",
                "n": 3,
                "pct": 50,
                "team_pct": 35
            }
        ],
        "calls": {
            "placed": 90,
            "connected": 60,
            "connect_rate": 66.7,
            "talk_minutes": 420.5,
            "avg_talk_minutes": 7,
            "missed": 4,
            "called_back": 3,
            "not_called_back": 1,
            "callback_median_minutes": 18,
            "team": {
                "connect_rate": 55
            }
        },
        "replies": {
            "conversations": 20,
            "replied": 18,
            "waiting": 2,
            "median_minutes": 9.5,
            "p90_minutes": 60,
            "whatsapp": 15,
            "email": 5,
            "team": {
                "median_minutes": 14
            }
        },
        "meetings": {
            "done": 6,
            "held": 5,
            "no_show": 1,
            "no_show_rate": 16.7,
            "team": {
                "no_show_rate": 10
            }
        }
    },
    "unchanged": false,
    "meta": {
        "server_time": "2026-11-27T04:05:00Z",
        "days": 30,
        "periods": [
            30,
            90
        ]
    }
}

Errors: 403, 404

GET /sales/pipelines The company's pipelines sync list

First load: Every live pipeline (archived → tombstone)

Answer (200)

{
    "data": [
        {
            "id": 3,
            "version": 1764000000000000,
            "updated_at": "2026-11-24T10:00:00Z",
            "name": "Sales",
            "is_default": true,
            "sort": 0,
            "preset": "default"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /sales/reference Pickers for the offline forms: sources, lost reasons, call outcomes, lead fields…

Answer (200)

{
    "sources": [
        {
            "key": "manual",
            "label": "Added by hand"
        }
    ],
    "lost_reasons": [
        "Price too high",
        "Bought elsewhere"
    ],
    "invalid_reasons": [
        {
            "key": "spam",
            "label": "Spam"
        }
    ],
    "outcomes": [
        {
            "key": "connected",
            "label": "Connected"
        }
    ],
    "activity_types": [
        {
            "key": "call",
            "label": "Call"
        }
    ],
    "plannable": [
        "call",
        "meeting",
        "email",
        "whatsapp",
        "task"
    ],
    "directions": [
        {
            "key": "out",
            "label": "Outgoing"
        }
    ],
    "next_steps": [
        {
            "key": "tomorrow",
            "label": "Tomorrow"
        }
    ],
    "currency": "INR",
    "timezone": "Asia/Kolkata",
    "countries": [
        {
            "key": "IN",
            "label": "India"
        }
    ],
    "lead_fields": [
        {
            "id": 9,
            "key": "gst_number",
            "label": "GST number",
            "type": "text",
            "required": false,
            "mode": "visible",
            "applies": true
        }
    ],
    "field_sections": [],
    "interest_items": [
        {
            "id": 5,
            "name": "Ergonomic chairs"
        }
    ],
    "request_types": [],
    "people": [],
    "telephony": {
        "connected": true,
        "provider": "Exotel",
        "has_agent": true
    },
    "can": {
        "create": true,
        "edit": true,
        "assign": false,
        "delete": false,
        "settings": false
    },
    "views": {
        "can_team": false,
        "default": "mine"
    },
    "meta": {
        "server_time": "2026-11-25T12:00:00Z"
    }
}

Errors: 403

GET /sales/stages Stages of those pipelines, with what a move into each needs sync list

First load: Every live stage of the live pipelines (archived → tombstone)

Answer (200)

{
    "data": [
        {
            "id": 14,
            "version": 1764000000000000,
            "updated_at": "2026-11-24T10:00:00Z",
            "pipeline_id": 3,
            "name": "Qualified",
            "kind": "open",
            "color": "#2563eb",
            "probability": 30,
            "requires_approval": false,
            "follow_up_hours": 24,
            "required_fields": [
                "value"
            ],
            "required_custom": [],
            "questions": false,
            "nurture": false,
            "group": "sales",
            "stuck_days": 3,
            "sort": 2
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /sales/whatsapp-chats My WhatsApp chats (one per lead I may see): last message, unread, 24-hour window, waiting for our reply

The Leads list's scope. Each chat (`id` = its lead id): title, contact_name, owner, phone (null when field rules hide it), `last` {id, at, direction, kind, status, preview}, `unread` (my own read marker), `last_read_id`, `window_ends_at` (null: closed — templates only), `waiting` (the customer wrote last), `opted_out`. `filter`: all | mine | unassigned | waiting | unread | opted_out; `q` searches. First read: newest first. Then `updated_since=<meta.server_time>`: chats whose last message, ticks or MY read marker changed; `deleted[]`: chats whose lead was deleted / merged or that I may no longer see. `has_more` → ask again from `meta.next_since`.

Query

updated_since
limit
filter
q

Answer (200)

{
    "data": [
        {
            "id": 501,
            "lead_id": 501,
            "title": "Chairs for office",
            "contact_name": "Ravi Kumar",
            "owner": "Asha",
            "phone": "+919845011111",
            "last": {
                "id": 9001,
                "at": "2026-11-25T11:58:00+00:00",
                "direction": "in",
                "kind": "text",
                "status": "received",
                "preview": "Is it available?"
            },
            "unread": 2,
            "last_read_id": 8990,
            "window_ends_at": "2026-11-26T11:58:00+00:00",
            "waiting": true,
            "opted_out": false,
            "version": 1764071880,
            "updated_at": "2026-11-25T11:58:00Z"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "has_more": false,
        "next_since": null,
        "full": true,
        "connected": true,
        "counts": {
            "mine": 1,
            "waiting": 3,
            "unassigned": 0,
            "unread": 2
        }
    }
}

Errors: 403, 410, 422

GET /sales/whatsapp-chats/{lead}/messages A chat's messages — the same as GET /sales/leads/{lead}/whatsapp

The lead's WhatsApp thread with ticks and `state` (window, templates only after 24 h, opted out). Each message's `file`: kind, name, state (kept | pending | failed | link) and a signed `url` valid for 30 minutes (no token needed — open it in an image / video tag).

Query

updated_since
limit

Answer (200)

{
    "data": [
        {
            "id": 9001,
            "version": 1764072100000000,
            "updated_at": "2026-11-25T12:01:40Z",
            "lead_id": 812,
            "activity_id": 5030,
            "direction": "out",
            "kind": "template",
            "body": "Hello Ravi, thanks for asking about Chairs.",
            "template_name": "lead_hello",
            "status": "delivered",
            "error": null,
            "sent_at": "2026-11-25T12:00:05Z",
            "delivered_at": "2026-11-25T12:00:09Z",
            "read_at": null,
            "created_at": "2026-11-25T12:00:00Z",
            "by": "Asha Rao"
        }
    ],
    "state": {
        "connected": true,
        "window_open": true
    },
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "has_more": false
    }
}

Errors: 403, 404, 422

POST /sales/whatsapp-chats/{lead}/messages Send in a chat — the same as POST /sales/leads/{lead}/whatsapp Idempotency-Key

`{body}` inside the 24-hour window (a quick reply goes here), else `{template_id, vars[]}`; `media_url`; `client_id`. The web's rules, caps and usage. Never sends twice for one Idempotency-Key.

Request

{
    "body": "Yes, it is available.",
    "client_id": "tmp-wa-2"
}

Answer (201)

{
    "client_id": "tmp-wa-2",
    "whatsapp_message": {
        "status": "queued",
        "id": 9001,
        "version": 1764072100000000,
        "updated_at": "2026-11-25T12:01:40Z",
        "lead_id": 812,
        "activity_id": 5030,
        "direction": "out",
        "kind": "template",
        "body": "Hello Ravi, thanks for asking about Chairs.",
        "template_name": "lead_hello",
        "error": null,
        "sent_at": "2026-11-25T12:00:05Z",
        "delivered_at": "2026-11-25T12:00:09Z",
        "read_at": null,
        "created_at": "2026-11-25T12:00:00Z",
        "by": "Asha Rao"
    },
    "activity_id": 5031,
    "state": {
        "connected": true,
        "window_open": true
    },
    "lead": {
        "id": 812,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T11:58:01Z",
        "title": "Office chairs for 40 staff",
        "contact_name": "Ravi Kumar",
        "company_name": "Kumar Traders",
        "phone": "+91 98450 11111",
        "email": "ravi@kumartraders.in",
        "source": "indiamart",
        "origin": "IndiaMART",
        "value": {
            "amount": "250000.00",
            "currency": "INR"
        },
        "city": "Pune",
        "country": "IN",
        "pipeline_id": 3,
        "stage_id": 14,
        "pending_stage_id": null,
        "status": "open",
        "owner_id": 7,
        "owner_name": "Asha Rao",
        "next_follow_up_at": "2026-11-26T04:30:00Z",
        "overdue": false,
        "contacted": true,
        "awaiting_response": false,
        "hot": true,
        "hot_why": "Value ≥ 2,00,000",
        "score": 72,
        "score_band": "hot",
        "stuck": false,
        "geo": {
            "state_code": "MH",
            "state": "Maharashtra",
            "zone": "W",
            "city": "Pune",
            "city_tier": 1,
            "pincode": "411001",
            "timezone": "Asia/Kolkata",
            "phone_e164": "+919845011111"
        },
        "fields": {
            "gst_number": "27ABCDE1234F1Z5"
        },
        "interests": [
            {
                "id": 5,
                "name": "Ergonomic chairs"
            }
        ],
        "next_planned": {
            "type": "meeting",
            "label": "Meeting",
            "what": "Demo at their office",
            "due_at": "2026-11-27T05:30:00Z"
        },
        "url": "/sales/leads/812"
    },
    "message": "WhatsApp message queued — the ticks show when it is delivered and read."
}

Errors: 403, 404, 422, 423, 429

GET /sales/whatsapp-chats/{lead}/quick-replies Quick replies for a chat: the company's ready WhatsApp texts and my saved replies, filled for the lead

Free text — usable inside the 24-hour window only. `packs[]` {name, language, body}; `saved[]` {id, title, body (with {name} …), text (filled)}. A reply only fills the message box: the person sends it.

Answer (200)

{
    "packs": [
        {
            "name": "Thanks for your enquiry",
            "language": "en",
            "body": "Hello Ravi, thank you for your enquiry about chairs."
        }
    ],
    "saved": [
        {
            "id": 3,
            "title": "Price list",
            "body": "Hi {name}, here is our price list.",
            "text": "Hi Ravi, here is our price list.",
            "updated_at": "2026-11-20T10:00:00+00:00"
        }
    ],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z"
    }
}

Errors: 403, 404

POST /sales/whatsapp-chats/{lead}/read Mark a chat read (my own marker; up to a message, default the newest) Idempotency-Key

Only moves forward (an older `up_to` changes nothing). Unread counts are per person; the web page shares the same marker. Idempotency-Key.

Request

{
    "up_to": 9001
}

Answer (200)

{
    "lead_id": 501,
    "last_read_id": 9001,
    "unread": 0,
    "meta": {
        "server_time": "2026-11-25T12:00:00Z"
    }
}

Errors: 403, 404, 422

GET /search Search tasks, projects, leads, tickets, orders and people

The web's global search with its visibility per type (projects I may see and their tasks, leads in my Leads scope, tickets in my desk scope, orders in my store scope, people of the company), limited to the types the app opens. At least 2 characters. Each result opens with its single-record GET (`open.path`, relative to /api/mobile/v1) and app screen; people are shown as the result itself (`open: null`). Online only (not a synced list). 60 a minute.

Query

qWhat to look for (2–200 characters)
typesComma-separated: tasks, projects, leads, tickets, orders, people (default: all I have)
limitPer type, 1–30 (default 8)
offsetFor "more" in one type

Answer (200)

{
    "query": "pump",
    "min_chars": 2,
    "types": [
        {
            "key": "tasks",
            "label": "Tasks"
        },
        {
            "key": "projects",
            "label": "Projects"
        },
        {
            "key": "people",
            "label": "People"
        }
    ],
    "groups": [
        {
            "type": "tasks",
            "label": "Tasks",
            "has_more": false,
            "items": [
                {
                    "type": "task",
                    "id": 12,
                    "title": "Replace pump seal",
                    "subtitle": "Plant upkeep · This week",
                    "number": "#412",
                    "avatar_url": null,
                    "open": {
                        "path": "/tasks/12",
                        "screen": "task",
                        "params": {
                            "task_id": 12
                        },
                        "area": "tasks"
                    }
                }
            ]
        },
        {
            "type": "people",
            "label": "People",
            "has_more": false,
            "items": [
                {
                    "type": "person",
                    "id": 9,
                    "title": "Asha Iyer",
                    "subtitle": "asha@example.com",
                    "number": null,
                    "avatar_url": null,
                    "open": null
                }
            ]
        }
    ]
}

Errors: 401, 403, 422, 429

Service desk

GET /desk/canned-replies Saved replies (reply templates) sync list

First load: All of the company’s saved replies

Answer (200)

{
    "data": [
        {
            "id": 3,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "title": "Engineer on the way",
            "body": "Our engineer is on the way and will call you on arrival.",
            "is_internal": false
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /desk/files/{attachment} The file behind a download link public

Only through the signed `url` from …/link (no token needed; it stops working after 5 minutes → 403).

Answer (200)

"(the file)"

Errors: 403, 404

GET /desk/reference Pickers: statuses, priorities, agents, my teams, vendors, categories

Small and whole every time (`meta.full` true, nothing in `deleted`): replace the app’s copy. Send If-None-Match.

Answer (200)

{
    "data": {
        "statuses": [
            {
                "key": "open",
                "label": "Open",
                "open": true
            }
        ],
        "priorities": [
            {
                "key": "P1",
                "label": "P1 — Critical"
            }
        ],
        "channels": [
            {
                "key": "email",
                "label": "Email"
            }
        ],
        "agents": [
            {
                "id": 31,
                "name": "Asha Patel"
            }
        ],
        "teams": [
            {
                "id": 4,
                "name": "Field team West",
                "member_ids": [
                    31,
                    40
                ]
            }
        ],
        "vendors": [
            {
                "id": 2,
                "name": "CoolAir Services"
            }
        ],
        "categories": [
            {
                "id": 7,
                "name": "Power",
                "default_priority": "P2"
            }
        ],
        "me": {
            "id": 31,
            "can_work": true,
            "ticket_scope": "all",
            "scope_member_ids": null
        }
    },
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /desk/replies New lines on all of my tickets sync list

The same lines as a ticket’s conversation, across every ticket of the person’s scope — what POST /sync uses to bring new replies in one go.

First load: Lines of the last 30 days

Answer (200)

{
    "data": [
        {
            "id": 99120,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "ticket_id": 4182,
            "type": "reply",
            "body": "Our engineer is on the way.",
            "is_internal": false,
            "to_vendor": false,
            "from_vendor": false,
            "user_id": 31,
            "user": "Asha Patel",
            "created_at": "2026-11-25T12:00:00Z",
            "files": [
                {
                    "id": 551,
                    "name": "photo.jpg",
                    "size": 182233,
                    "mime_type": "image/jpeg",
                    "is_image": true,
                    "is_internal": false
                }
            ]
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /desk/tickets My tickets (the web desk’s scope) sync list

Every ticket the person may open on the web desk (all, or — with a limited ticket scope — their own / their group’s / their team’s). Filter mine / my team / unassigned on the phone with `mine`, `assignee_id`, `unassigned` and the reference’s `me.scope_member_ids` / `teams`. A reassignment that takes a ticket out of the person’s view comes as `deleted` with reason `no_access`. Company staff with “See tickets” only; 403 `plan_required` without the desk.

First load: Open tickets + those resolved or closed in the last 30 days

Answer (200)

{
    "data": [
        {
            "id": 4182,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "number": "TKT-2026-00042",
            "title": "UPS beeping in server room",
            "description": "The UPS has been beeping since 10 am.",
            "status": "open",
            "status_label": "Open",
            "open": true,
            "priority": "P2",
            "priority_label": "P2 — High",
            "channel": "email",
            "channel_label": "Email",
            "category": "Power",
            "ticket_category_id": 7,
            "site": "Pune DC · UPS-2",
            "customer": "Acme Logistics",
            "contract": "AMC 2026",
            "customer_contract_id": 12,
            "reporter": {
                "name": "Ravi Kumar",
                "email": "ravi@acme.example",
                "phone": "+91 98200 00000"
            },
            "assignee_id": 31,
            "assignee": "Asha Patel",
            "unassigned": false,
            "mine": true,
            "vendor_id": null,
            "vendor": null,
            "vendor_assignee_id": null,
            "created_by": 31,
            "created_at": "2026-11-25T04:31:00Z",
            "first_response_at": "2026-11-25T04:50:00Z",
            "resolved_at": null,
            "closed_at": null,
            "eta_at": null,
            "sla": [
                {
                    "party": "customer",
                    "metric": "resolution",
                    "status": "running",
                    "due_at": "2026-11-25T12:31:00Z",
                    "breached": false,
                    "breached_at": null,
                    "target_mins": 480,
                    "remaining_mins": null
                }
            ],
            "sla_due_at": "2026-11-25T12:31:00Z",
            "sla_breached": false
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /desk/tickets/{ticket} One ticket

Answer (200)

{
    "id": 4182,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": "TKT-2026-00042",
    "title": "UPS beeping in server room",
    "description": "The UPS has been beeping since 10 am.",
    "status": "open",
    "status_label": "Open",
    "open": true,
    "priority": "P2",
    "priority_label": "P2 — High",
    "channel": "email",
    "channel_label": "Email",
    "category": "Power",
    "ticket_category_id": 7,
    "site": "Pune DC · UPS-2",
    "customer": "Acme Logistics",
    "contract": "AMC 2026",
    "customer_contract_id": 12,
    "reporter": {
        "name": "Ravi Kumar",
        "email": "ravi@acme.example",
        "phone": "+91 98200 00000"
    },
    "assignee_id": 31,
    "assignee": "Asha Patel",
    "unassigned": false,
    "mine": true,
    "vendor_id": null,
    "vendor": null,
    "vendor_assignee_id": null,
    "created_by": 31,
    "created_at": "2026-11-25T04:31:00Z",
    "first_response_at": "2026-11-25T04:50:00Z",
    "resolved_at": null,
    "closed_at": null,
    "eta_at": null,
    "sla": [
        {
            "party": "customer",
            "metric": "resolution",
            "status": "running",
            "due_at": "2026-11-25T12:31:00Z",
            "breached": false,
            "breached_at": null,
            "target_mins": 480,
            "remaining_mins": null
        }
    ],
    "sla_due_at": "2026-11-25T12:31:00Z",
    "sla_breached": false
}

Errors: 403, 404

PATCH /desk/tickets/{ticket} Change status, priority, assignee or vendor (only the fields sent) Idempotency-Key If-Match

The web ticket page’s change, through the same code (history, SLA clocks, alerts, the customer’s “resolved” e-mail). Needs “Work tickets”. `assignee_id` must be a staff member of the company (null = unassigned); `vendor_id` passes it to a vendor (System Integrator).

Request

{
    "status": "in_progress",
    "assignee_id": 31
}

Answer (200)

{
    "status": "in_progress",
    "status_label": "In progress",
    "id": 4182,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": "TKT-2026-00042",
    "title": "UPS beeping in server room",
    "description": "The UPS has been beeping since 10 am.",
    "open": true,
    "priority": "P2",
    "priority_label": "P2 — High",
    "channel": "email",
    "channel_label": "Email",
    "category": "Power",
    "ticket_category_id": 7,
    "site": "Pune DC · UPS-2",
    "customer": "Acme Logistics",
    "contract": "AMC 2026",
    "customer_contract_id": 12,
    "reporter": {
        "name": "Ravi Kumar",
        "email": "ravi@acme.example",
        "phone": "+91 98200 00000"
    },
    "assignee_id": 31,
    "assignee": "Asha Patel",
    "unassigned": false,
    "mine": true,
    "vendor_id": null,
    "vendor": null,
    "vendor_assignee_id": null,
    "created_by": 31,
    "created_at": "2026-11-25T04:31:00Z",
    "first_response_at": "2026-11-25T04:50:00Z",
    "resolved_at": null,
    "closed_at": null,
    "eta_at": null,
    "sla": [
        {
            "party": "customer",
            "metric": "resolution",
            "status": "running",
            "due_at": "2026-11-25T12:31:00Z",
            "breached": false,
            "breached_at": null,
            "target_mins": 480,
            "remaining_mins": null
        }
    ],
    "sla_due_at": "2026-11-25T12:31:00Z",
    "sla_breached": false
}

Errors: 403, 404, 409, 422, 423

GET /desk/tickets/{ticket}/files/{attachment}/link A download link for a file (5 minutes)

Answer (200)

{
    "id": 551,
    "name": "photo.jpg",
    "mime_type": "image/jpeg",
    "size": 182233,
    "url": "https://tasksync.in/api/mobile/v1/desk/files/551?expires=1764072300&signature=…",
    "expires_at": "2026-11-25T12:05:00Z"
}

Errors: 403, 404

GET /desk/tickets/{ticket}/replies One ticket’s conversation and history sync list

Replies to and from the customer, internal notes, messages to / from the vendor and the change lines (status, priority, assignment). Staff see them all. Lines never change once written: deltas bring only new ones. Older lines: `/desk/tickets/{ticket}/replies/older`.

First load: The ticket’s newest 100 lines

Answer (200)

{
    "data": [
        {
            "id": 99120,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "ticket_id": 4182,
            "type": "reply",
            "body": "Our engineer is on the way.",
            "is_internal": false,
            "to_vendor": false,
            "from_vendor": false,
            "user_id": 31,
            "user": "Asha Patel",
            "created_at": "2026-11-25T12:00:00Z",
            "files": [
                {
                    "id": 551,
                    "name": "photo.jpg",
                    "size": 182233,
                    "mime_type": "image/jpeg",
                    "is_image": true,
                    "is_internal": false
                }
            ]
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403, 404

POST /desk/tickets/{ticket}/replies Reply to the customer, add an internal note, or message the vendor Idempotency-Key

JSON, or multipart/form-data with `files[]` (up to 10 files of 20 MB; no scripts / executables — the web’s rules). A reply (not `internal`) is e-mailed to the customer exactly as a reply from the web desk, counts as the first response and moves a New ticket to Open. Answers the new line (with `client_id`) and the ticket as it is now. Needs “Work tickets”.

Request

{
    "body": "Our engineer is on the way.",
    "internal": false,
    "client_id": "tmp-7"
}

Answer (201)

{
    "client_id": "tmp-7",
    "id": 99120,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "ticket_id": 4182,
    "type": "reply",
    "body": "Our engineer is on the way.",
    "is_internal": false,
    "to_vendor": false,
    "from_vendor": false,
    "user_id": 31,
    "user": "Asha Patel",
    "created_at": "2026-11-25T12:00:00Z",
    "files": [
        {
            "id": 551,
            "name": "photo.jpg",
            "size": 182233,
            "mime_type": "image/jpeg",
            "is_image": true,
            "is_internal": false
        }
    ],
    "ticket": {
        "id": 4182,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T12:00:00Z",
        "number": "TKT-2026-00042",
        "title": "UPS beeping in server room",
        "description": "The UPS has been beeping since 10 am.",
        "status": "open",
        "status_label": "Open",
        "open": true,
        "priority": "P2",
        "priority_label": "P2 — High",
        "channel": "email",
        "channel_label": "Email",
        "category": "Power",
        "ticket_category_id": 7,
        "site": "Pune DC · UPS-2",
        "customer": "Acme Logistics",
        "contract": "AMC 2026",
        "customer_contract_id": 12,
        "reporter": {
            "name": "Ravi Kumar",
            "email": "ravi@acme.example",
            "phone": "+91 98200 00000"
        },
        "assignee_id": 31,
        "assignee": "Asha Patel",
        "unassigned": false,
        "mine": true,
        "vendor_id": null,
        "vendor": null,
        "vendor_assignee_id": null,
        "created_by": 31,
        "created_at": "2026-11-25T04:31:00Z",
        "first_response_at": "2026-11-25T04:50:00Z",
        "resolved_at": null,
        "closed_at": null,
        "eta_at": null,
        "sla": [
            {
                "party": "customer",
                "metric": "resolution",
                "status": "running",
                "due_at": "2026-11-25T12:31:00Z",
                "breached": false,
                "breached_at": null,
                "target_mins": 480,
                "remaining_mins": null
            }
        ],
        "sla_due_at": "2026-11-25T12:31:00Z",
        "sla_breached": false
    }
}

Errors: 403, 404, 422, 423

GET /desk/tickets/{ticket}/replies/older Older lines of a ticket, newest first

Query

before_idthe oldest line id the app has (required)
limit1–500, default 100

Answer (200)

{
    "data": [
        {
            "id": 99120,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "ticket_id": 4182,
            "type": "reply",
            "body": "Our engineer is on the way.",
            "is_internal": false,
            "to_vendor": false,
            "from_vendor": false,
            "user_id": 31,
            "user": "Asha Patel",
            "created_at": "2026-11-25T12:00:00Z",
            "files": [
                {
                    "id": 551,
                    "name": "photo.jpg",
                    "size": 182233,
                    "mime_type": "image/jpeg",
                    "is_image": true,
                    "is_internal": false
                }
            ]
        }
    ],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "has_more": true,
        "next_before_id": 99120
    }
}

Errors: 403, 404, 422

Services

GET /services/assets Customer assets (equipment at the sites, with warranty) sync list

Assets not archived (archived → `deleted`, reason `archived`). Search them on the phone (name, serial, make, model). Company staff with “See tickets” in a company with the System Integrator add-on (Workspace module “System Integrator suite”); otherwise 403 plan_required / forbidden.

First load: Every asset not archived

Answer (200)

{
    "data": [
        {
            "id": 301,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "site_id": 21,
            "name": "NVR-01",
            "asset_type": "NVR",
            "make": "Hikvision",
            "model": "DS-7608",
            "serial_no": "SN12345",
            "installed_on": "2025-04-01",
            "warranty_ends_on": "2028-03-31",
            "under_warranty": true,
            "status": "active",
            "notes": null
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /services/assets/{asset} One asset with its service history

The asset register page: the site, warranty days left, the tickets on it the person may open (newest 50 — `history`), its maintenance plans, its last 20 visits and status changes.

Answer (200)

{
    "id": 301,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "site_id": 21,
    "name": "NVR-01",
    "asset_type": "NVR",
    "make": "Hikvision",
    "model": "DS-7608",
    "serial_no": "SN12345",
    "installed_on": "2025-04-01",
    "warranty_ends_on": "2028-03-31",
    "under_warranty": true,
    "status": "active",
    "notes": null,
    "site": {
        "id": 21,
        "name": "North Wing",
        "code": "NW",
        "contract_id": 14
    },
    "archived": false,
    "warranty_days_left": 851,
    "open_tickets": 0,
    "tickets_total": 3,
    "history": [
        {
            "id": 4102,
            "number": "TKT-2026-00031",
            "title": "Camera 4 offline",
            "priority": "P2",
            "status": "resolved",
            "status_label": "Resolved",
            "assignee": "Sam Rao",
            "created_at": "2026-10-02T06:00:00Z",
            "resolved_at": "2026-10-02T09:30:00Z"
        }
    ],
    "plans": [
        {
            "id": 9,
            "title": "Quarterly CCTV health check",
            "frequency_label": "Quarterly",
            "next_due_on": "2026-12-15",
            "paused": false,
            "tickets_raised": 2
        }
    ],
    "visits": [
        {
            "id": 77,
            "version": 1764072000000000,
            "updated_at": "2026-11-30T03:00:00Z",
            "plan_id": 9,
            "title": "Quarterly CCTV health check",
            "due_on": "2026-11-30",
            "kind": "ticket",
            "state": "to_do",
            "today": true,
            "overdue": false,
            "contract_id": 14,
            "site_id": 21,
            "asset_id": 301,
            "checklist": [
                "Cameras online",
                "Disk health",
                "Backup tested"
            ],
            "assigned_to_me": true,
            "ticket": {
                "id": 4190,
                "number": "TKT-2026-00050",
                "title": "Preventive maintenance: Quarterly CCTV health check (30 Nov 2026)",
                "status": "open",
                "status_label": "Open",
                "priority": "P3",
                "assignee_id": 31
            },
            "task": null,
            "completed_at": null,
            "can_work": true
        }
    ],
    "status_history": []
}

Errors: 403, 404, 429

GET /services/contracts Customer contracts (with their SLA policy) sync list

Every customer contract of the company not archived (archived → `deleted` reason `archived`; restored → back as a change). Money (`monthly_fee`, `penalty_cap_pct`) and `notes` only for “Contracts & SLAs set-up” — null for everyone else. SLA targets: `/services/reference` sla_policies. Company staff with “See tickets” in a company with the System Integrator add-on (Workspace module “System Integrator suite”); otherwise 403 plan_required / forbidden.

First load: Every contract not archived

Answer (200)

{
    "data": [
        {
            "id": 14,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "number": "AMC-2026-014",
            "customer_name": "Metro Hospital",
            "title": "CCTV & access control AMC",
            "status": "active",
            "in_force": true,
            "starts_on": "2026-04-01",
            "ends_on": "2027-03-31",
            "project_id": 88,
            "sla_policy_id": 3,
            "monthly_fee": {
                "amount": "45000.00",
                "currency": "INR"
            },
            "penalty_cap_pct": 10,
            "notes": null
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /services/contracts/{contract} One contract: SLA, coverage (sites, assets, plans), open and recent tickets

Answer (200)

{
    "id": 14,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": "AMC-2026-014",
    "customer_name": "Metro Hospital",
    "title": "CCTV & access control AMC",
    "status": "active",
    "in_force": true,
    "starts_on": "2026-04-01",
    "ends_on": "2027-03-31",
    "project_id": 88,
    "sla_policy_id": 3,
    "monthly_fee": {
        "amount": "45000.00",
        "currency": "INR"
    },
    "penalty_cap_pct": 10,
    "notes": null,
    "sla": {
        "id": 3,
        "name": "Hospital 24x7",
        "targets": {
            "P1": {
                "response_mins": 30,
                "resolve_mins": 240
            }
        }
    },
    "coverage": {
        "sites": [
            {
                "id": 21,
                "name": "North Wing",
                "code": "NW"
            }
        ],
        "assets_count": 18,
        "assets_under_warranty": 12,
        "plans": [
            {
                "id": 9,
                "title": "Quarterly CCTV health check",
                "next_due_on": "2026-12-15",
                "paused": false
            }
        ]
    },
    "open_tickets": 2,
    "tickets": [
        {
            "id": 4102,
            "number": "TKT-2026-00031",
            "title": "Camera 4 offline",
            "priority": "P2",
            "status": "resolved",
            "status_label": "Resolved",
            "assignee": "Sam Rao",
            "created_at": "2026-10-02T06:00:00Z",
            "resolved_at": "2026-10-02T09:30:00Z"
        }
    ]
}

Errors: 403, 404, 429

GET /services/plans Maintenance plans sync list

Every plan (paused ones too: `paused`). `upcoming` = its next visit dates (90 days). `description`, `checklist` and `can_reschedule` only for owners / admins / desk managers (the Maintenance plans page’s people); null / false for others.

First load: Every plan

Answer (200)

{
    "data": [
        {
            "id": 9,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "title": "Quarterly CCTV health check",
            "contract_id": 14,
            "site_id": 21,
            "asset_id": 301,
            "priority": "P3",
            "frequency": "quarterly",
            "frequency_label": "Quarterly",
            "next_due_on": "2026-12-15",
            "following": "2027-03-15",
            "ends_on": null,
            "paused": false,
            "lead_days": 3,
            "raises": "ticket",
            "assignee_id": 31,
            "tickets_raised": 2,
            "last_run_at": "2026-09-12T03:00:00Z",
            "upcoming": [
                "2026-12-15",
                "2027-03-15"
            ],
            "description": "Check every camera, the NVR disks and the backup.",
            "checklist": [
                "Cameras online",
                "Disk health",
                "Backup tested"
            ],
            "can_reschedule": true
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /services/plans/{plan}/reschedule Move the plan’s next visit (not yet raised) to another day Idempotency-Key If-Match

The Maintenance plans page’s “Reschedule”: owners / admins / desk managers; the day must be today or later, before the following visit and not too close to the previous one (422 with the web’s message). A visit already raised is moved on its ticket.

Request

{
    "date": "2026-12-17"
}

Answer (200)

{
    "message": "Next visit moved to 17 Dec 2026.",
    "id": 9,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "title": "Quarterly CCTV health check",
    "contract_id": 14,
    "site_id": 21,
    "asset_id": 301,
    "priority": "P3",
    "frequency": "quarterly",
    "frequency_label": "Quarterly",
    "next_due_on": "2026-12-15",
    "following": "2027-03-15",
    "ends_on": null,
    "paused": false,
    "lead_days": 3,
    "raises": "ticket",
    "assignee_id": 31,
    "tickets_raised": 2,
    "last_run_at": "2026-09-12T03:00:00Z",
    "upcoming": [
        "2026-12-15",
        "2027-03-15"
    ],
    "description": "Check every camera, the NVR disks and the backup.",
    "checklist": [
        "Cameras online",
        "Disk health",
        "Backup tested"
    ],
    "can_reschedule": true
}

Errors: 403, 404, 409, 422, 423

GET /services/reference Pickers, whole each time: SLA policies, priorities, statuses, frequencies, what I may do

Answer (200)

{
    "data": {
        "sla_policies": [
            {
                "id": 3,
                "name": "Hospital 24x7",
                "targets": {
                    "P1": {
                        "response_mins": 30,
                        "resolve_mins": 240
                    }
                }
            }
        ],
        "priorities": [
            {
                "key": "P1",
                "label": "P1 — Critical"
            }
        ],
        "ticket_statuses": [
            {
                "key": "open",
                "label": "Open"
            }
        ],
        "contract_statuses": [
            "draft",
            "active",
            "expired",
            "closed"
        ],
        "asset_statuses": [
            {
                "key": "active",
                "label": "Active"
            }
        ],
        "frequencies": [
            {
                "key": "quarterly",
                "label": "Quarterly"
            }
        ],
        "today": "2026-11-30",
        "me": {
            "id": 31,
            "manages_plans": false,
            "can_work": true,
            "sees_contract_money": false
        }
    },
    "deleted": [],
    "meta": {
        "server_time": "2026-11-30T09:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /services/sites Customer sites sync list

Sites not archived (archived → `deleted`, reason `archived`). Company staff with “See tickets” in a company with the System Integrator add-on (Workspace module “System Integrator suite”); otherwise 403 plan_required / forbidden.

First load: Every site not archived

Answer (200)

{
    "data": [
        {
            "id": 21,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "contract_id": 14,
            "name": "North Wing",
            "code": "NW",
            "address": "12 Ring Road",
            "city": "Pune",
            "state": "MH",
            "postal_code": "411001",
            "contact_name": "R. Kulkarni",
            "contact_phone": "+91 98200 00000",
            "notes": null
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /services/visits Maintenance visits I may see sync list

Visits plans have raised, whose ticket the person may open on the desk (or whose task they see). A visit changes when its ticket / task / plan does. A visit whose ticket moves out of the person’s ticket scope → `deleted` (no_access).

First load: Due in the last 30 days, or still open

Answer (200)

{
    "data": [
        {
            "id": 77,
            "version": 1764072000000000,
            "updated_at": "2026-11-30T03:00:00Z",
            "plan_id": 9,
            "title": "Quarterly CCTV health check",
            "due_on": "2026-11-30",
            "kind": "ticket",
            "state": "to_do",
            "today": true,
            "overdue": false,
            "contract_id": 14,
            "site_id": 21,
            "asset_id": 301,
            "checklist": [
                "Cameras online",
                "Disk health",
                "Backup tested"
            ],
            "assigned_to_me": true,
            "ticket": {
                "id": 4190,
                "number": "TKT-2026-00050",
                "title": "Preventive maintenance: Quarterly CCTV health check (30 Nov 2026)",
                "status": "open",
                "status_label": "Open",
                "priority": "P3",
                "assignee_id": 31
            },
            "task": null,
            "completed_at": null,
            "can_work": true
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /services/visits/mine My visits: today, overdue, upcoming (14 days) and the dates my plans will raise next

Answer (200)

{
    "today": "2026-11-30",
    "today_visits": [
        {
            "id": 77,
            "version": 1764072000000000,
            "updated_at": "2026-11-30T03:00:00Z",
            "plan_id": 9,
            "title": "Quarterly CCTV health check",
            "due_on": "2026-11-30",
            "kind": "ticket",
            "state": "to_do",
            "today": true,
            "overdue": false,
            "contract_id": 14,
            "site_id": 21,
            "asset_id": 301,
            "checklist": [
                "Cameras online",
                "Disk health",
                "Backup tested"
            ],
            "assigned_to_me": true,
            "ticket": {
                "id": 4190,
                "number": "TKT-2026-00050",
                "title": "Preventive maintenance: Quarterly CCTV health check (30 Nov 2026)",
                "status": "open",
                "status_label": "Open",
                "priority": "P3",
                "assignee_id": 31
            },
            "task": null,
            "completed_at": null,
            "can_work": true
        }
    ],
    "overdue": [],
    "upcoming": [],
    "planned": [
        {
            "plan_id": 12,
            "title": "Monthly UPS check",
            "date": "2026-12-08",
            "site_id": 21,
            "asset_id": null
        }
    ]
}

Errors: 403, 429

GET /services/visits/{visit} One visit

Answer (200)

{
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T03:00:00Z",
    "plan_id": 9,
    "title": "Quarterly CCTV health check",
    "due_on": "2026-11-30",
    "kind": "ticket",
    "state": "to_do",
    "today": true,
    "overdue": false,
    "contract_id": 14,
    "site_id": 21,
    "asset_id": 301,
    "checklist": [
        "Cameras online",
        "Disk health",
        "Backup tested"
    ],
    "assigned_to_me": true,
    "ticket": {
        "id": 4190,
        "number": "TKT-2026-00050",
        "title": "Preventive maintenance: Quarterly CCTV health check (30 Nov 2026)",
        "status": "open",
        "status_label": "Open",
        "priority": "P3",
        "assignee_id": 31
    },
    "task": null,
    "completed_at": null,
    "can_work": true
}

Errors: 403, 404, 429

POST /services/visits/{visit}/complete Complete a visit with notes and checklist answers (and photos) Idempotency-Key If-Match

Writes an internal note on the visit’s ticket (“☑ / ☒ item — note” for each checklist item, then the notes; multipart `files[]` as on a desk note) and resolves the ticket (`resolve: false` keeps it open). `checklist[].item` must be one of the visit’s `checklist`. Needs “Work tickets”.

Request

{
    "notes": "All 16 cameras online; disk 3 at 81% health.",
    "checklist": [
        {
            "item": "Cameras online",
            "done": true
        },
        {
            "item": "Disk health",
            "done": false,
            "note": "Disk 3 to replace"
        },
        {
            "item": "Backup tested",
            "done": true
        }
    ]
}

Answer (200)

{
    "state": "done",
    "completed_at": "2026-11-30T09:40:00Z",
    "can_work": false,
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T03:00:00Z",
    "plan_id": 9,
    "title": "Quarterly CCTV health check",
    "due_on": "2026-11-30",
    "kind": "ticket",
    "today": true,
    "overdue": false,
    "contract_id": 14,
    "site_id": 21,
    "asset_id": 301,
    "checklist": [
        "Cameras online",
        "Disk health",
        "Backup tested"
    ],
    "assigned_to_me": true,
    "ticket": {
        "id": 4190,
        "number": "TKT-2026-00050",
        "title": "Preventive maintenance: Quarterly CCTV health check (30 Nov 2026)",
        "status": "open",
        "status_label": "Open",
        "priority": "P3",
        "assignee_id": 31
    },
    "task": null
}

Errors: 403, 404, 409, 422, 423

POST /services/visits/{visit}/start Start a visit (its ticket → In progress) Idempotency-Key If-Match

Needs “Work tickets”. A done visit → 422; a task visit → 422 `task_visit` (work it through /tasks).

Request

{}

Answer (200)

{
    "state": "in_progress",
    "id": 77,
    "version": 1764072000000000,
    "updated_at": "2026-11-30T03:00:00Z",
    "plan_id": 9,
    "title": "Quarterly CCTV health check",
    "due_on": "2026-11-30",
    "kind": "ticket",
    "today": true,
    "overdue": false,
    "contract_id": 14,
    "site_id": 21,
    "asset_id": 301,
    "checklist": [
        "Cameras online",
        "Disk health",
        "Backup tested"
    ],
    "assigned_to_me": true,
    "ticket": {
        "id": 4190,
        "number": "TKT-2026-00050",
        "title": "Preventive maintenance: Quarterly CCTV health check (30 Nov 2026)",
        "status": "open",
        "status_label": "Open",
        "priority": "P3",
        "assignee_id": 31
    },
    "task": null,
    "completed_at": null,
    "can_work": true
}

Errors: 403, 404, 409, 422, 423

Sign-in

POST /auth/login Sign in with e-mail and password public

Answers the device token (shown once — keep it in the phone's secure storage), or `two_factor_required` with a challenge for POST /auth/two-factor, or 403 `sso_required` with `sso_url` when the company uses single sign-on. Send `install_id` (a UUID the app makes once and keeps until it is removed): signing in again from the same installation reuses its device, so writes queued offline before a sign-out or "signed in elsewhere" are not done twice when replayed (`same_install: true`).

Request

{
    "email": "asha@example.com",
    "password": "••••••••",
    "device_name": "Asha's Pixel 8",
    "platform": "android",
    "app_version": "1.0.0",
    "install_id": "0b6f3c1e-8a24-4f0e-9c41-3f7a2b1d9e55"
}

Answer (200)

{
    "token": "ts_m_9f2c…",
    "token_type": "Bearer",
    "device_id": 41,
    "user": {
        "id": 7,
        "name": "Asha Rao",
        "email": "asha@example.com",
        "avatar_url": null
    },
    "companies": [
        {
            "id": 3,
            "name": "Rao Engineering",
            "role": "admin"
        }
    ],
    "current_company_id": 3
}

Errors: 401, 403, 422, 429

POST /auth/logout Sign this device out (its token stops working) Idempotency-Key (optional)

Answer (200)

{
    "status": "signed_out"
}

Errors: 401

POST /auth/logout-all Sign every device of this person out Idempotency-Key (optional)

Answer (200)

{
    "status": "signed_out",
    "devices": 3
}

Errors: 401

POST /auth/sso/exchange Finish single sign-on with the one-time code public

Request

{
    "code": "sso_1f0c…",
    "install_id": "0b6f3c1e-8a24-4f0e-9c41-3f7a2b1d9e55"
}

Answer (200)

{
    "token": "ts_m_9f2c…",
    "token_type": "Bearer",
    "device_id": 41,
    "user": {
        "id": 7,
        "name": "Asha Rao",
        "email": "asha@example.com",
        "avatar_url": null
    },
    "companies": [
        {
            "id": 3,
            "name": "Rao Engineering",
            "role": "admin"
        }
    ],
    "current_company_id": 3
}

Errors: 401, 422, 429

POST /auth/two-factor Finish sign-in with a two-step code public

Request

{
    "challenge": "c_5b1e…",
    "code": "123456"
}

Answer (200)

{
    "token": "ts_m_9f2c…",
    "token_type": "Bearer",
    "device_id": 41,
    "user": {
        "id": 7,
        "name": "Asha Rao",
        "email": "asha@example.com",
        "avatar_url": null
    },
    "companies": [
        {
            "id": 3,
            "name": "Rao Engineering",
            "role": "admin"
        }
    ],
    "current_company_id": 3
}

Errors: 401, 422, 429

Support

POST /feedback Send feedback: a bug, an idea or praise (multipart, optional screenshot) Idempotency-Key (optional)

multipart/form-data (or JSON without the screenshot). Goes to TaskSync's feedback inbox, marked "from the app". Screenshot: JPEG / PNG / WebP up to 5 MB. 5 per person per 10 minutes.

Request

{
    "type": "bug",
    "text": "The timer stops when I lock the phone.",
    "app_version": "1.3.2",
    "device_model": "Pixel 8",
    "os_version": "Android 15"
}

Answer (201)

{
    "ok": true,
    "feedback": {
        "id": 812,
        "type": "bug",
        "status": "new",
        "created_at": "2026-12-01T09:00:00Z"
    }
}

Errors: 401, 422, 429

GET /support Support contacts and links (help, privacy, terms, share text, store) public

Public. Everything the app's Help screen shows — never hard-coded in the app (TaskSync changes them in Admin).

Answer (200)

{
    "email": "support@arenasoftwares.com",
    "phone": "+91 90282 15100",
    "whatsapp": {
        "number": "+919028215100",
        "url": "https://wa.me/919028215100"
    },
    "help_url": "https://tasksync.in/help",
    "privacy_url": "https://tasksync.in/privacy",
    "terms_url": "https://tasksync.in/terms",
    "delete_account_url": "https://tasksync.in/account/delete",
    "share_text": "I use TaskSync for tasks, time and teamwork. Get the app: https://play.google.com/store/apps/details?id=in.tasksync.app",
    "play_store_url": "https://play.google.com/store/apps/details?id=in.tasksync.app",
    "app_store_url": null
}

Errors: 429

Sync

POST /sync Catch up on every area at once

One request after the app opens or comes back online: for each area in `since` (or every area the person has, when `since` is empty) the changes since that time, capped per area. Each area answers like its own list (`data`, `deleted`, `meta` with `has_more` / `next_cursor` — continue a long area with its own list endpoint or with `cursors`). An area that must be loaded again answers `{"error": {"code": "resync_required"}}` in its place; the others still come back. Areas the person does not have are listed in `meta.skipped`. A read: no Idempotency-Key. MA10: `meta.counts` holds the badge counts (as GET /me/counts).

Request

{
    "since": {
        "tasks": "2026-11-25T11:00:00Z",
        "projects": "2026-11-25T11:00:00Z",
        "notifications": null
    }
}

Answer (200)

{
    "tasks": {
        "data": [
            {
                "id": 12,
                "version": 1764071881000000,
                "updated_at": "2026-11-25T11:58:01Z",
                "title": "Replace UPS battery"
            }
        ],
        "deleted": [
            {
                "id": 9,
                "deleted_at": "2026-11-25T11:50:00Z",
                "reason": "deleted"
            }
        ],
        "meta": {
            "server_time": "2026-11-25T12:00:00Z",
            "next_cursor": null,
            "has_more": false,
            "full": false
        }
    },
    "projects": {
        "error": {
            "code": "resync_required",
            "message": "This list was last synced too long ago. Load it again."
        }
    },
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "areas": [
            "tasks",
            "projects"
        ]
    }
}

Errors: 401, 403, 422, 429

Tasks & projects

GET /projects My projects (with their people) sync list

Projects the person may open on the web and is on (member or manager), or holds a task in. Not templates, not archived (archiving sends a tombstone `archived`). `members` are the people tasks can be assigned to. A project new to the phone's cache (added to it, back from the archive) → load its tasks with `GET /tasks?project_id=`.

First load: All of them.

Query

scopeMA10: `all` — every project the person may see on the web's Projects page (only for people who may see all projects, else 403); keep it as its own cache. Default `mine`.

Answer (200)

{
    "data": [
        {
            "id": 41,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "title": "Head office fit-out",
            "description": null,
            "color": "#2563eb",
            "status": {
                "id": 2,
                "name": "In progress"
            },
            "start_date": "2026-11-01",
            "end_date": "2027-01-31",
            "manager_id": 7,
            "my_role": "member",
            "members": [
                {
                    "id": 7,
                    "name": "Asha Rao",
                    "avatar_url": null,
                    "role": "manager"
                },
                {
                    "id": 12,
                    "name": "Vikram Shah",
                    "avatar_url": "https://tasksync.in/storage/avatars/12.jpg",
                    "role": "member"
                }
            ],
            "url": "/projects/41"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 422, 429

GET /projects/{project} One project (deep link /projects/{id})

Any project the web lets the person open; 404 otherwise.

Answer (200)

{
    "id": 41,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "title": "Head office fit-out",
    "description": null,
    "color": "#2563eb",
    "status": {
        "id": 2,
        "name": "In progress"
    },
    "start_date": "2026-11-01",
    "end_date": "2027-01-31",
    "manager_id": 7,
    "my_role": "member",
    "members": [
        {
            "id": 7,
            "name": "Asha Rao",
            "avatar_url": null,
            "role": "manager"
        },
        {
            "id": 12,
            "name": "Vikram Shah",
            "avatar_url": "https://tasksync.in/storage/avatars/12.jpg",
            "role": "member"
        }
    ],
    "url": "/projects/41"
}

Errors: 401, 404, 429

GET /projects/{project}/summary The project at a glance: progress, milestones, phases, my open tasks, recent activity (MA11)

The project record plus `progress` (top-level tasks done / all, in the lists the person sees), `milestones` (the project's milestone events; private ones only their creator's), `phases` (System Integrator projects), `my_open_tasks` (up to 50, by due date) and `recent_activity` (the last 20 changes on tasks the person sees). 60 a minute.

Answer (200)

{
    "id": 41,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "title": "Head office fit-out",
    "description": null,
    "color": "#2563eb",
    "status": {
        "id": 2,
        "name": "In progress"
    },
    "start_date": "2026-11-01",
    "end_date": "2027-01-31",
    "manager_id": 7,
    "my_role": "member",
    "members": [
        {
            "id": 7,
            "name": "Asha Rao",
            "avatar_url": null,
            "role": "manager"
        },
        {
            "id": 12,
            "name": "Vikram Shah",
            "avatar_url": "https://tasksync.in/storage/avatars/12.jpg",
            "role": "member"
        }
    ],
    "url": "/projects/41",
    "progress": {
        "tasks_total": 42,
        "tasks_done": 30,
        "percent": 71
    },
    "milestones": [
        {
            "id": 5,
            "title": "Site survey signed off",
            "date": "2026-12-05",
            "completed": false,
            "overdue": false
        }
    ],
    "phases": [
        {
            "id": 2,
            "name": "Installation",
            "status": "in_progress",
            "planned_start": "2026-11-15",
            "planned_end": "2026-12-20",
            "actual_end": null
        }
    ],
    "my_open_tasks": [
        {
            "id": 812,
            "title": "Mount the NVR rack",
            "due_date": "2026-12-01",
            "list_id": 31,
            "overdue": false
        }
    ],
    "recent_activity": [
        {
            "id": 9911,
            "type": "task_completed",
            "description": "completed the task",
            "task_id": 807,
            "subject_name": "Pull CAT6 to floor 2",
            "user": {
                "id": 7,
                "name": "Sam Rao",
                "avatar_url": null
            },
            "created_at": "2026-11-30T10:12:00Z"
        }
    ]
}

Errors: 401, 404, 429

GET /task-attachments Files on my tasks and their comments (metadata) sync list

The file itself: `GET /task-attachments/{id}/download`. A file put in the trash on the web sends a tombstone.

First load: Files of the tasks in the tasks window.

Query

task_idOnly this task (no window)

Answer (200)

{
    "data": [
        {
            "id": 230,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "task_id": 812,
            "comment_id": null,
            "file": {
                "id": 901,
                "name": "ups-label.jpg",
                "mime_type": "image/jpeg",
                "size": 284311,
                "readable_size": "277.65 KB",
                "type_category": "image",
                "is_image": true
            },
            "uploaded_by": 12,
            "created_at": "2026-11-25T12:00:00Z"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 422, 429

GET /task-attachments/{attachment}/download A short-lived link to download a file

A signed link valid 5 minutes (no token needed to open it; the person's right to download is checked again). Ask again when it has expired.

Answer (200)

{
    "url": "https://tasksync.in/api/mobile/v1/task-attachments/230/file?c=3&expires=1764072300&u=12&signature=…",
    "expires_at": "2026-11-25T12:05:00Z",
    "name": "ups-label.jpg",
    "mime_type": "image/jpeg",
    "size": 284311
}

Errors: 401, 403, 404, 429

GET /task-attachments/{attachment}/file The file (signed link from …/download) public

The file's bytes (or a redirect for a file kept elsewhere). An expired or edited link → 403.

Errors: 403, 404, 429

GET /task-comments Comments on my tasks sync list

When a task leaves the phone (tombstone), drop its comments with it. `?task_id=` loads all comments of one task.

First load: Comments of the tasks in the tasks window.

Query

task_idOnly this task (no window)

Answer (200)

{
    "data": [
        {
            "id": 5521,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "task_id": 812,
            "author_id": 12,
            "content": "<p>Done on unit 1. @Asha Rao can you check unit 2?</p>",
            "removed": false,
            "from_ai_agent": false,
            "mention_ids": [
                7
            ],
            "created_at": "2026-11-25T12:00:00Z"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 422, 429

DELETE /task-comments/{comment} Delete my comment Idempotency-Key

One's own comment is deleted (`{"id", "deleted": true}`). An owner / admin may remove someone else's: it stays as "removed by an admin" (the comment record comes back with `removed: true`). Others: 403.

Answer (200)

{
    "id": 5521,
    "deleted": true
}

Errors: 401, 403, 404, 423, 429

GET /task-labels Labels for the task form sync list

First load: The company's labels and the global ones, not archived.

Answer (200)

{
    "data": [
        {
            "name": "Electrical",
            "color": "#f59e0b",
            "global": false
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 429

GET /task-lists Task lists of my projects sync list

Each list with the workflow its statuses come from and the extra fields the web's task form shows for it. Private lists only for their people (the web's rule).

First load: All non-archived lists of my projects.

Query

project_idOnly this project's lists

Answer (200)

{
    "data": [
        {
            "id": 97,
            "project_id": 41,
            "title": "Electrical",
            "description": null,
            "is_private": false,
            "sort_order": 2,
            "workflow_id": 1,
            "custom_fields": [
                {
                    "id": 31,
                    "name": "Site",
                    "description": null,
                    "field_type": "text",
                    "options": null,
                    "extra_info": null,
                    "is_required": false
                }
            ]
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 422, 429

GET /task-priorities Priorities (fixed list)

Answer (200)

{
    "data": [
        {
            "key": "urgent",
            "label": "Urgent",
            "color": "#DC2626",
            "rank": 1
        },
        {
            "key": "high",
            "label": "High",
            "color": "#EA580C",
            "rank": 2
        }
    ]
}

Errors: 401, 403, 429

GET /task-statuses Statuses (workflow columns) for the task form sync list

A list's tasks take the statuses with that list's `workflow_id`. `is_done`: moving there completes the task.

First load: Every status of the workflows this company can use.

Answer (200)

{
    "data": [
        {
            "workflow_id": 1,
            "name": "In progress",
            "color": "#3b82f6",
            "sort_order": 1,
            "is_done": false
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 429

GET /task-types Task types for the task form sync list

`required_fields`: what the web requires for a task of this type (due_date, assignee, estimate, description).

First load: The company's task types, not archived.

Answer (200)

{
    "data": [
        {
            "name": "Service",
            "color": "#059669",
            "icon": "lifebuoy",
            "default_estimate_mins": 90,
            "required_fields": [
                "due_date"
            ],
            "sort_order": 0
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 429

GET /tasks My tasks and the tasks of my projects sync list

Tasks and sub-tasks (parent_id) the web shows the person: in projects they are on, or assigned to them. `?project_id=` / `?list_id=` load one project / list (e.g. one new to the cache).

First load: Open tasks, and tasks closed in the last 90 days, of the person's projects and assigned to them (archived projects and lists left out).

Query

project_idOnly this project
list_idOnly this list

Answer (200)

{
    "data": [
        {
            "id": 812,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "number": 17118,
            "title": "Replace UPS battery",
            "description": "<p>Both units in the server room.</p>",
            "project_id": 41,
            "list_id": 97,
            "parent_id": null,
            "status_id": 3,
            "completed": false,
            "completed_at": null,
            "completed_by": null,
            "inspection_status": null,
            "priority": "high",
            "start_date": "2026-11-25",
            "due_date": "2026-11-30",
            "percent_progress": 0,
            "estimated_hours": 2,
            "estimated_mins": 30,
            "task_type_id": 5,
            "assignee_ids": [
                7,
                12
            ],
            "label_ids": [
                4
            ],
            "custom_fields": {
                "31": "Site B"
            },
            "recurring": false,
            "creator_id": 7,
            "created_at": "2026-11-24T09:15:00Z",
            "url": "/tasks/812"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 401, 403, 422, 429

POST /tasks New task (or sub-task) Idempotency-Key

The web's task form: same permission (tasks.create), validation and notices. A sub-task (`parent_id`, a top-level task of the same list) in a project that asks for approval answers `202 {"status": "pending_approval", "subtask_request": {…}}`.

Request

{
    "client_id": "tmp-3f2a",
    "list_id": 97,
    "title": "Replace UPS battery",
    "due_date": "2026-11-30",
    "assignee_ids": [
        12
    ],
    "priority": "high"
}

Answer (201)

{
    "client_id": "tmp-3f2a",
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": 17118,
    "title": "Replace UPS battery",
    "description": "<p>Both units in the server room.</p>",
    "project_id": 41,
    "list_id": 97,
    "parent_id": null,
    "status_id": 3,
    "completed": false,
    "completed_at": null,
    "completed_by": null,
    "inspection_status": null,
    "priority": "high",
    "start_date": "2026-11-25",
    "due_date": "2026-11-30",
    "percent_progress": 0,
    "estimated_hours": 2,
    "estimated_mins": 30,
    "task_type_id": 5,
    "assignee_ids": [
        7,
        12
    ],
    "label_ids": [
        4
    ],
    "custom_fields": {
        "31": "Site B"
    },
    "recurring": false,
    "creator_id": 7,
    "created_at": "2026-11-24T09:15:00Z",
    "url": "/tasks/812"
}

Errors: 401, 403, 404, 422, 423, 429

GET /tasks/{task} One task (deep link /tasks/{id})

Any task the web lets the person open; 404 otherwise.

Answer (200)

{
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": 17118,
    "title": "Replace UPS battery",
    "description": "<p>Both units in the server room.</p>",
    "project_id": 41,
    "list_id": 97,
    "parent_id": null,
    "status_id": 3,
    "completed": false,
    "completed_at": null,
    "completed_by": null,
    "inspection_status": null,
    "priority": "high",
    "start_date": "2026-11-25",
    "due_date": "2026-11-30",
    "percent_progress": 0,
    "estimated_hours": 2,
    "estimated_mins": 30,
    "task_type_id": 5,
    "assignee_ids": [
        7,
        12
    ],
    "label_ids": [
        4
    ],
    "custom_fields": {
        "31": "Site B"
    },
    "recurring": false,
    "creator_id": 7,
    "created_at": "2026-11-24T09:15:00Z",
    "url": "/tasks/812"
}

Errors: 401, 403, 404, 429

PATCH /tasks/{task} Change a task (only the fields sent) Idempotency-Key If-Match

If-Match is required (412 without). The web's edit: permission tasks.edit, validation, locks. A later due date that needs the manager's approval is asked for and the answer has `pending_approval.due_date` (the other changes are saved).

Request

{
    "title": "Replace both UPS batteries",
    "label_ids": [
        4,
        9
    ]
}

Answer (200)

{
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": 17118,
    "title": "Replace UPS battery",
    "description": "<p>Both units in the server room.</p>",
    "project_id": 41,
    "list_id": 97,
    "parent_id": null,
    "status_id": 3,
    "completed": false,
    "completed_at": null,
    "completed_by": null,
    "inspection_status": null,
    "priority": "high",
    "start_date": "2026-11-25",
    "due_date": "2026-11-30",
    "percent_progress": 0,
    "estimated_hours": 2,
    "estimated_mins": 30,
    "task_type_id": 5,
    "assignee_ids": [
        7,
        12
    ],
    "label_ids": [
        4
    ],
    "custom_fields": {
        "31": "Site B"
    },
    "recurring": false,
    "creator_id": 7,
    "created_at": "2026-11-24T09:15:00Z",
    "url": "/tasks/812"
}

Errors: 401, 403, 404, 409, 412, 422, 423, 429

POST /tasks/{task}/attachments Upload files to a task (multipart) Idempotency-Key

`multipart/form-data` with `files[]` (or one `file`), and the Idempotency-Key header. The web's limits: 50 MB a file, the project's storage and the account's; needs the right to edit tasks and to upload files. Answers the new attachment records.

Answer (201)

{
    "data": [
        {
            "id": 230,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "task_id": 812,
            "comment_id": null,
            "file": {
                "id": 901,
                "name": "ups-label.jpg",
                "mime_type": "image/jpeg",
                "size": 284311,
                "readable_size": "277.65 KB",
                "type_category": "image",
                "is_image": true
            },
            "uploaded_by": 12,
            "created_at": "2026-11-25T12:00:00Z"
        }
    ]
}

Errors: 401, 403, 404, 422, 423, 429

POST /tasks/{task}/comments Comment on a task Idempotency-Key

Mention people as the web does: "@First Last" (or "@First" when only one person has that first name) among the project's people; they are told. The task's assignees are notified.

Request

{
    "client_id": "tmp-c9",
    "content": "Done on unit 1. @Asha Rao can you check unit 2?"
}

Answer (201)

{
    "client_id": "tmp-c9",
    "id": 5521,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "task_id": 812,
    "author_id": 12,
    "content": "<p>Done on unit 1. @Asha Rao can you check unit 2?</p>",
    "removed": false,
    "from_ai_agent": false,
    "mention_ids": [
        7
    ],
    "created_at": "2026-11-25T12:00:00Z"
}

Errors: 401, 403, 404, 422, 423, 429

POST /tasks/{task}/complete Complete a task Idempotency-Key If-Match

The web's tick: permission tasks.complete, sequence / dependencies / workflow rules. `checklist` and `answers` when the company asks questions on completing (a 422 lists them). A task that needs inspection answers `202 {"status": "pending_approval", "task": {…}}`. Already completed: the task as it is.

Request

{}

Answer (200)

{
    "completed": true,
    "completed_at": "2026-11-25T12:00:00Z",
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": 17118,
    "title": "Replace UPS battery",
    "description": "<p>Both units in the server room.</p>",
    "project_id": 41,
    "list_id": 97,
    "parent_id": null,
    "status_id": 3,
    "completed_by": null,
    "inspection_status": null,
    "priority": "high",
    "start_date": "2026-11-25",
    "due_date": "2026-11-30",
    "percent_progress": 0,
    "estimated_hours": 2,
    "estimated_mins": 30,
    "task_type_id": 5,
    "assignee_ids": [
        7,
        12
    ],
    "label_ids": [
        4
    ],
    "custom_fields": {
        "31": "Site B"
    },
    "recurring": false,
    "creator_id": 7,
    "created_at": "2026-11-24T09:15:00Z",
    "url": "/tasks/812"
}

Errors: 401, 403, 404, 409, 422, 423, 429

POST /tasks/{task}/reopen Reopen a completed task Idempotency-Key If-Match

Request

{}

Answer (200)

{
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": 17118,
    "title": "Replace UPS battery",
    "description": "<p>Both units in the server room.</p>",
    "project_id": 41,
    "list_id": 97,
    "parent_id": null,
    "status_id": 3,
    "completed": false,
    "completed_at": null,
    "completed_by": null,
    "inspection_status": null,
    "priority": "high",
    "start_date": "2026-11-25",
    "due_date": "2026-11-30",
    "percent_progress": 0,
    "estimated_hours": 2,
    "estimated_mins": 30,
    "task_type_id": 5,
    "assignee_ids": [
        7,
        12
    ],
    "label_ids": [
        4
    ],
    "custom_fields": {
        "31": "Site B"
    },
    "recurring": false,
    "creator_id": 7,
    "created_at": "2026-11-24T09:15:00Z",
    "url": "/tasks/812"
}

Errors: 401, 403, 404, 409, 422, 423, 429

POST /tasks/{task}/status Move a task to another status Idempotency-Key If-Match

A status of the list's workflow (`task-statuses`). A done status completes the task (needs tasks.complete); inspection → 202.

Request

{
    "status_id": 3
}

Answer (200)

{
    "id": 812,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "number": 17118,
    "title": "Replace UPS battery",
    "description": "<p>Both units in the server room.</p>",
    "project_id": 41,
    "list_id": 97,
    "parent_id": null,
    "status_id": 3,
    "completed": false,
    "completed_at": null,
    "completed_by": null,
    "inspection_status": null,
    "priority": "high",
    "start_date": "2026-11-25",
    "due_date": "2026-11-30",
    "percent_progress": 0,
    "estimated_hours": 2,
    "estimated_mins": 30,
    "task_type_id": 5,
    "assignee_ids": [
        7,
        12
    ],
    "label_ids": [
        4
    ],
    "custom_fields": {
        "31": "Site B"
    },
    "recurring": false,
    "creator_id": 7,
    "created_at": "2026-11-24T09:15:00Z",
    "url": "/tasks/812"
}

Errors: 401, 403, 404, 409, 422, 423, 429

Time

GET /time/entries My time entries sync list

My finished entries in this company (a running or paused timer is in /time/timer until it stops). `locked`: the week was approved (changes answer 423). `editable`: I may change it (the web's "edit own time" permission and not locked). Deleted entries, and entries moved to someone else, come in `deleted` (reasons `deleted` / `no_access`).

First load: Entries dated in the last 60 days and the whole current week (in my time zone); deltas carry changes to older ones too

Answer (200)

{
    "data": [
        {
            "id": 5531,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T12:00:00Z",
            "date": "2026-11-25",
            "week": "2026-11-23",
            "project": {
                "id": 4,
                "title": "Plant upgrade"
            },
            "task": {
                "id": 812,
                "title": "Survey site"
            },
            "timesheet_id": 9,
            "hours": 1,
            "mins": 30,
            "minutes": 90,
            "description": "Pump check",
            "status": "billable",
            "billable": true,
            "locked": false,
            "editable": true,
            "badges": {
                "auto_stopped": false,
                "stopped_reason": "manual",
                "needs_review": false,
                "reviewed": false,
                "edited": false
            }
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /time/entries Log time by hand Idempotency-Key

My time → Add time: a project I am on, optionally one of its tasks, a date (today or earlier), and the time as `duration` ("1:30", "1.5", "90m") or `start_time` + `end_time` ("09:15"), at most 24 hours. An approved week refuses it (422 on `date`).

Request

{
    "client_id": "tmp-7",
    "project_id": 4,
    "task_id": 812,
    "date": "2026-11-25",
    "duration": "1:30",
    "description": "Pump check",
    "billable": true
}

Answer (201)

{
    "id": 5531,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "date": "2026-11-25",
    "week": "2026-11-23",
    "project": {
        "id": 4,
        "title": "Plant upgrade"
    },
    "task": {
        "id": 812,
        "title": "Survey site"
    },
    "timesheet_id": 9,
    "hours": 1,
    "mins": 30,
    "minutes": 90,
    "description": "Pump check",
    "status": "billable",
    "billable": true,
    "locked": false,
    "editable": true,
    "badges": {
        "auto_stopped": false,
        "stopped_reason": "manual",
        "needs_review": false,
        "reviewed": false,
        "edited": false
    },
    "client_id": "tmp-7",
    "message": "Time added."
}

Errors: 403, 422, 423

DELETE /time/entries/{entry} Delete one of my entries Idempotency-Key If-Match

Answer (200)

{
    "id": 5531,
    "deleted": true,
    "message": "Time entry deleted."
}

Errors: 403, 404, 409, 422, 423

PATCH /time/entries/{entry} Change one of my entries (only the fields sent) Idempotency-Key If-Match

Request

{
    "duration": "2:00",
    "description": "Pump and valves"
}

Answer (200)

{
    "minutes": 120,
    "description": "Pump and valves",
    "id": 5531,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T12:00:00Z",
    "date": "2026-11-25",
    "week": "2026-11-23",
    "project": {
        "id": 4,
        "title": "Plant upgrade"
    },
    "task": {
        "id": 812,
        "title": "Survey site"
    },
    "timesheet_id": 9,
    "hours": 1,
    "mins": 30,
    "status": "billable",
    "billable": true,
    "locked": false,
    "editable": true,
    "badges": {
        "auto_stopped": false,
        "stopped_reason": "manual",
        "needs_review": false,
        "reviewed": false,
        "edited": false
    },
    "message": "Time entry updated."
}

Errors: 403, 404, 409, 422, 423

GET /time/projects Projects I may log time to (picker) sync list

Always a full answer.

First load: Every project I may log to

Answer (200)

{
    "data": [
        {
            "id": 4,
            "title": "Plant upgrade",
            "default_billable": true
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

GET /time/projects/{project}/tasks Tasks of a project I may log to (picker, online)

Answer (200)

{
    "data": [
        {
            "id": 812,
            "title": "Survey site"
        }
    ]
}

Errors: 404, 422

GET /time/timer My running or paused timer (one record, or none) sync list

Always a full answer (`meta.full: true`): replace the cached timer with what is sent; an empty `data` means no timer. A timer started on the web shows here and the other way round. `elapsed_seconds` is counted up to the answer's server_time.

First load: The timer, if there is one

Answer (200)

{
    "data": [
        {
            "id": 5532,
            "version": 1764072000000000,
            "updated_at": "2026-11-25T09:30:00Z",
            "state": "running",
            "started_at": "2026-11-25T09:30:00Z",
            "paused_at": null,
            "counted_seconds": 0,
            "elapsed_seconds": 9000,
            "date": "2026-11-25",
            "project": {
                "id": 4,
                "title": "Plant upgrade"
            },
            "task": {
                "id": 812,
                "title": "Survey site"
            },
            "timesheet_id": 9,
            "description": null,
            "status": "none"
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /time/timer/beat Heartbeat: the timer is still open in the app Idempotency-Key (optional)

As an open web tab does. Without beats, the company's stale-timer rule (no TaskSync open for 15 minutes by default) stops the timer.

Answer (200)

{
    "timer": {
        "id": 5532,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T09:30:00Z",
        "state": "running",
        "started_at": "2026-11-25T09:30:00Z",
        "paused_at": null,
        "counted_seconds": 0,
        "elapsed_seconds": 9000,
        "date": "2026-11-25",
        "project": {
            "id": 4,
            "title": "Plant upgrade"
        },
        "task": {
            "id": 812,
            "title": "Survey site"
        },
        "timesheet_id": 9,
        "description": null,
        "status": "none"
    }
}

Errors: 429

POST /time/timer/start Start a timer (on a project, optionally a task) Idempotency-Key

A second timer is refused as on the web: 422 `timer_running` with the running one in `current`. Offline: send `started_at` (when the phone started it) — kept when it is not in the future (2 minutes of clock drift are allowed) and not longer ago than the company's maximum timer length (24 hours at most); older → 422.

Request

{
    "client_id": "tmr-1",
    "project_id": 4,
    "task_id": 812,
    "started_at": "2026-11-25T09:30:00Z"
}

Answer (201)

{
    "id": 5532,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T09:30:00Z",
    "state": "running",
    "started_at": "2026-11-25T09:30:00Z",
    "paused_at": null,
    "counted_seconds": 0,
    "elapsed_seconds": 9000,
    "date": "2026-11-25",
    "project": {
        "id": 4,
        "title": "Plant upgrade"
    },
    "task": {
        "id": 812,
        "title": "Survey site"
    },
    "timesheet_id": 9,
    "description": null,
    "status": "none",
    "client_id": "tmr-1",
    "message": "Timer started."
}

Errors: 403, 422, 423

POST /time/timer/{entry}/pause Pause my timer Idempotency-Key

Offline: `paused_at`. Not running any more → 409 with `current`.

Request

{
    "paused_at": "2026-11-25T11:00:00Z"
}

Answer (200)

{
    "state": "paused",
    "paused_at": "2026-11-25T11:00:00Z",
    "counted_seconds": 5400,
    "id": 5532,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T09:30:00Z",
    "started_at": "2026-11-25T09:30:00Z",
    "elapsed_seconds": 9000,
    "date": "2026-11-25",
    "project": {
        "id": 4,
        "title": "Plant upgrade"
    },
    "task": {
        "id": 812,
        "title": "Survey site"
    },
    "timesheet_id": 9,
    "description": null,
    "status": "none",
    "message": "Timer paused."
}

Errors: 403, 404, 409, 422, 423

POST /time/timer/{entry}/resume Resume my paused timer Idempotency-Key

Offline: `resumed_at`. Not paused any more → 409 with `current`.

Request

{
    "resumed_at": "2026-11-25T11:20:00Z"
}

Answer (200)

{
    "id": 5532,
    "version": 1764072000000000,
    "updated_at": "2026-11-25T09:30:00Z",
    "state": "running",
    "started_at": "2026-11-25T09:30:00Z",
    "paused_at": null,
    "counted_seconds": 0,
    "elapsed_seconds": 9000,
    "date": "2026-11-25",
    "project": {
        "id": 4,
        "title": "Plant upgrade"
    },
    "task": {
        "id": 812,
        "title": "Survey site"
    },
    "timesheet_id": 9,
    "description": null,
    "status": "none",
    "message": "Timer resumed."
}

Errors: 403, 404, 409, 422, 423

POST /time/timer/{entry}/stop Stop my timer and keep its time as an entry Idempotency-Key

Offline: `stopped_at` — the timer stops at that moment (never before its last start, never after now). Already stopped (on the web, by the stale rule…) → 409 with the entry it became in `current`. `discarded: true` when the web's rules kept no time (more than 24 hours, or both weeks approved) — `message` says why.

Request

{
    "stopped_at": "2026-11-25T12:00:00Z",
    "description": "Survey done",
    "billable": true
}

Answer (200)

{
    "time_entry": {
        "id": 5531,
        "version": 1764072000000000,
        "updated_at": "2026-11-25T12:00:00Z",
        "date": "2026-11-25",
        "week": "2026-11-23",
        "project": {
            "id": 4,
            "title": "Plant upgrade"
        },
        "task": {
            "id": 812,
            "title": "Survey site"
        },
        "timesheet_id": 9,
        "hours": 1,
        "mins": 30,
        "minutes": 90,
        "description": "Pump check",
        "status": "billable",
        "billable": true,
        "locked": false,
        "editable": true,
        "badges": {
            "auto_stopped": false,
            "stopped_reason": "manual",
            "needs_review": false,
            "reviewed": false,
            "edited": false
        }
    },
    "discarded": false,
    "moved": false,
    "message": "Timer stopped and time entry saved."
}

Errors: 403, 404, 409, 422, 423

GET /time/weeks My weeks (timesheets) and where each stands sync list

Always a full answer. `status`: open, waiting (submitted), approved (locked), rejected (sent back with `note`). `id` = the week's Monday as yyyymmdd.

First load: Every week of the time entries window (about 10 weeks), newest first

Answer (200)

{
    "data": [
        {
            "id": 20261116,
            "version": 1764072000000000,
            "updated_at": "2026-11-24T08:00:00Z",
            "week": "2026-11-16",
            "week_end": "2026-11-22",
            "status": "waiting",
            "submitted_at": "2026-11-24T08:00:00Z",
            "resubmitted": false,
            "note": null,
            "decided_by": null,
            "decided_at": null,
            "waiting_on": "Waiting on Asha Rao (step 1 of 2)",
            "seconds": 144000,
            "entries": 12,
            "locked": false,
            "can_submit": false
        }
    ],
    "deleted": [],
    "meta": {
        "server_time": "2026-11-25T12:00:00Z",
        "next_cursor": null,
        "has_more": false,
        "full": true
    }
}

Errors: 403

POST /time/weeks/submit Submit a week of my time for approval Idempotency-Key

Request

{
    "week": "2026-11-16",
    "note": "All in"
}

Answer (200)

{
    "id": 20261116,
    "version": 1764072000000000,
    "updated_at": "2026-11-24T08:00:00Z",
    "week": "2026-11-16",
    "week_end": "2026-11-22",
    "status": "waiting",
    "submitted_at": "2026-11-24T08:00:00Z",
    "resubmitted": false,
    "note": null,
    "decided_by": null,
    "decided_at": null,
    "waiting_on": "Waiting on Asha Rao (step 1 of 2)",
    "seconds": 144000,
    "entries": 12,
    "locked": false,
    "can_submit": false,
    "message": "Week of Nov 16 submitted for approval."
}

Errors: 403, 422

Error codes

StatusCodeMeaning
400bad_requestThe request could not be understood.
400idempotency_key_requiredA change was sent without an Idempotency-Key.
400idempotency_key_invalidThe Idempotency-Key is not a UUID.
400invalid_cursorThe cursor is not valid (edited, or from another list). Start the list again.
401unauthenticatedNo token, or a revoked / expired one: sign in again.
403forbiddenThe person may not do this (the same rules as the web).
403company_forbiddenX-Company-Id is not one of the person's companies.
403plan_requiredThe company's plan or add-ons do not include this.
403handed_offA lead the person handed on (HOF1): only notes, activities, follow-ups, calls and WhatsApp — no other change.
404not_foundNot there — or not theirs to see.
409conflictThe record changed since the version sent; `current` holds the server copy.
409ambiguousMA12: a packing label fits several orders; `choices` lists them — send one as allocation_id.
409request_in_progressThe same Idempotency-Key is still being handled; retry shortly.
410goneThe record was deleted.
410resync_requiredupdated_since is older than the tombstone window (30 days): load the list again.
412precondition_failedAn update that needs the record's version was sent without one.
422validation_failedInput not valid; `fields` has the messages per field.
422task_visitMA11: this maintenance visit is a task — work it through /tasks/{id} (task_id is in the error).
422idempotency_key_reusedThe Idempotency-Key was used before for a different request.
423lockedLocked by a phase gate, sequence, approval or closed period.
423read_onlyThe account or add-on is read-only.
429rate_limitedToo many requests; wait Retry-After seconds.
500server_errorSomething went wrong on the server; retry later (writes keep their Idempotency-Key).
✓