tasks

List and search tasks.

Changed on

Lists and searches for tasks using the available filters. Date bounds are inclusive. Requests without any of entityType, entityId, includeRelatedEntity, includeDeals, assignedUserIds, createdByUserId, finishedByUserId, metricIds, withAttachments, indexed=true, typesIn, dateField, excludePinned, sortBy or sortOrder must include at least one of dueDateGt, finishedDateGt, updatedDateGt or createdDateGt. Each lower bound must be within 31 calendar days of its upper bound (or today when no upper bound is supplied). With any of the listed filters, date bounds may be provided independently.

Filters: entityType and entityId must be supplied together. Different filters are combined with AND; IDs within assignedUserIds or metricIds, and values within typesIn, are combined with OR. If both metricId and metricIds are supplied, both constraints must match. finishedEq filters completion in both search modes. indexed=true selects indexed search without adding a filter. Omitting it or sending indexed=false keeps the legacy path when no new filter is present. dateField=due_at requires a due date; other dateField values are not supported. Results are limited to activities the authenticated user is allowed to access. Without sortBy, indexed results are ordered by creation descending, then update ascending. With sortBy (createdAt, updatedAt, dueDate or finishedAt), sortOrder accepts asc (default) or desc. Missing dates are placed last in either direction. Records with the same sort value have no guaranteed relative order. sortOrder without sortBy returns 400. dateField filters date presence independently of sorting. Omitting both sorting parameters uses the default ordering. meta.totalCount contains the total number of matching tasks when available. Pagination links keep their existing format.

get/tasks

Request

  • Base URL
    https://api.agendor.com.br/v3
  • Auth
    API key in header Authorization

Query parameters

pageinteger

Page of results to fetch.

per_pageinteger

Number of results to return per page.

finishedDateGtstring date-time

Use to search for tasks that were finished on or after this date.

finishedDateLtstring date-time

Use to search for tasks that were finished on or before this date.

dueDateGtstring date-time

Use to search for tasks due on or after this date.

dueDateLtstring date-time

Use to search for tasks due on or before this date.

updatedDateGtstring date-time

Use to search for tasks that were updated on or after this date.

updatedDateLtstring date-time

Use to search for tasks that were updated on or before this date.

createdDateGtstring date-time

Use to search for tasks that were created on or after this date.

createdDateLtstring date-time

Use to search for tasks that were created on or before this date.

metricIdinteger

Metric ID.

finishedEq'true' | 'false'

Filters tasks by completion status.

entityType'deal' | 'person' | 'organization'

Entity type. Must be supplied together with entityId. Deals include ancestor deal activities.

entityIdinteger

Entity ID. Must be supplied together with entityType.

includeRelatedEntityboolean

For organizations, includes activities of related people.

includeDealsboolean

Includes related deals. For organizations, also includes deals of related people, independently of includeRelatedEntity.

createdByUserIdinteger

Creator user ID.

finishedByUserIdinteger

User ID that finished the task.

withAttachmentsboolean

Filters activities by whether they have attachments.

indexedboolean

Selects indexed search when true, without adding a filter. Defaults to false; new filters still select indexed search.

dateField'due_at'

Requires a due date to be present. Does not change ordering or require a date range.

excludePinnedboolean

Excludes active pins for the requested entity before pagination. Defaults to false; has no effect without an entity.

sortBy'createdAt' | 'updatedAt' | 'dueDate' | 'finishedAt'

Date used to sort results. Missing dates are last; equal values have no guaranteed order.

sortOrder'asc' | 'desc'

Sort direction. Requires sortBy; defaults to asc only when sortBy is supplied.

includeVoipboolean

Includes audioTranscription and audioSummary when available. Defaults to false.

Request body application/x-www-form-urlencoded

assignedUserIdsinteger[]

Returns activities assigned to at least one of these users.

metricIdsinteger[]

Metric IDs, combined with OR. When metricId is also provided, both constraints must match.

typesInstring[]

Activity types, combined with OR. Notes have no metrics or due date; generic tasks have a due date and no metrics. Other types match the corresponding account metric; an unconfigured type has no matches.

Response

OK

Changes

    • warning

      deleted the query request parameter status

    • info

      added the new optional query request parameter indexed

    • info

      added the new optional query request parameter createdByUserId

    • info

      added the new optional query request parameter dateField

    • info

      added the new optional query request parameter entityId

    • info

      added the new optional query request parameter entityType

    • info

      added the new optional query request parameter excludePinned

    • info

      added the new optional query request parameter finishedByUserId

    • info

      added the new optional query request parameter includeDeals

    • info

      added the new optional query request parameter includeRelatedEntity

    • info

      added the new optional query request parameter includeVoip

    • info

      added the new optional query request parameter sortBy

    • info

      added the new optional query request parameter sortOrder

    • info

      added the new optional query request parameter status

    • info

      added the new optional query request parameter withAttachments

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status