Skip to content

CRM tasks

CRM tasks are the follow-ups a business keeps on its CRM records: the Tasks tab of the CRM and the Tasks section of a person, company, opportunity or client. Each has a title, a status, a due date and assignees, may carry files, and is on at most one record. They are separate from the tasks on a project’s board and from work types.

Every endpoint acts as the person whose personal access token is used. Whoever may use the CRM module may read, create, change and delete every CRM task in the business, as on the CRM’s Tasks tab: a member, a manager and an administrator with that permission see the same tasks, whoever they are assigned to. A person without the CRM module can still work with the tasks of clients, as on a client’s Tasks section: reading them needs the permission to view clients, and creating, changing or deleting them the permission to edit clients; such a person sees only tasks that belong to a client, and gets 404 for any other task. Administrators hold every permission. A person without the permission an endpoint needs gets 403. No task field is hidden by permission.

One CRM task.

Field Type Description
id string The task’s id. Read only.
title string What has to be done: the task’s name in the CRM Tasks list.
description string Longer notes on the task, as HTML from the app’s editor, or null. Can be null.
status string Where the task stands, as the app shows it: noStatus (No Status), toDo (To Do), inProgress (In Progress) or done (Done). A task is complete when its status is done.
dueDate datetime When the task is due, or null. The app shows it as a day in the reader’s time zone. Can be null.
relation crmTaskRelation The record the task is on, or null when it is on no record. A task on a client is on that client’s company, or on the person who is the individual client; client then names the client. Can be null.
client object The client the task belongs to, { id, name }: the company client whose company the task is on, or the individual client who is the task’s person. Null otherwise. Read only. Can be null.
assignees array of object The team members the task is assigned to, each { id, name }. Empty when it is assigned to nobody.
createdBy object The team member who created the task, { id, name }, or null when that is not known. Read only. Can be null.
fileCount integer How many files are attached. List them with List a task’s files. Read only.
createdAt datetime When the task was created (Creation date in the app). Read only.
updatedAt datetime When the task last changed. Read only.

The record a CRM task is on.

Field Type Description
type string What kind of record it is: person, company or opportunity.
id string The record’s id: a person, company or opportunity id.
name string The record’s name.

A file attached to a CRM task.

Field Type Description
id string The file’s id. Read only.
name string The file name shown in the app. Rename it with Rename a task file.
fileType string The file’s extension, such as pdf, or null. Read only. Can be null.
size integer Size in bytes, or null when not recorded. Read only. Can be null.
uploadedBy object The team member who attached it, { id, name }, or null. Read only. Can be null.
createdAt datetime When it was attached. Read only.
updatedAt datetime When it last changed. Read only.

Returns the business’s CRM tasks, newest first by default. Filters combine: for example, filterAssigneeIds with filterStatuses=toDo,inProgress gives someone’s open tasks, and filterClientIds gives one client’s tasks as its Tasks section shows them. Tasks without a due date are left out when from or to is sent.

GET /v1/crm-tasks

Parameters

Parameter In Type Required Description
page query integer No Page number, from 1. Default 1.
limit query integer No Rows per page. Default 20, at most 1000.
search query string No Text in the title or description.
filterStatuses query string No Comma-separated statuses: noStatus, toDo, inProgress, done.
filterAssigneeIds query string No Comma-separated team member ids: tasks assigned to any of them.
isAssigned query boolean No true: only tasks with at least one assignee; false: only tasks assigned to nobody.
filterRelationTypes query string No Comma-separated record kinds: person, company, opportunity.
hasRelation query boolean No true: only tasks on a record; false: only tasks on no record.
filterPersonIds query string No Comma-separated person ids: tasks on those people.
filterCompanyIds query string No Comma-separated company ids: tasks on those companies.
filterOpportunityIds query string No Comma-separated opportunity ids: tasks on those opportunities.
filterClientIds query string No Comma-separated client ids: tasks on those clients (on a company client’s company, or an individual client’s person).
from query date No Only tasks due on or after this day (UTC).
to query date No Only tasks due on or before this day (UTC).
updatedSince query datetime No Only records changed at or after this moment. Records deleted since then are not reported.
sortField query string No createdAt (default), updatedAt, title, status or dueDate.
sortOrder query string No asc or desc (default).

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, view clients.
  • A person who may not use the CRM module but may view clients gets only tasks that belong to a client.
  • 400 when from, to or updatedSince is not valid, to is before from, or sortField, sortOrder, a status or a record kind is not one of the listed values.
  • Ids in the id filters that are not in the business match nothing; the request still answers 200.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks?filterAssigneeIds=cm0p4a2fk0003qz71wb8yc6dn&filterStatuses=toDo,inProgress&sortField=dueDate&sortOrder=asc&limit=2" \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"data": [
{
"id": "cm7k2p9xq0012ab34cd56ef78",
"title": "Send the revised proposal",
"description": "<p>Include the phase two estimate and the new timeline.</p>",
"status": "inProgress",
"dueDate": "2026-11-28T15:30:00.000Z",
"relation": {
"type": "opportunity",
"id": "cm5r1d7ke0007mx41s2t9u3vb",
"name": "Website redesign 2027"
},
"client": null,
"assignees": [
{
"id": "cm0p4a2fk0003qz71wb8yc6dn",
"name": "Sam Patel"
}
],
"createdBy": {
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
},
"fileCount": 1,
"createdAt": "2026-11-18T09:12:44.310Z",
"updatedAt": "2026-11-20T14:02:07.958Z"
},
{
"id": "cm7k3b1rz0019ab34gh90ij12",
"title": "Collect signed contract",
"description": null,
"status": "toDo",
"dueDate": "2026-12-02T12:00:00.000Z",
"relation": {
"type": "company",
"id": "cm3qj8t4d0002l208v6b1n0wx",
"name": "Brightline Studio"
},
"client": {
"id": "cm3qk1x7a0004l208c2vh9e1t",
"name": "Brightline Studio"
},
"assignees": [
{
"id": "cm0p4a2fk0003qz71wb8yc6dn",
"name": "Sam Patel"
},
{
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
}
],
"createdBy": {
"id": "cm0p4a2fk0003qz71wb8yc6dn",
"name": "Sam Patel"
},
"fileCount": 0,
"createdAt": "2026-11-21T10:05:31.204Z",
"updatedAt": "2026-11-21T10:05:31.204Z"
}
],
"totalCount": 5,
"page": 1,
"limit": 2
}

Returns one CRM task.

GET /v1/crm-tasks/:id

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, view clients.
  • 404 when the task does not exist in the business, or does not belong to a client and the person may not use the CRM module.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k2p9xq0012ab34cd56ef78" \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"data": {
"id": "cm7k2p9xq0012ab34cd56ef78",
"title": "Send the revised proposal",
"description": "<p>Include the phase two estimate and the new timeline.</p>",
"status": "inProgress",
"dueDate": "2026-11-28T15:30:00.000Z",
"relation": {
"type": "opportunity",
"id": "cm5r1d7ke0007mx41s2t9u3vb",
"name": "Website redesign 2027"
},
"client": null,
"assignees": [
{
"id": "cm0p4a2fk0003qz71wb8yc6dn",
"name": "Sam Patel"
}
],
"createdBy": {
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
},
"fileCount": 1,
"createdAt": "2026-11-18T09:12:44.310Z",
"updatedAt": "2026-11-20T14:02:07.958Z"
}
}

Creates a task, on a record or on none. The token’s person is recorded as its creator. A task created on a record is noted in that record’s activity, and on a client’s, in the client’s.

POST /v1/crm-tasks

Parameters

Parameter In Type Required Description
title body string Yes What has to be done.
description body string No Notes, as plain text or HTML.
status body string No noStatus, toDo (default), inProgress or done.
dueDate body datetime No When it is due: a moment, or a day YYYY-MM-DD, which is saved as 12:00 UTC on that day.
assigneeIds body array of string No Team member ids to assign the task to. Default: nobody.
relation body object No The record to put the task on: { "type": "person" | "company" | "opportunity" | "client", "id": "…" }. A client stands for its company, or for the person who is the individual client. Leave out for a task on no record.

Rules

  • 403 when the person may not use the CRM module, unless the task is created on a client and the person may edit clients.
  • 400 when the title is empty, the status is not one of the listed values, the due date is not a valid day or moment, relation.type is not one of the listed values, or an assignee id is repeated.
  • 404 when the record in relation or an assignee is not in the business.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks" \
-X POST \
-H "X-API-Key: $ONESUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Collect signed contract","dueDate":"2026-12-02","assigneeIds":["cm0p4a2fk0003qz71wb8yc6dn","cm0p4c9hu0005qz71jr3ke5mp"],"relation":{"type":"client","id":"cm3qk1x7a0004l208c2vh9e1t"}}'

Example response — status 201

{
"data": {
"id": "cm7k3b1rz0019ab34gh90ij12",
"title": "Collect signed contract",
"description": null,
"status": "toDo",
"dueDate": "2026-12-02T12:00:00.000Z",
"relation": {
"type": "company",
"id": "cm3qj8t4d0002l208v6b1n0wx",
"name": "Brightline Studio"
},
"client": {
"id": "cm3qk1x7a0004l208c2vh9e1t",
"name": "Brightline Studio"
},
"assignees": [
{
"id": "cm0p4a2fk0003qz71wb8yc6dn",
"name": "Sam Patel"
},
{
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
}
],
"createdBy": {
"id": "cm0p4a2fk0003qz71wb8yc6dn",
"name": "Sam Patel"
},
"fileCount": 0,
"createdAt": "2026-11-21T10:05:31.204Z",
"updatedAt": "2026-11-21T10:05:31.204Z"
}
}

Changes the fields sent and leaves the rest as they are: title, description, status, due date, assignees and the record the task is on. Each change is noted in the activity of the record the task is on. A request that changes nothing saves nothing and answers 200.

PATCH /v1/crm-tasks/:id

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.
title body string No New title.
description body string No New notes, or null or an empty string to clear them.
status body string No noStatus, toDo, inProgress or done. Send done to complete the task.
dueDate body datetime No New due moment or day YYYY-MM-DD (saved as 12:00 UTC), or null to clear it.
assigneeIds body array of string No The complete list of assignees: members not in it are unassigned, new ones assigned. An empty list unassigns everyone.
relation body object No The record to put the task on: { "type": "person" | "company" | "opportunity" | "client", "id": "…" }. A client stands for its company, or for the person who is the individual client. Moves the task off any other record. null takes it off its record.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, edit clients. Moving a task onto or off a client counts as a task on a client only when both its old and new record belong to a client.
  • 404 when the task does not exist in the business, or does not belong to a client and the person may not use the CRM module.
  • 400 when the body is empty, the title is empty, a status or relation.type is not one of the listed values, the due date is not valid, or an assignee id is repeated.
  • 404 when the record in relation or an assignee is not in the business.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k2p9xq0012ab34cd56ef78" \
-X PATCH \
-H "X-API-Key: $ONESUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status":"done","assigneeIds":["cm0p4a2fk0003qz71wb8yc6dn","cm0p4c9hu0005qz71jr3ke5mp"]}'

Example response — status 200

{
"data": {
"id": "cm7k2p9xq0012ab34cd56ef78",
"title": "Send the revised proposal",
"description": "<p>Include the phase two estimate and the new timeline.</p>",
"status": "done",
"dueDate": "2026-11-28T15:30:00.000Z",
"relation": {
"type": "opportunity",
"id": "cm5r1d7ke0007mx41s2t9u3vb",
"name": "Website redesign 2027"
},
"client": null,
"assignees": [
{
"id": "cm0p4a2fk0003qz71wb8yc6dn",
"name": "Sam Patel"
},
{
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
}
],
"createdBy": {
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
},
"fileCount": 1,
"createdAt": "2026-11-18T09:12:44.310Z",
"updatedAt": "2026-11-21T11:40:19.527Z"
}
}

Permanently deletes the task and its files.

DELETE /v1/crm-tasks/:id

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, edit clients.
  • 404 when the task does not exist in the business, or does not belong to a client and the person may not use the CRM module.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k3b1rz0019ab34gh90ij12" \
-X DELETE \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"message": "Task deleted"
}

Returns the files attached to a CRM task, newest first.

GET /v1/crm-tasks/:id/files

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.
page query integer No Page number, from 1. Default 1.
limit query integer No Rows per page. Default 20, at most 1000.
updatedSince query datetime No Only records changed at or after this moment. Records deleted since then are not reported.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, view clients.
  • 404 when the task does not exist in the business or is not visible to the person.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k2p9xq0012ab34cd56ef78/files" \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"data": [
{
"id": "cm7k4f6ws001cab34kl34mn56",
"name": "proposal-v2.pdf",
"fileType": "pdf",
"size": 482113,
"uploadedBy": {
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
},
"createdAt": "2026-11-20T14:02:07.120Z",
"updatedAt": "2026-11-20T14:02:07.120Z"
}
],
"totalCount": 1,
"page": 1,
"limit": 20
}

Uploads one file and attaches it to the task. Send multipart/form-data with the file in the file field. The file also appears among the files of the record the task is on, and the upload is noted in that record’s activity.

POST /v1/crm-tasks/:id/files

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.
file body string Yes The file, in a multipart/form-data request: at most 25 MB. Programs and scripts (such as .exe, .js, .sh) are refused.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, edit clients.
  • 404 when the task does not exist in the business or is not visible to the person.
  • 400 when no file is sent, the file is larger than 25 MB, or its type is not accepted.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k2p9xq0012ab34cd56ef78/files" \
-X POST \
-H "X-API-Key: $ONESUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file":"(binary: proposal-v2.pdf)"}'

Example response — status 201

{
"data": {
"id": "cm7k4f6ws001cab34kl34mn56",
"name": "proposal-v2.pdf",
"fileType": "pdf",
"size": 482113,
"uploadedBy": {
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
},
"createdAt": "2026-11-20T14:02:07.120Z",
"updatedAt": "2026-11-20T14:02:07.120Z"
}
}

Changes the name a task file is shown under. The file itself is not changed.

PATCH /v1/crm-tasks/:id/files/:fileId

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.
fileId path string Yes The file’s id.
name body string Yes New file name, not empty.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, edit clients.
  • 404 when the task or the file does not exist, the file is not on this task, or the task is not visible to the person.
  • 400 when the name is empty.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k2p9xq0012ab34cd56ef78/files/cm7k4f6ws001cab34kl34mn56" \
-X PATCH \
-H "X-API-Key: $ONESUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Proposal - phase two.pdf"}'

Example response — status 200

{
"data": {
"id": "cm7k4f6ws001cab34kl34mn56",
"name": "Proposal - phase two.pdf",
"fileType": "pdf",
"size": 482113,
"uploadedBy": {
"id": "cm0p4c9hu0005qz71jr3ke5mp",
"name": "Alex Kim"
},
"createdAt": "2026-11-20T14:02:07.120Z",
"updatedAt": "2026-11-21T08:15:52.661Z"
}
}

Deletes a file from the task, and from the files of the record the task is on.

DELETE /v1/crm-tasks/:id/files/:fileId

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.
fileId path string Yes The file’s id.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, edit clients.
  • 404 when the task or the file does not exist, the file is not on this task, or the task is not visible to the person.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k2p9xq0012ab34cd56ef78/files/cm7k4f6ws001cab34kl34mn56" \
-X DELETE \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"message": "File deleted"
}

Returns the file’s contents, with its content type and its name as the download name.

GET /v1/crm-tasks/:id/files/:fileId/download

Parameters

Parameter In Type Required Description
id path string Yes The task’s id.
fileId path string Yes The file’s id.

Rules

  • 403 when the person may neither use the CRM module nor, for a task on a client, view clients.
  • 404 when the task or the file does not exist, the file is not on this task, or the task is not visible to the person.

Example request

Terminal window
curl "https://api.onesuite.io/v1/crm-tasks/cm7k2p9xq0012ab34cd56ef78/files/cm7k4f6ws001cab34kl34mn56/download" \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

"(binary contents of proposal-v2.pdf; Content-Type: application/pdf; Content-Disposition: attachment; filename=\"proposal-v2.pdf\")"