Create a task
Creates and starts an asynchronous task that is applied to all entities matching a filter (e.g. contacts, messages, or data rows). Tasks are designed to efficiently process a large number of entities. When processing a large number of entities, tasks are much faster than using the API to query and loop over all objects matching a filter.
Several different types of tasks are supported, including applying services to contacts, messages, or data rows; adding or removing contacts from a group; blocking or unblocking sending messages to a contact; updating a custom variable; deleting contacts, messages, or data rows; or exporting data to CSV.
When using a task to apply a Custom Actions or Cloud Script API service (apply_service_to_contacts, apply_service_to_rows, or apply_service_to_messages), the task variable will be available within the service. The service can use custom variables on the task object (e.g. task.vars.example), such as to store aggregate statistics for the rows matching the filter.
Request
- Base URL: https://api.telerivet.com
- URL: https://api.telerivet.com/v1/projects/{project_id}/tasks
- Auth: one of:
- HTTP basic
- OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)
Path parameters
ID of the Project
Request body
Example request
{
"task_type": "add_group_members",
"filter_type": "query_contacts"
}Response
Successful response
Example response
{
"id": "DE1189812e59c5c781",
"task_type": "add_group_members",
"filter_type": "query_contacts",
"time_created": 1390348075,
"time_active": 1390348076,
"total_rows": 12000,
"current_row": 3000,
"status": "active",
"user_id": "URba3e403e98f49735",
"project_id": "PJ2ad0100821a98bea"
}Changes
No recorded changes to this operation across all 1 revision of this API.