Tasks API

Who can use this feature?

  • Global admins
  • Available on all plans

Totango provides an API for managing tasks in Totango from external systems:

Before you begin

  • The user setting up the API must be a Totango admin
  • You need your Totango API token key 
  • Like all APIs, there is a global rate limit of 100 calls/minute for each token
  • JSON format is supported for API calls

Create a task

Use the following: https://api.totango.com/api/v3/tasks.

  • Replace APP_TOKEN with your authentication token.
  • Task priority options in CURL include: 1 (high), 2 (normal), or 3 (low).
  • Replace username with assignee email or uuid.
  • Replace account-id with the account id.
  • Replace activity-type-id with the flow ID (required). To get the ID of a flow use the /api/v3/activity-types endpoint as describe here.
curl --location 'https://api.totango.com/api/v3/tasks' \
--header 'app-token: APP_TOKEN \
--header 'Content-Type: application/json' \
--data-raw '{
    "title": "task title",
    "description": "task description",
    "due_date": "2024-02-28",
    "priority": 2,
    "status": "open",
    "account_id": "account-id",
    "assignee": "username",
    "activity_type_id": "activity-type-id"
}'

Response

If successful, the task will be triggered and response is returned: Success

If validation does not pass due to account not found, response is returned:
Status 400, message “Account not found"

Update a task

Use the following: https://api.totango.com/api/v3/tasks/{task-id}.

  • Replace {task-id} with the id of the task to update.
  • Replace APP_TOKEN with your authentication token.
  • Task priority options in CURL include: 1 (high), 2 (normal), or 3 (low).
  • Replace username with assignee email or uuid.
  • Replace account-id with the account id.
curl --location --request PUT 'https://api.totango.com/api/v3/tasks/{task-id}' \
--header 'app-token: APP_TOKEN \
--header 'Content-Type: application/json' \
--data '{"priority":"3", "due_date": "2024-02-25", "assignee": "username", "account_id":"account-id"}'

Response

If successful, the response is returned: Success

If validation does not pass due to account not found, response is returned:
Status 400, message “Account not found"

Delete a task

Use the following: https://api.totango.com/api/v3/tasks/{task-id}.

  • Replace {task-id} with the id of the task to update.
  • Replace APP_TOKEN with your authentication token.
  • Replace account-id with the account id.
curl --location --request PUT 'https://api.totango.com/api/v3/tasks/{task-id}' \
--header 'app-token: APP_TOKEN \
--header 'Content-Type: text/plain' \
--data '{"account_id":"account-id"}'

Response

If successful, the response is returned: Success

If validation does not pass due to account not found, response is returned:
Status 400, message “Account not found"

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request