Get SalesCoach account based tasks
Revision as of 16:02, 21 July 2026 by Ashley DeBon (talk | contribs) (Created page with "== Get Tasks By Contact (AI Chat Bot) == === Base URL === https://apimobile.callproof.com === Endpoint === /api/ai/chat-bot/contact/{id}/tasks === Purpose === Retrieves a p...")
Contents
Get Tasks By Contact (AI Chat Bot)
Base URL
https://apimobile.callproof.com
Endpoint
/api/ai/chat-bot/contact/{id}/tasks
Purpose
Retrieves a paginated list of tasks (follow-ups) for a specific contact, scoped to a user. Supports filters for status, type, priority, date range, and name search. Results include task schedule details and related contact information.
HTTP Method
GET
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
| No | User email used to resolve whose tasks to return. If omitted, the authenticated user’s email is used |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the contact |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | No | Filters by contact first/last name (case-insensitive partial match) |
| task_status | integer | No | 0 = incomplete/open tasks; any other value = completed tasks. When provided, page size is 5
|
| task_type | string | No | Comma-separated task type IDs to filter by |
| task_priority | integer | No | Task priority ID to filter by |
| start_date | string | No | Start date filter for task schedule (d-m-Y, for example 12-08-2025)
|
| end_date | string | No | End date filter for task schedule (d-m-Y)
|
| page | integer | No | Page number for pagination (default: 1) |
Request Body
None.
Successful Response (200)
Returns a paginated list of tasks for the contact.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| data | array | List of task records (see below) |
| firstItemOnPage | integer | Index of the first item on the current page |
| lastItemOnPage | integer | Index of the last item on the current page |
| hasNextPage | boolean | Whether a next page is available |
| hasPreviousPage | boolean | Whether a previous page is available |
| isFirstPage | boolean | Whether the current page is the first page |
| isLastPage | boolean | Whether the current page is the last page |
| next_page_url | string/null | URL of the next page, when available |
| prev_page_url | string/null | URL of the previous page, when available |
| first_page_url | string | URL of the first page |
| last_page_url | string | URL of the last page |
| pageCount | integer | Total number of pages |
| pageNumber | integer | Current page number |
| pageSize | integer | Number of items per page (5 when task_status is provided)
|
| totalItemCount | integer | Total number of matching tasks |
| uri | string | Requested resource URI |
data[]
| Field | Type | Description |
|---|---|---|
| task_id | integer | Unique identifier of the task |
| task_type_id | integer/string | Task type identifier |
| task_type_name | string | Task type name |
| task_priority_id | integer | Task priority identifier |
| task_priority_name | string | Task priority name |
| task_date | string | Scheduled date in user timezone (m-d-Y)
|
| task_time | string | Scheduled time in user timezone |
| task_duration | integer/string | Task duration |
| task_notes | string | Task notes |
| task_schedule_time | string | Formatted schedule datetime |
| task_completed | boolean | Whether the task is completed |
| contact_id | integer/string | Contact identifier |
| contact_name | string | Contact/company name |
| contact_phone | string | Formatted contact phone |
| contact_people | string | People linked to the contact/task |
| contact_sales_rep | string | Sales rep associated with the contact/task |
| contact_contacted | string | Last contacted value |
| contact_address1 | string | Address line 1 |
| contact_address2 | string | Address line 2 |
| contact_latitude | string | Latitude |
| contact_longitude | string | Longitude |
| contact_datetime | integer | Scheduled datetime as Unix timestamp |
| is_appointment | boolean | true when the record is represented as an appointment-style task
|
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – tasks could not be retrieved |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – Invalid user email ("Invalid user email"), or another error while retrieving tasks (for example, "Error while retiving the Task details").
- 401 – Authentication failed or the access token is missing/expired.