---
title: "Create a task"
method: POST
path: "/task/"
tags: ["tasks"]
---

# Create a task

`POST /task/`

Provide the type of task to be created in the `_type` field. Currently only tasks of type `lead` and `outgoing_call` can be created.

## Query parameters

- `_fields` string

## Request body

- union
  - CreateLeadTask
    - `_type` 'lead'
    - `assigned_to` string, nullable
    - `contact_id` string, nullable
    - `created_by` string
    - `date` union
      - string, date-time
      - string, date
    - `date_created` union
      - string, date-time
      - string, date
    - `disable_notification` boolean
    - `due_date` union
      - string, date-time
      - string, date
    - `is_complete` boolean
    - `is_dateless` boolean
    - `lead_id` string, required
    - `organization_id` string
    - `priority` 'high' | 'medium'
    - `text` string, required
  - CreateCallTask
    - `_type` 'outgoing_call'
    - `agent_config_id` string, nullable
    - `assigned_to` string, nullable
    - `contact_id` string, required
    - `created_by` string
    - `date` union
      - string, date-time
      - string, date
    - `is_complete` boolean
    - `lead_id` string, required
    - `organization_id` string
    - `text` string, nullable

## Response `200`

Successful response

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/close/apis/close-api.md) · [All operations](https://skmtc.net/close/apis/close-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/close/close-api/revisions/0dcf3303e9d7/schema)
