> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifygtm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create job

> Create a job to query tasks.

## Overview

Export tasks asynchronously for reporting or a recurring data sync. Create a
job with the filters you need, poll its status, then retrieve the finished
results.

## Examples

> [accordion] Export completed calls
>
> Set `UNIFY_API_KEY` to your API key. This example selects completed call tasks
> that changed during September 2026:
>
> ```bash theme={null}
> curl --request POST \
>   --url "https://api.unifygtm.com/tasks/v1/tasks/query-jobs" \
>   --header "X-Api-Key: $UNIFY_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{
>   "filter": {
>     "type": {
>       "in": [
>         "PHONE_CALL"
>       ]
>     },
>     "status": {
>       "in": [
>         "COMPLETED"
>       ]
>     },
>     "updated_at": {
>       "gte": "2026-09-01T00:00:00Z",
>       "lt": "2026-10-01T00:00:00Z"
>     }
>   }
> }'
> ```
>
> The response includes `job_id`, `status`, and `expires_at`. Save the job ID and
> [check its status](https://docs.unifygtm.com/developers/api/tasks/tasks/query-tasks/get.md) until it reaches
> `FINISHED`. Then [retrieve the results](https://docs.unifygtm.com/developers/api/tasks/tasks/query-tasks/results.md).
>
> The date filter applies to when each task was last updated. Use `ended_at`
> instead when your report needs the date the task finished.
>
> See [Query jobs](https://docs.unifygtm.com/developers/guides/request-data/query-jobs.md) for retry behavior,
> expiration, and rate limits.


## OpenAPI

````yaml POST /tasks/v1/tasks/query-jobs
openapi: 3.1.0
info:
  title: Unify Tasks API
  summary: List and manage tasks within the Unify platform.
  version: '1'
  termsOfService: https://www.unifygtm.com/legal/terms-and-conditions
  contact:
    name: Unify Support
    url: https://www.unifygtm.com/support
    email: support@unifygtm.com
servers:
  - url: https://api.unifygtm.com
    variables: {}
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
paths:
  /tasks/v1/tasks/query-jobs:
    post:
      tags:
        - Tasks
      description: >-
        Start an asynchronous query job to export tasks. Poll the job until it
        is

        `FINISHED`, then page through the results.
      operationId: create_task_query_job
      parameters: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBulkApiTasksJobRequest'
      responses:
        '201':
          description: Response returned when creating a query job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBulkApiJobSuccessResponse'
        '400':
          description: Response for any operation that results in a bad request error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                properties:
                  status:
                    type: string
                    enum:
                      - bad_request
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/UResponses.BadRequestError'
                  message:
                    type: string
                description: >-
                  Response for any operation that results in a bad request
                  error.
        '401':
          description: Response for any operation that results in an unauthorized error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - unauthorized
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an unauthorized
                  error.
        '429':
          description: Response for any operation that exceeds a rate limit.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - rate_limited
                  message:
                    type: string
                description: Response for any operation that exceeds a rate limit.
        '500':
          description: Response for any operation that results in an internal server error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - message
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                description: >-
                  Response for any operation that results in an internal server
                  error.
components:
  schemas:
    CreateBulkApiTasksJobRequest:
      type: object
      properties:
        filter:
          $ref: '#/components/schemas/CreateBulkApiTasksJobFilter'
          description: Filters that select the tasks to export. Omit to export all tasks.
      description: Request body for creating a tasks query job.
    CreateBulkApiJobSuccessResponse:
      type: object
      required:
        - job_id
        - status
        - expires_at
      properties:
        job_id:
          type: string
        status:
          type: string
          enum:
            - IN_PROGRESS
        expires_at:
          type: string
          description: Time the job and its results expire, 24 hours after creation.
      description: Response returned when creating a query job.
    UResponses.BadRequestError:
      type: object
      required:
        - code
      properties:
        code:
          type: string
        path:
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        object_api_name:
          type: string
        attribute_api_name:
          type: string
      allOf:
        - type: object
          unevaluatedProperties: {}
      description: Validation error detail returned for bad request responses.
    CreateBulkApiTasksJobFilter:
      type: object
      properties:
        updated_at:
          $ref: '#/components/schemas/BulkApiDatetimeRangeFilter'
          description: Filter by the latest task update, including changes to note content.
        created_at:
          $ref: '#/components/schemas/BulkApiDatetimeRangeFilter'
        due_at:
          $ref: '#/components/schemas/BulkApiDatetimeRangeFilter'
        ended_at:
          $ref: '#/components/schemas/BulkApiDatetimeRangeFilter'
        id:
          anyOf:
            - type: object
              required:
                - in
              properties:
                in:
                  type: array
                  items:
                    type: string
                  minItems: 1
                not_in:
                  type: array
                  items:
                    type: string
                  minItems: 1
              description: Filter matching values included in a set.
            - type: object
              required:
                - not_in
              properties:
                in:
                  type: array
                  items:
                    type: string
                  minItems: 1
                not_in:
                  type: array
                  items:
                    type: string
                  minItems: 1
              description: Filter matching values excluded from a set.
        status:
          anyOf:
            - type: object
              required:
                - in
              properties:
                in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskStatus'
                  minItems: 1
                not_in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskStatus'
                  minItems: 1
              description: Filter matching values included in a set.
            - type: object
              required:
                - not_in
              properties:
                in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskStatus'
                  minItems: 1
                not_in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskStatus'
                  minItems: 1
              description: Filter matching values excluded from a set.
        type:
          anyOf:
            - type: object
              required:
                - in
              properties:
                in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskType'
                  minItems: 1
                not_in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskType'
                  minItems: 1
              description: Filter matching values included in a set.
            - type: object
              required:
                - not_in
              properties:
                in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskType'
                  minItems: 1
                not_in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskType'
                  minItems: 1
              description: Filter matching values excluded from a set.
        priority:
          anyOf:
            - type: object
              required:
                - in
              properties:
                in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskPriority'
                  minItems: 1
                not_in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskPriority'
                  minItems: 1
              description: Filter matching values included in a set.
            - type: object
              required:
                - not_in
              properties:
                in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskPriority'
                  minItems: 1
                not_in:
                  type: array
                  items:
                    $ref: '#/components/schemas/TaskPriority'
                  minItems: 1
              description: Filter matching values excluded from a set.
        assigned_user:
          $ref: '#/components/schemas/BulkApiUuidFilter'
        person:
          $ref: '#/components/schemas/BulkApiUuidFilter'
        company:
          $ref: '#/components/schemas/BulkApiUuidFilter'
      description: Filters accepted when querying tasks.
    BulkApiDatetimeRangeFilter:
      type: object
      properties:
        gt:
          type: string
          description: Exclusive lower bound. Cannot be combined with `gte`.
        gte:
          type: string
          description: Inclusive lower bound. Cannot be combined with `gt`.
        lt:
          type: string
          description: Exclusive upper bound. Cannot be combined with `lte`.
        lte:
          type: string
          description: Inclusive upper bound. Cannot be combined with `lt`.
      description: Filter by a datetime range. At least one bound is required.
    TaskStatus:
      type: string
      enum:
        - NOT_READY
        - READY
        - COMPLETED
        - SKIPPED
        - CANCELED
    TaskType:
      type: string
      enum:
        - EMAIL
        - ACTION_ITEM
        - PHONE_CALL
        - LINKEDIN_SEND_MESSAGE
        - LINKEDIN_SEND_CONNECTION_REQUEST
        - LINKEDIN_VIEW_PROFILE
        - REPLY_TO_EMAIL
    TaskPriority:
      type: string
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - URGENT
    BulkApiUuidFilter:
      type: object
      required:
        - id
      properties:
        id:
          type: string
      description: Filter matching a resource by ID.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.