Tasks

The Tasks API provides a simple interface to manage tasks. The API allows you to create, delete and update your tasks. You can retrieve a single task, as well as list of all tasks.

A task can be either floating or related. Floating tasks are only associated with a user, whereas related tasks are associated with one of listed resources:

Properties

Attribute Description
id number readonly

Unique identifier of the task.

creator_id number readonly

Unique identifier of the user who created the task.

owner_id number

Unique identifier of the user the task is assigned to.

resource_type string

Name of the resource type the task is attached to.

Possible values:

  • lead
  • contact
  • deal
resource_id number

Unique identifier of the resource the task is attached to.

completed boolean

Indicator of whether the task is completed or not.

completed_at string readonly

Date and time of the task’s completion in UTC (ISO8601 format).

due_date string

Date and time of creation in UTC (ISO8601 format).

overdue boolean readonly

Indicator for whether the task has passed the due_date or not.

remind_at string

Date and time that we should send you a reminder in UTC (ISO8601 format).

content string

Content of the task.

created_at string readonly

Date and time of task creation in UTC (ISO8601 format).

updated_at string readonly

Date and time of the last update to the task in UTC (ISO8601 format).


Endpoints


Retrieve all tasks

Returns all tasks available to the user, according to the parameters provided.

If you ask for tasks without any parameter provided Base API will return you both floating and related tasks. Although you can narrow the search set to either of them via query parameters.

Parameters

Attribute Description
page number optional

Page number to start from. Page numbering starts at 1 and omitting the page parameter will return the first page.

e.g. ?page=2
per_page number optional

Number of records to return per page. The default limit is 25 and the maximum number that can be returned is 100.

e.g. ?per_page=20
sort_by string optional

A field to sort by. The default ordering is ascending. If you want to change the sort order to descending, append :desc to the field e.g. sort_by=resource_type:desc.

Possible values:

  • resource_type
  • completed_at
  • due_date
  • created_at
  • updated_at
e.g. ?sort_by=created_at
ids string optional

Comma-separated list of task IDs to be returned in a request.

e.g. ?ids=1,2,3
creator_id number optional

Unique identifier of the user. Returns all tasks created by the user.

e.g. ?creator_id=1
owner_id number optional

Unique identifier of the user. Returns all tasks owned by the user.

e.g. ?owner_id=1
q string optional

A query string to search for. Performs a full text search on the content field.

e.g. ?q=call
type string optional

Type of tasks to search for.

Possible values:

  • floating
  • related
e.g. ?type=related
resource_type string optional

Name of the resource type to search for.

Possible values:

  • lead
  • contact
  • deal
e.g. ?resource_type=lead
resource_id number optional

Unique identifier of the resource that you’re searching for.

e.g. ?resource_id=1
completed boolean optional

Indicates whether the query will return tasks that are completed or not.

e.g. ?completed=true
overdue boolean optional

Indicates whether the query will return tasks where the due_date parameter has been passed or not.

e.g. ?overdue=false
remind boolean optional

Indicates whether the query will return tasks with reminders or without reminders.

e.g. ?remind=true

Create a task

Creates a new task. You can create either a floating task or create a related task and associate it with one of the resource types below:

Parameters

Attribute Description
content string required
e.g. "content": "Contact Tom"
due_date string required
e.g. "due_date": "2014-09-27T16:32:56Z"
owner_id number optional

Defaults to the unique identifier of the user who created the task.

e.g. "owner_id": "1"
resource_type string optional
e.g. "resource_type": "lead"
resource_id number optional
e.g. "resource_id": "1"
completed boolean optional
e.g. "completed": "true"
remind_at string optional
e.g. "remind_at": "2014-09-29T15:32:56Z"

Retrieve a single task

Returns a single task available to the user according to the unique task ID provided. If the specified task does not exist, this query will return an error.

Parameters

Attribute Description
id number required

Unique identifier of the task.


Update a task

Updates task information. If the specified task does not exist, this query will return an error.

Parameters

Attribute Description
content string optional
e.g. "content": "Contact Tom"
due_date string optional
e.g. "due_date": "2014-09-27T16:32:56Z"
owner_id number optional
e.g. "owner_id": "1"
resource_type string optional
e.g. "resource_type": "lead"
resource_id number optional
e.g. "resource_id": "1"
completed boolean optional
e.g. "completed": "true"
remind_at string optional
e.g. "remind_at": "2014-09-29T15:32:56Z"

Delete a task

Delete an existing task. If the specified task does not exist, this query will return an error. This operation cannot be undone.

Parameters

Attribute Description
id number required

Unique identifier of the task.