> For the complete documentation index, see [llms.txt](https://docs.projetly.ai/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.projetly.ai/home/apis/projetly-zapier-api.md).

# Projetly - Zapier API

**Projetly** is an AI-powered platform that helps teams streamline customer onboarding, manage projects, automate workflows, and collaborate with customers in digital sales rooms. It keeps companies, contacts, deals, projects, and tasks organized across the whole customer lifecycle, from first touch through closed deal to delivery.

The **Projetly Zapier integration** connects Projetly to the thousands of apps on Zapier, so teams can automate work without writing code, for example, create a contact when a form is submitted, start a project when a deal is won, or notify a channel when a task changes. The integration talks to Projetly over the REST API described in this document: it reads and writes companies, contacts, projects/deals, tasks, users, and templates, and manages webhook subscriptions so Zaps can trigger on Projetly events.

***

## Base URLs

| Surface                                                                          | Base URL                             |
| -------------------------------------------------------------------------------- | ------------------------------------ |
| **Marketplace API** — data, templates, users, tasks, webhooks                    | `https://market.api.projetly.io/api` |
| **Identity / OAuth host** — `/oauth/authorize`, `/oauth/token`, `/auth_refresh/` | `https://api.projetly.io/api`        |

All endpoint paths below are relative to one of these two bases (each endpoint notes which). A trailing slash is accepted — `/zapier/company` and `/zapier/company/` are equivalent.

***

## Getting App credentials

The `client_id` and `client_secret` are issued by Projetly — they are not self-service. To request them, email **<admin@projetly.ai>** with your app details:

* **App name** — the name of your integration.
* **Description** — what the integration does.
* **Permissions (scopes)** — the [OAuth2 scopes](#oauth2-scopes) your app needs (e.g. `company.read`, `deal.write`).
* **Endpoints** — the API paths you intend to call (e.g. `/zapier/company`, `/zapier/project`, `/webhook/subscribe`).

Projetly replies with your `client_id`, `client_secret`, and an Azure Functions key. Pass the function key either as the `x-functions-key` header or as a `code` query parameter (`?code=<function-key>`) — both are accepted.

***

## Authentication

Obtaining an access token uses the **OAuth2 authorization-code** flow. After that, **every** data / template / user / task / webhook request must carry three things:

1. **Bearer token** — `Authorization: Bearer <access_token>` (a JWT).
2. **HMAC request signature** — two headers proving the request came from the registered integration:
   * `X-OAuth-Timestamp` — current Unix time in seconds.
   * `X-OAuth-Signature` — `HMAC-SHA256(key = CLIENT_SECRET, message = "<CLIENT_ID>:<X-OAuth-Timestamp>")`, hex-encoded.
3. **Azure Functions key** — `x-functions-key: <function-host-key>`.

The OAuth endpoints themselves (`/oauth/authorize`, `/oauth/token`, `/auth_refresh/`) do **not** require the three headers above — they authenticate with the client credentials carried in the request.

**Token flow at a glance**

{% stepper %}
{% step %}

## Redirect the user to the authorization endpoint

Redirect the user to `GET /oauth/authorize` (signed URL) → user approves → Projetly redirects back to `redirect_uri` with `code` + `state`.
{% endstep %}

{% step %}

## Exchange the authorization code

`POST /oauth/token` with the `code` → returns `access_token` + `refresh_token`.
{% endstep %}

{% step %}

## Refresh the token when it expires

When the access token expires, `POST /auth_refresh/` with the refresh token → returns a new `access_token` and a new refresh token under `refresh`.
{% endstep %}
{% endstepper %}

### Security schemes

| Scheme           | Type                        | Where  | Name / detail                                                                        |
| ---------------- | --------------------------- | ------ | ------------------------------------------------------------------------------------ |
| `oauth2`         | OAuth2 (authorization code) | —      | authorize: `…/oauth/authorize/`, token: `…/oauth/token/`, refresh: `…/auth_refresh/` |
| `bearerAuth`     | HTTP bearer (JWT)           | header | `Authorization: Bearer <token>`                                                      |
| `oauthTimestamp` | API key                     | header | `X-OAuth-Timestamp`                                                                  |
| `oauthSignature` | API key                     | header | `X-OAuth-Signature` (HMAC-SHA256, see above)                                         |
| `functionsKey`   | API key                     | header | `x-functions-key`                                                                    |

### OAuth2 scopes

| Scope                              | Grants                         |
| ---------------------------------- | ------------------------------ |
| `deal.read` / `deal.write`         | Read / create-update deals     |
| `project.read` / `project.write`   | Read / create-update projects  |
| `company.read` / `company.write`   | Read / create-update companies |
| `contact.read` / `contact.write`   | Read / create-update contacts  |
| `template.read` / `template.write` | Read / write templates         |
| `user.read` / `user.write`         | Read / write users             |

***

## Conventions

* **Timestamps** are ISO-8601 UTC, e.g. `2026-06-05T07:46:23.312Z`.
* **List endpoints** wrap results in a `results` array and may return a `next_cursor` for cursor pagination, or accept `page` / `items_per_page` for offset pagination.
* **Extra fields:** object schemas are open (`additionalProperties: true`). The documented properties are the ones the integration relies on; responses may carry additional fields.
* **Mode-switching endpoints:** several GET endpoints change what they return based on a query parameter (e.g. `options`, `field_config`, `contact_id`, `task_filter`). These modes are documented per endpoint.

***

## Common query parameters

Reused across list endpoints (each endpoint notes which it accepts).

| Name             | Type    | Default | Description                                                                                                                                              |
| ---------------- | ------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`          | integer | 20      | Maximum number of records to return.                                                                                                                     |
| `sort`           | string  | —       | Sort field; prefix with `-` for descending (e.g. `-creation_time`).                                                                                      |
| `filter`         | string  | —       | JSON-encoded filter condition array.                                                                                                                     |
| `next_cursor`    | string  | —       | Cursor token from a previous list response.                                                                                                              |
| `options`        | string  | —       | When `options`, returns metadata option sets instead of records.                                                                                         |
| `field_config`   | string  | —       | When truthy, returns/updates the resource field configuration.                                                                                           |
| `page`           | integer | —       | 1-indexed page number (offset pagination).                                                                                                               |
| `items_per_page` | integer | —       | Records per page (offset pagination).                                                                                                                    |
| `due_filter`     | string  | —       | Relative due-date range: `all`, `today`, `tomorrow`, `yesterday`, `current_week`, `next_week`, `last_week`, `current_month`, `next_month`, `last_month`. |

***

## Common error responses

All endpoints share the error envelope `{ "status": "error", "message": "…" }` or `{ "error": "…" }` and these status codes:

| Code | Meaning                                                            |
| ---- | ------------------------------------------------------------------ |
| 400  | Bad Request — invalid or missing data.                             |
| 401  | Unauthorized — invalid/missing credentials or signature.           |
| 403  | Forbidden — caller lacks permission (e.g. disallowed event scope). |
| 404  | Not Found — resource does not exist.                               |
| 409  | Conflict — resource already exists.                                |
| 429  | Too Many Requests — an API rate limit was hit.                     |
| 500  | Internal Server Error.                                             |

See the [`Error`](#error) model for the body shape.

***

## Endpoints

> **Auth column legend:** “Required” = Bearer + `X-OAuth-Timestamp` + `X-OAuth-Signature` + `x-functions-key`. “Credentials Required” = no headers; the credentials travel in the request (OAuth endpoints only).

### Authentication endpoints

Base: `https://instance.api.projetly.io/api`

#### `GET /oauth/authorize` — Begin the authorization-code flow

**Auth:** [Credentials Required](#authentication).

Redirects the user to Projetly to grant access; on approval Projetly redirects back to `redirect_uri` with `code` and `state`.

| Query param     | Type            | Required | Description                                                                           |
| --------------- | --------------- | -------- | ------------------------------------------------------------------------------------- |
| `client_id`     | string          | yes      | OAuth app client ID.                                                                  |
| `response_type` | string (`code`) | yes      | Must be `code`.                                                                       |
| `redirect_uri`  | string (uri)    | yes      | URL Projetly redirects back to.                                                       |
| `state`         | string          | yes      | Opaque value echoed back to prevent CSRF.                                             |
| `timestamp`     | string          | yes      | Unix time (seconds) used in the signature.                                            |
| `signature`     | string          | yes      | `HMAC-SHA256(key = CLIENT_SECRET, message = "<client_id>:<timestamp>")`, hex-encoded. |

**Responses**

| Status | Body              | Description                                                                            |
| ------ | ----------------- | -------------------------------------------------------------------------------------- |
| 302    | —                 | Redirect to `redirect_uri` with `code` and `state` query params.                       |
| 400    | [`Error`](#error) | Bad request — missing/invalid query params (`client_id`, `redirect_uri`, `signature`). |
| 401    | [`Error`](#error) | Unauthorized — invalid signature or unknown `client_id`.                               |

#### `POST /oauth/token` — Exchange an authorization code for tokens

**Auth:** [Credentials Required](#authentication).

**Content-Type:** `application/x-www-form-urlencoded`.

| Body field     | Type                          | Required | Description                                     |
| -------------- | ----------------------------- | -------- | ----------------------------------------------- |
| `code`         | string                        | yes      | Authorization code from the authorize redirect. |
| `client_id`    | string                        | yes      | OAuth app client ID.                            |
| `grant_type`   | string (`authorization_code`) | yes      | Must be `authorization_code`.                   |
| `redirect_uri` | string (uri)                  | yes      | Same redirect URI used in authorize.            |

**Responses**

| Status | Body                              | Description                                                              |
| ------ | --------------------------------- | ------------------------------------------------------------------------ |
| 200    | [`TokenResponse`](#tokenresponse) | Tokens issued — returns `access_token` and `refresh_token`.              |
| 400    | [`Error`](#error)                 | Bad request — missing/invalid `code`, `grant_type`, or `redirect_uri`.   |
| 401    | [`Error`](#error)                 | Unauthorized — invalid client credentials or expired authorization code. |

#### `POST /auth_refresh/` — Refresh an access token

**Auth:** [Credentials Required](#authentication).

**Content-Type:** `application/x-www-form-urlencoded`. Note the new refresh token returns under **`refresh`** (not `refresh_token`).

| Body field   | Type                     | Required | Description                |
| ------------ | ------------------------ | -------- | -------------------------- |
| `token`      | string                   | yes      | The current refresh token. |
| `grant_type` | string (`refresh_token`) | yes      | Must be `refresh_token`.   |

**Responses**

| Status | Body                                            | Description                                                  |
| ------ | ----------------------------------------------- | ------------------------------------------------------------ |
| 200    | `{ "access_token": string, "refresh": string }` | New `access_token` plus a new refresh token under `refresh`. |
| 400    | [`Error`](#error)                               | Bad request — missing/invalid `token` or `grant_type`.       |
| 401    | [`Error`](#error)                               | Unauthorized — refresh token invalid or revoked.             |

***

### Connection

Base: `https://market.api.projetly.io/api`

#### `GET /zapier/test` — Verify the integration is active

**Auth:** [Required](#authentication).

Returns the linked organisation name; used as the connection test/label.

**Responses**

| Status | Body                                                  | Description                                                |
| ------ | ----------------------------------------------------- | ---------------------------------------------------------- |
| 200    | `{ "status": "success", "organisation": "Acme Inc" }` | Integration active — returns the linked organisation name. |
| 401    | [`Error`](#error)                                     | Unauthorized — invalid/missing token or signature.         |
| 500    | [`Error`](#error)                                     | Internal server error.                                     |

***

### Companies

Base: `https://market.api.projetly.io/api`

#### `GET /zapier/company` — List companies (or options / field config)

**Auth:** [Required](#authentication).

Default returns a paginated company list. Modes:

* `options=options` → metadata option sets (types, segments, industries, revenue/employee ranges) instead of company records.
* `field_config=<truthy>` → the company field configuration.

**Query params:** `limit`, `sort`, `filter`, `next_cursor`, `options`, `field_config` (see [Common query parameters](#common-query-parameters)).

**Responses**

| Status | Body                                                                                                                                    | Description                                                        |
| ------ | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| 200    | [`CompanyListResponse`](#companylistresponse) \| [`OptionsResponse`](#optionsresponse) \| [`FieldConfigResponse`](#fieldconfigresponse) | Company list, options metadata, or field config depending on mode. |
| 400    | [`Error`](#error)                                                                                                                       | Bad request — invalid query parameters.                            |
| 401    | [`Error`](#error)                                                                                                                       | Unauthorized — invalid/missing token or signature.                 |
| 500    | [`Error`](#error)                                                                                                                       | Internal server error.                                             |

#### `POST /zapier/company` — Create a company

**Auth:** [Required](#authentication).

**Body:** [`CreateCompanyRequest`](#createcompanyrequest).

**Responses**

| Status | Body                                  | Description                                                              |
| ------ | ------------------------------------- | ------------------------------------------------------------------------ |
| 200    | `{ "data":` [`Company`](#company) `}` | Company created — returns the new record under `data`.                   |
| 400    | [`Error`](#error)                     | Validation error, or a company with the same name/domain already exists. |
| 401    | [`Error`](#error)                     | Unauthorized — invalid/missing token or signature.                       |
| 500    | [`Error`](#error)                     | Internal server error.                                                   |

#### `PUT /zapier/company/{company_id}` — Update a company

**Auth:** [Required](#authentication).

**Body:** [`CreateCompanyRequest`](#createcompanyrequest).

| Path param   | Type   | Required | Description                                                                                                                      |
| ------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `company_id` | string | yes      | Company to update. Get the id from `GET /zapier/company` (list) or from the `POST /zapier/company` response (`data.company_id`). |

Optional query param: `field_config`.

**Responses**

| Status | Body                                  | Description                                                    |
| ------ | ------------------------------------- | -------------------------------------------------------------- |
| 200    | `{ "data":` [`Company`](#company) `}` | Company updated; returns the full updated record under `data`. |
| 400    | [`Error`](#error)                     | Validation error in the request body.                          |
| 401    | [`Error`](#error)                     | Unauthorized — invalid/missing token or signature.             |
| 404    | [`Error`](#error)                     | No company exists with the given `company_id`.                 |
| 500    | [`Error`](#error)                     | Internal server error.                                         |

***

### Contacts

Base: `https://market.api.projetly.io/api`

#### `GET /zapier/contact` — List contacts, fetch one, or options / field config

**Auth:** [Required](#authentication).

Default returns a paginated contact list. Modes:

* `contact_id=<id>` → a single [`Contact`](#contact).
* `options=options` → contact metadata option sets.
* `field_config=<truthy>` → the contact field configuration.

| Query param                              | Type   | Required | Description                                                                                                                                                  |
| ---------------------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `limit`, `sort`, `filter`, `next_cursor` | —      | no       | See common params.                                                                                                                                           |
| `contact_id`                             | string | no       | When set, returns the single matching contact. Get the id from `GET /zapier/contact` (list) or from the `POST /zapier/contact` response (`data.contact_id`). |
| `options`, `field_config`                | string | no       | Mode switches.                                                                                                                                               |

**Responses**

| Status | Body                                                                                                                                                             | Description                                                                          |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| 200    | [`ContactListResponse`](#contactlistresponse) \| [`Contact`](#contact) \| [`OptionsResponse`](#optionsresponse) \| [`FieldConfigResponse`](#fieldconfigresponse) | Contact list, a single contact, options metadata, or field config depending on mode. |
| 400    | [`Error`](#error)                                                                                                                                                | Bad request — invalid query parameters.                                              |
| 401    | [`Error`](#error)                                                                                                                                                | Unauthorized — invalid/missing token or signature.                                   |
| 500    | [`Error`](#error)                                                                                                                                                | Internal server error.                                                               |

#### `POST /zapier/contact` — Create a contact

**Auth:** [Required](#authentication).

**Body:** [`CreateContactRequest`](#createcontactrequest).

**Responses**

| Status | Body                                  | Description                                                        |
| ------ | ------------------------------------- | ------------------------------------------------------------------ |
| 200    | `{ "data":` [`Contact`](#contact) `}` | Contact created — returns the new record under `data`.             |
| 400    | [`Error`](#error)                     | Validation error, or a contact with the same email already exists. |
| 401    | [`Error`](#error)                     | Unauthorized — invalid/missing token or signature.                 |
| 500    | [`Error`](#error)                     | Internal server error.                                             |

#### `PUT /zapier/contact/{contact_id}` — Update a contact

**Auth:** [Required](#authentication).

**Body:** [`CreateContactRequest`](#createcontactrequest).

| Path param   | Type   | Required | Description                                                                                                                      |
| ------------ | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `contact_id` | string | yes      | Contact to update. Get the id from `GET /zapier/contact` (list) or from the `POST /zapier/contact` response (`data.contact_id`). |

Optional query param: `field_config`.

**Responses**

| Status | Body                                  | Description                                                    |
| ------ | ------------------------------------- | -------------------------------------------------------------- |
| 200    | `{ "data":` [`Contact`](#contact) `}` | Contact updated; returns the full updated record under `data`. |
| 400    | [`Error`](#error)                     | Validation error in the request body.                          |
| 401    | [`Error`](#error)                     | Unauthorized — invalid/missing token or signature.             |
| 404    | [`Error`](#error)                     | No contact exists with the given `contact_id`.                 |
| 500    | [`Error`](#error)                     | Internal server error.                                         |

***

### Templates

Base: `https://market.api.projetly.io/api`

#### `GET /zapier/templates` — List templates

**Auth:** [Required](#authentication).

Lists pipeline / deal-stage / project templates.

| Query param         | Type    | Required | Description                                      |
| ------------------- | ------- | -------- | ------------------------------------------------ |
| `module`            | string  | no       | Template module, e.g. `templates`.               |
| `template_type`     | string  | no       | Category: `pipelines`, `deal_stages`, `project`. |
| `sub_template_type` | integer | no       | Sub-type filter (e.g. `4`, `5`, `6`).            |
| `page`              | integer | no       | Offset page (1-indexed).                         |
| `items_per_page`    | integer | no       | Records per page.                                |

**Responses**

| Status | Body                                            | Description                                        |
| ------ | ----------------------------------------------- | -------------------------------------------------- |
| 200    | [`TemplateListResponse`](#templatelistresponse) | Paginated template list.                           |
| 400    | [`Error`](#error)                               | Bad request — invalid query parameters.            |
| 401    | [`Error`](#error)                               | Unauthorized — invalid/missing token or signature. |
| 500    | [`Error`](#error)                               | Internal server error.                             |

***

### Projects & Deals

Base: `https://market.api.projetly.io/api`. Projects and deals are the same resource, distinguished by `module` / `project_type`.

#### `GET /zapier/project` — List projects or deals

**Auth:** [Required](#authentication).

* Projects: `module=projects`, `project_type=project`.
* Deals: `module=deal_plan`, `project_type=deal`.

| Query param                    | Type    | Required | Description                |
| ------------------------------ | ------- | -------- | -------------------------- |
| `page`, `items_per_page`       | integer | no       | Offset pagination.         |
| `project_type`                 | string  | no       | `project` or `deal`.       |
| `module`                       | string  | no       | `projects` or `deal_plan`. |
| `sort`, `filter`, `due_filter` | —       | no       | See common params.         |

**Responses**

| Status | Body                                          | Description                                        |
| ------ | --------------------------------------------- | -------------------------------------------------- |
| 200    | [`ProjectListResponse`](#projectlistresponse) | Paginated project/deal list.                       |
| 400    | [`Error`](#error)                             | Bad request — invalid query parameters.            |
| 401    | [`Error`](#error)                             | Unauthorized — invalid/missing token or signature. |
| 500    | [`Error`](#error)                             | Internal server error.                             |

#### `POST /zapier/project` — Create a project or deal

**Auth:** [Required](#authentication).

**Body:** [`CreateProjectRequest`](#createprojectrequest).

**Responses**

| Status | Body                                              | Description                                                       |
| ------ | ------------------------------------------------- | ----------------------------------------------------------------- |
| 200    | [`CreateProjectResponse`](#createprojectresponse) | Project/deal created — returns the new ids and status.            |
| 400    | [`Error`](#error)                                 | Validation error — missing required `project` / `account` fields. |
| 401    | [`Error`](#error)                                 | Unauthorized — invalid/missing token or signature.                |
| 500    | [`Error`](#error)                                 | Creation failed — internal server error.                          |

#### `GET /zapier/project/info/{project_id}` — Project info or milestones/tasks

**Auth:** [Required](#authentication).

Default returns the project's info (`template_id`, `stages`). When `task_filter=true`, returns the project's `milestones`, each with its `tasks` (used by task search and the task webhook).

| Param         | In    | Type    | Required | Description                                                                                                              |
| ------------- | ----- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `project_id`  | path  | string  | yes      | Target project. Get the id from `GET /zapier/project` (list) or from the `POST /zapier/project` response (`project_id`). |
| `filter`      | query | string  | no       | JSON-encoded filter.                                                                                                     |
| `due_filter`  | query | string  | no       | Relative due-date range.                                                                                                 |
| `task_filter` | query | boolean | no       | `true` → milestones with tasks instead of project info.                                                                  |

**Responses**

| Status | Body                                                                         | Description                                                     |
| ------ | ---------------------------------------------------------------------------- | --------------------------------------------------------------- |
| 200    | [`ProjectInfo`](#projectinfo) \| [`MilestonesResponse`](#milestonesresponse) | Project info, or milestones with tasks when `task_filter=true`. |
| 400    | [`Error`](#error)                                                            | Bad request — invalid query parameters.                         |
| 401    | [`Error`](#error)                                                            | Unauthorized — invalid/missing token or signature.              |
| 404    | [`Error`](#error)                                                            | No project exists with the given `project_id`.                  |
| 500    | [`Error`](#error)                                                            | Internal server error.                                          |

***

### Users

Base: `https://market.api.projetly.io/api`

#### `GET /zapier/users` — List organization users

**Auth:** [Required](#authentication).

**Responses**

| Status | Body                     | Description                                        |
| ------ | ------------------------ | -------------------------------------------------- |
| 200    | Array of [`User`](#user) | All organization users.                            |
| 401    | [`Error`](#error)        | Unauthorized — invalid/missing token or signature. |
| 500    | [`Error`](#error)        | Internal server error.                             |

***

### Tasks

Base: `https://market.api.projetly.io/api`

#### `GET /zapier/task` — Get a task, task options, or a project's users

**Auth:** [Required](#authentication).

Exactly one mode is selected by query params:

* `task_id=<id>` → the task details ([`Task`](#task)).
* `options=options` (+ optional `template_id`) → task status options ([`TaskOptionsResponse`](#taskoptionsresponse)).
* `users=users` (+ optional `project_id`) → users assignable on the project (array of [`User`](#user)).

| Query param   | Type   | Required | Description                                                                                                                                                                       |
| ------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `task_id`     | string | no       | Fetch a single task. Get the id from `GET /zapier/project/info/{project_id}` with `task_filter=true` (milestone tasks) or from the `POST /zapier/task` response (`task.item_id`). |
| `options`     | string | no       | `options` → return task status options.                                                                                                                                           |
| `template_id` | string | no       | With `options`, scope status options to a template. Get the id from `GET /zapier/templates`.                                                                                      |
| `users`       | string | no       | `users` → return assignable users.                                                                                                                                                |
| `project_id`  | string | no       | With `users`, scope to a project's members. Get the id from `GET /zapier/project` (list) or the `POST /zapier/project` response.                                                  |

**Responses**

| Status | Body                                                                                         | Description                                                               |
| ------ | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| 200    | [`Task`](#task) \| [`TaskOptionsResponse`](#taskoptionsresponse) \| array of [`User`](#user) | Task details, task status options, or assignable users depending on mode. |
| 400    | [`Error`](#error)                                                                            | No `task_id`, `users`, or `options` provided.                             |
| 401    | [`Error`](#error)                                                                            | Unauthorized — invalid/missing token or signature.                        |
| 500    | [`Error`](#error)                                                                            | Internal server error.                                                    |

#### `POST /zapier/task` — Create a task

**Auth:** [Required](#authentication).

**Body:** [`CreateTaskRequest`](#createtaskrequest).

**Responses**

| Status | Body                            | Description                                         |
| ------ | ------------------------------- | --------------------------------------------------- |
| 200    | `{ "task":` [`Task`](#task) `}` | Task created — returns the new task.                |
| 400    | [`Error`](#error)               | Validation error — missing `title` or `project_id`. |
| 401    | [`Error`](#error)               | Unauthorized — invalid/missing token or signature.  |
| 500    | [`Error`](#error)               | Internal server error.                              |

***

### Webhooks

Base: `https://market.api.projetly.io/api`. REST-hook subscription management.

#### `POST /webhook/subscribe` — Subscribe to event webhooks

**Auth:** [Required](#authentication).

**Body:** [`WebhookSubscribeRequest`](#webhooksubscriberequest). `events` is a string containing a list literal, e.g. `"['company_created']"`. For task events, `project_id` scopes delivery to one project.

**Responses**

| Status | Body                                                             | Description                                        |
| ------ | ---------------------------------------------------------------- | -------------------------------------------------- |
| 200    | `{ "id": string, "message": "Webhook subscription successful" }` | Subscription created; `id` is used to unsubscribe. |
| 400    | [`Error`](#error)                                                | Missing `target_url`/`events`.                     |
| 401    | [`Error`](#error)                                                | Invalid signature/token.                           |
| 403    | [`Error`](#error)                                                | Disallowed event scope.                            |
| 404    | [`Error`](#error)                                                | No matching app info.                              |
| 500    | [`Error`](#error)                                                | Internal server error.                             |

#### `DELETE /webhook/unsubscribe` — Unsubscribe from event webhooks

**Auth:** [Required](#authentication).

| Body field       | Type   | Required | Description                       |
| ---------------- | ------ | -------- | --------------------------------- |
| `subscriptionId` | string | yes      | The `id` returned from subscribe. |

**Responses**

| Status | Body                                                 | Description                                    |
| ------ | ---------------------------------------------------- | ---------------------------------------------- |
| 200    | `{ "message": "Webhook unsubscription successful" }` | Subscription removed.                          |
| 400    | [`Error`](#error)                                    | Missing `subscriptionId` or signature headers. |
| 401    | [`Error`](#error)                                    | Invalid signature/token.                       |
| 404    | [`Error`](#error)                                    | Subscription not found.                        |
| 500    | [`Error`](#error)                                    | Internal server error.                         |

***

## Data models

All objects are open (may contain extra fields). Types use JSON conventions (`string`, `integer`, `number`, `boolean`, `array`, `object`, `null`).

### Error

Standard error envelope.

| Field     | Type   | Description                       | Example                |
| --------- | ------ | --------------------------------- | ---------------------- |
| `status`  | string | `"error"` on handled errors.      | `error`                |
| `message` | string | Human-readable error message.     | `Invalid request body` |
| `error`   | string | Present on auth/signature errors. | `Invalid signature`    |

### TokenResponse

| Field           | Type    | Description                               | Example          |
| --------------- | ------- | ----------------------------------------- | ---------------- |
| `access_token`  | string  | OAuth access token (JWT).                 | `eyJhbGci7892xx` |
| `refresh_token` | string  | OAuth refresh token used to renew access. | `def5027892xx`   |
| `token_type`    | string  | Token scheme; always `Bearer`.            | `Bearer`         |
| `expires_in`    | integer | Access-token lifetime in seconds.         | `3600`           |

### Address

| Field      | Type   | Description                | Example            |
| ---------- | ------ | -------------------------- | ------------------ |
| `country`  | string | Country name.              | `United States`    |
| `state`    | string | State / province / region. | `New York`         |
| `city`     | string | City or town.              | `New York`         |
| `address`  | string | Street address line.       | `350 Fifth Avenue` |
| `zip_code` | string | Postal / ZIP code.         | `10118`            |

### OwnerRef

Reference to a user (owner).

| Field       | Type   | Description              | Example             |
| ----------- | ------ | ------------------------ | ------------------- |
| `user_id`   | string | Owning user's id.        | `7892xxxxxxxxxxxx`  |
| `full_name` | string | Owning user's full name. | `Sample First Last` |
| `email`     | string | Owning user's email.     | `sample@mail.com`   |

### StatusRef

| Field         | Type   | Description                  | Example                    |
| ------------- | ------ | ---------------------------- | -------------------------- |
| `status_key`  | string | Machine key for the status.  | `in_progress, not_started` |
| `status_name` | string | Human-readable status label. | `In Progress, Not Started` |

### Company

| Field                     | Type                                      | Description                                        | Example                               |
| ------------------------- | ----------------------------------------- | -------------------------------------------------- | ------------------------------------- |
| `id`                      | string                                    | Internal record id.                                | `7892xxxxxxxxxxxx`                    |
| `company_id`              | string                                    | Company id.                                        | `7892xxxxxxxxxxxx`                    |
| `display_id`              | string                                    | Human-readable display id.                         | `COMPANY_0302`                        |
| `company_name`            | string                                    | Company name.                                      | `Sample Company`                      |
| `domain`                  | string                                    | Website / domain.                                  | `https://sample.com`                  |
| `linkedin_url`            | string                                    | LinkedIn company URL.                              | `https://linkedin.com/company/sample` |
| `twitter_url`             | string                                    | Twitter/X profile URL.                             | `https://sample.com`                  |
| `hq_location`             | [`Address`](#address)                     | Headquarters location.                             | see [Address](#address)               |
| `industry`                | string                                    | Vertical / industry.                               | `Education, SaaS`                     |
| `employee_range`          | string                                    | Employee-count range key.                          | `11-50, 51-200`                       |
| `estimated_arr`           | string                                    | ARR range key.                                     | `5_10m, 50m+`                         |
| `description`             | string                                    | Free-text company description.                     | `Sample description`                  |
| `company_owner`           | [`OwnerRef`](#ownerref) \| string \| null | Owner record or user id.                           | `7892xxxxxxxxxxxx`                    |
| `company_type`            | string                                    | Company classification.                            | `prospect, customer`                  |
| `lead_status`             | string                                    | Lead status key.                                   | `new, contacted`                      |
| `lead_status_pipeline_id` | string                                    | Pipeline the lead status belongs to.               | `7892xxxxxxxxxxxx`                    |
| `operating_regions`       | list                                      | List of strings — regions the company operates in. | `["Africa", "Europe"]`                |
| `customer_segment`        | string                                    | Customer segment.                                  | `mid_market, enterprise`              |
| `icp_fit`                 | string                                    | Ideal-customer-profile fit.                        | `excellent, good`                     |
| `connection_strength`     | string                                    | Strength of the relationship.                      | `very_strong, weak`                   |
| `connection_source`       | string                                    | How the connection originated.                     | `founder, referral`                   |
| `vendor_being_replaced`   | string                                    | Incumbent vendor being replaced.                   | `Acme CRM`                            |
| `replacement_urgency`     | string                                    | Urgency of replacing the vendor.                   | `low, high`                           |
| `category`                | string                                    | Company category.                                  | `marketing, sales`                    |
| `record_source`           | string                                    | Where the record came from.                        | `ui, integration`                     |
| `employees`               | integer                                   | Number of linked contacts.                         | `0`                                   |
| `created_by`              | string                                    | User id that created the record.                   | `7892xxxxxxxxxxxx`                    |
| `last_updated_by`         | string                                    | User id of the last editor.                        | `7892xxxxxxxxxxxx`                    |
| `creation_time`           | string (date-time)                        | When the record was created.                       | `2026-06-05T07:46:23.312Z`            |
| `last_update_time`        | string (date-time)                        | When the record was last updated.                  | `2026-06-05T07:46:23.312Z`            |

### CompanyListResponse

| Field         | Type           | Description                                                | Example                 |
| ------------- | -------------- | ---------------------------------------------------------- | ----------------------- |
| `results`     | list           | List of [`Company`](#company) objects — page of companies. | see [Company](#company) |
| `next_cursor` | string \| null | Cursor for the next page, or null when exhausted.          | `eyJjdXxxxxx...`        |

### CreateCompanyRequest

Required: `company_name`.

| Field                     | Type                      | Required | Description                                                                            | Example                               |
| ------------------------- | ------------------------- | -------- | -------------------------------------------------------------------------------------- | ------------------------------------- |
| `company_name`            | string                    | yes      | Company name.                                                                          | `Sample Company`                      |
| `domain`                  | string                    | no       | Website / domain.                                                                      | `https://sample.com`                  |
| `linkedin_url`            | string                    | no       | LinkedIn company URL.                                                                  | `https://linkedin.com/company/sample` |
| `twitter_url`             | string                    | no       | Twitter/X profile URL.                                                                 | `https://sample.com`                  |
| `description`             | string                    | no       | Free-text company description.                                                         | `Sample description`                  |
| `lead_status`             | [`StatusRef`](#statusref) | no       | Lead status.                                                                           | `{ "status_key": "new" }`             |
| `lead_status_pipeline_id` | string                    | no       | Pipeline the lead status belongs to. Obtain from your Projetly pipeline configuration. | `7892xxxxxxxxxxxx`                    |
| `parent_company`          | string                    | no       | Parent company name.                                                                   | `Sample Parent`                       |
| `parent_company_id`       | string                    | no       | Parent company id to link under. Get from `GET /zapier/company` (list).                | `7892xxxxxxxxxxxx`                    |
| `operating_regions`       | list                      | no       | List of strings — regions the company operates in.                                     | `["Africa", "Europe"]`                |
| `category`                | string                    | no       | Company category.                                                                      | `marketing, sales`                    |
| `industry`                | string                    | no       | Vertical / industry.                                                                   | `Education, SaaS`                     |
| `company_owner`           | string                    | no       | User id of the owner. Get from `GET /zapier/users`.                                    | `7892xxxxxxxxxxxx`                    |
| `customer_segment`        | string                    | no       | Customer segment.                                                                      | `mid_market, enterprise`              |
| `icp_fit`                 | string                    | no       | Ideal-customer-profile fit.                                                            | `excellent, good`                     |
| `company_type`            | string                    | no       | Company classification.                                                                | `prospect, customer`                  |
| `connection_source`       | string                    | no       | How the connection originated.                                                         | `founder, referral`                   |
| `vendor_being_replaced`   | string                    | no       | Incumbent vendor being replaced.                                                       | `Acme CRM`                            |
| `estimated_arr`           | string                    | no       | Range key resolved from a numeric ARR.                                                 | `5_10m, 50m+`                         |
| `employee_range`          | string                    | no       | Range key resolved from a numeric employee count.                                      | `11-50, 51-200`                       |
| `hq_location`             | [`Address`](#address)     | no       | Headquarters location.                                                                 | see [Address](#address)               |
| `record_source`           | string                    | no       | Where the record came from.                                                            | `integration`                         |
| `is_draft`                | boolean                   | no       | Save as a draft instead of finalized.                                                  | `false`                               |
| `custom_fields`           | object                    | no       | Arbitrary custom field key/values.                                                     | `{ "tier": "gold" }`                  |

### Contact

| Field                             | Type                            | Description                                                        | Example                                                            |
| --------------------------------- | ------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `id`                              | string                          | Internal record id.                                                | `7892xxxxxxxxxxxx`                                                 |
| `contact_id`                      | string                          | Contact id.                                                        | `7892xxxxxxxxxxxx`                                                 |
| `display_id`                      | string                          | Human-readable display id.                                         | `CONTACT_0007`                                                     |
| `full_name`                       | string                          | Full display name.                                                 | `Sample First Last`                                                |
| `first_name`                      | string                          | Given name.                                                        | `Sample First`                                                     |
| `last_name`                       | string                          | Family name.                                                       | `Sample Last`                                                      |
| `primary_email`                   | string                          | Primary work email.                                                | `sample@mail.com`                                                  |
| `secondary_emails`                | list                            | List of strings — additional email addresses.                      | `["sample@mail.com"]`                                              |
| `primary_phone`                   | string                          | Primary phone number.                                              | `+1 1234567xxx`                                                    |
| `phone`                           | object `{ primary }`            | Phone object with a `primary` number.                              | `{ "primary": "+1 1234567xxx" }`                                   |
| `phones`                          | list                            | List of objects — additional phone entries.                        | `[{ "primary": "+1 1234567xxx" }]`                                 |
| `company`                         | list                            | List of objects `{ company_id, company_name }` — linked companies. | `[{ "company_id": "7892xxxx", "company_name": "Sample Company" }]` |
| `company_ids`                     | list                            | List of strings — linked company ids.                              | `["7892xxxxxxxxxxxx"]`                                             |
| `contact_owner`                   | [`OwnerRef`](#ownerref) \| null | Owning user reference.                                             | see [OwnerRef](#ownerref)                                          |
| `lead_source`                     | string                          | Where the contact originated.                                      | `integration`                                                      |
| `lead_status`                     | string                          | Lead status key.                                                   | `new, contacted`                                                   |
| `lead_status_pipeline_id`         | string                          | Pipeline the lead status belongs to.                               | `7892xxxxxxxxxxxx`                                                 |
| `contact_stage`                   | string                          | Stage in the contact lifecycle.                                    | `lead, qualified`                                                  |
| `job_title`                       | string                          | Role/title at the company.                                         | `VP, CEO, Manager`                                                 |
| `department`                      | string                          | Department the contact belongs to.                                 | `Engineering, Sales`                                               |
| `location`                        | [`Address`](#address)           | Contact location.                                                  | see [Address](#address)                                            |
| `timezone`                        | string                          | IANA timezone.                                                     | `Asia/Calcutta`                                                    |
| `language`                        | string                          | Preferred language (ISO code).                                     | `en`                                                               |
| `person_category`                 | object `{ key, name }`          | Contact category.                                                  | `{ "key": "prospect", "name": "Prospect" }`                        |
| `preferred_communication_channel` | string                          | Preferred communication channel.                                   | `email, phone`                                                     |
| `seniority_level`                 | string                          | Seniority level.                                                   | `ic, manager, exec`                                                |
| `buying_role`                     | string                          | Role in the buying process.                                        | `decision maker, influencer`                                       |
| `signoff_authority`               | string                          | Whether the contact can sign off.                                  | `yes, no`                                                          |
| `do_not_contact`                  | string                          | Do-not-contact flag.                                               | `yes, no`                                                          |
| `influence_level`                 | number                          | Influence score.                                                   | `0`                                                                |
| `interest_level`                  | number                          | Interest score.                                                    | `0`                                                                |
| `whatsapp_number`                 | string                          | WhatsApp contact number.                                           | `+1 1234567xxx`                                                    |
| `campaign`                        | string                          | Source marketing campaign.                                         | `Spring Outreach`                                                  |
| `internal_notes`                  | string                          | Free-text internal notes.                                          | `Met at conference`                                                |
| `linkedin_url`                    | string                          | LinkedIn profile URL.                                              | `https://linkedin.com/in/sample`                                   |
| `twitter_url`                     | string                          | Twitter/X profile URL.                                             | `https://sample.com`                                               |
| `created_by`                      | string                          | User id that created the record.                                   | `7892xxxxxxxxxxxx`                                                 |
| `creation_time`                   | string (date-time)              | When the record was created.                                       | `2026-06-05T05:18:01.443Z`                                         |
| `last_update_time`                | string (date-time)              | When the record was last updated.                                  | `2026-06-05T05:18:01.443Z`                                         |

### ContactListResponse

| Field         | Type           | Description                                               | Example                 |
| ------------- | -------------- | --------------------------------------------------------- | ----------------------- |
| `results`     | list           | List of [`Contact`](#contact) objects — page of contacts. | see [Contact](#contact) |
| `next_cursor` | string \| null | Cursor for the next page, or null when exhausted.         | `eyJjdXxxxxx...`        |

### CreateContactRequest

Required: `primary_email`, `first_name`.

| Field                     | Type                  | Required | Description                                                                            | Example                          |
| ------------------------- | --------------------- | -------- | -------------------------------------------------------------------------------------- | -------------------------------- |
| `primary_email`           | string                | yes      | Primary work email; unique per contact.                                                | `sample@mail.com`                |
| `first_name`              | string                | yes      | Contact's given name.                                                                  | `Sample First`                   |
| `last_name`               | string                | no       | Contact's family name.                                                                 | `Sample Last`                    |
| `full_name`               | string                | no       | Display name; derived from first/last if omitted.                                      | `Sample First Last`              |
| `primary_phone`           | string                | no       | Primary phone number.                                                                  | `+1 1234567xxx`                  |
| `job_title`               | string                | no       | Role/title at the company.                                                             | `VP, CEO, Manager`               |
| `linkedin_url`            | string                | no       | LinkedIn profile URL.                                                                  | `https://linkedin.com/in/sample` |
| `twitter_url`             | string                | no       | Twitter/X profile URL.                                                                 | `https://sample.com`             |
| `whatsapp_number`         | string                | no       | WhatsApp contact number.                                                               | `+1 1234567xxx`                  |
| `secondary_emails`        | list                  | no       | List of strings — additional email addresses.                                          | `["sample@mail.com"]`            |
| `phones`                  | list                  | no       | List of strings — additional phone numbers.                                            | `["+1 1234567xxx"]`              |
| `phone`                   | object `{ primary }`  | no       | Phone object with a `primary` number.                                                  | `{ "primary": "+1 1234567xxx" }` |
| `company_ids`             | list                  | no       | List of strings — linked company ids. Get ids from `GET /zapier/company` (list).       | `["7892xxxxxxxxxxxx"]`           |
| `location`                | [`Address`](#address) | no       | Mailing/location address.                                                              | see [Address](#address)          |
| `department`              | string                | no       | Department the contact belongs to.                                                     | `Engineering, Sales`             |
| `lead_status`             | string                | no       | Lead status key.                                                                       | `new, contacted`                 |
| `lead_status_pipeline_id` | string                | no       | Pipeline the lead status belongs to. Obtain from your Projetly pipeline configuration. | `7892xxxxxxxxxxxx`               |
| `contact_owner`           | string                | no       | User id of the owner. Get from `GET /zapier/users`.                                    | `7892xxxxxxxxxxxx`               |
| `language`                | string                | no       | Preferred language (ISO code).                                                         | `en`                             |
| `campaign`                | string                | no       | Source marketing campaign.                                                             | `Spring Outreach`                |
| `internal_notes`          | string                | no       | Free-text internal notes.                                                              | `Met at conference`              |
| `buying_role`             | string                | no       | Role in the buying process.                                                            | `decision maker, influencer`     |
| `person_category`         | string                | no       | Contact category.                                                                      | `prospect, customer`             |
| `communication_channel`   | string                | no       | Preferred communication channel.                                                       | `email, phone`                   |
| `lead_source`             | string                | no       | Where the contact originated.                                                          | `integration`                    |
| `is_draft`                | boolean               | no       | Save as a draft instead of finalized.                                                  | `false`                          |
| `custom_fields`           | object                | no       | Arbitrary custom field key/values.                                                     | `{ "tier": "gold" }`             |

### ProjectOrDeal

| Field                    | Type                                  | Description                                                           | Example                                                                                 |
| ------------------------ | ------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `project_id`             | string                                | Project / deal id.                                                    | `7892xxxxxxxxxxxx`                                                                      |
| `project_name`           | string                                | Project / deal name.                                                  | `Sample Project`                                                                        |
| `description`            | string                                | Free-text description.                                                | `Sample description`                                                                    |
| `start_date`             | string (date-time)                    | Start date.                                                           | `2026-03-17T18:30:00Z`                                                                  |
| `due_date`               | string (date-time)                    | Due date.                                                             | `2026-06-24T18:30:00Z`                                                                  |
| `project_score`          | number                                | Health / score value.                                                 | `75`                                                                                    |
| `tasks_count`            | integer                               | Number of tasks.                                                      | `12`                                                                                    |
| `is_arr`                 | boolean                               | Whether revenue is recurring (ARR).                                   | `false`                                                                                 |
| `revenue`                | string                                | Formatted revenue.                                                    | `25000`                                                                                 |
| `show_forecasted_date`   | boolean                               | Whether a forecasted date is shown.                                   | `false`                                                                                 |
| `project_fee`            | number                                | One-time project fee.                                                 | `0`                                                                                     |
| `expected_deal_value`    | number                                | Expected deal value.                                                  | `0`                                                                                     |
| `project_owner`          | [`OwnerRef`](#ownerref)               | Owning user reference.                                                | see [OwnerRef](#ownerref)                                                               |
| `account_name`           | string                                | Linked account / company name.                                        | `Sample Company`                                                                        |
| `template_id`            | string                                | Template the project was created from.                                | `7892xxxxxxxxxxxx`                                                                      |
| `region`                 | string                                | Region.                                                               | `North America, EMEA`                                                                   |
| `project_type`           | string                                | Distinguishes a project from a deal.                                  | `project, deal`                                                                         |
| `status`                 | [`StatusRef`](#statusref)             | Current status.                                                       | `{ "status_name": "In Progress" }`                                                      |
| `project_customers`      | list                                  | List of objects `{ full_name, email, role }` — customer participants. | `[{ "full_name": "Sample First Last", "email": "sample@mail.com", "role": "sponsor" }]` |
| `customer_project_owner` | object `{ name, full_name, email }`   | Customer-side project owner.                                          | `{ "name": "Sample", "full_name": "Sample First Last", "email": "sample@mail.com" }`    |
| `external_map`           | object `{ project_id, project_flag }` | External-system mapping.                                              | `{ "project_id": "7892xxxx", "project_flag": true }`                                    |
| `visible_to_all`         | boolean                               | Whether visible to all org members.                                   | `true`                                                                                  |

### ProjectListResponse

| Field         | Type           | Description                                                                 | Example                             |
| ------------- | -------------- | --------------------------------------------------------------------------- | ----------------------------------- |
| `results`     | list           | List of [`ProjectOrDeal`](#projectordeal) objects — page of projects/deals. | see [ProjectOrDeal](#projectordeal) |
| `next_cursor` | string \| null | Cursor for the next page, or null when exhausted.                           | `eyJjdXxxxxx...`                    |

### ProjectInfo

Single project info payload.

| Field          | Type   | Description                                                            | Example                     |
| -------------- | ------ | ---------------------------------------------------------------------- | --------------------------- |
| `project_id`   | string | Project id.                                                            | `7892xxxxxxxxxxxx`          |
| `project_name` | string | Project name.                                                          | `Sample Project`            |
| `template_id`  | string | Template the project was created from.                                 | `7892xxxxxxxxxxxx`          |
| `stages`       | list   | List of [`Milestone`](#milestone) objects — project stages/milestones. | see [Milestone](#milestone) |

### Milestone

| Field          | Type                      | Description                                                | Example                            |
| -------------- | ------------------------- | ---------------------------------------------------------- | ---------------------------------- |
| `milestone_id` | string                    | Milestone id.                                              | `7892xxxxxxxxxxxx`                 |
| `name`         | string                    | Milestone name.                                            | `Kickoff`                          |
| `status`       | [`StatusRef`](#statusref) | Milestone status.                                          | `{ "status_name": "In Progress" }` |
| `tasks`        | list                      | List of [`Task`](#task) objects — tasks in this milestone. | see [Task](#task)                  |

### MilestonesResponse

Returned when `task_filter=true`.

| Field        | Type | Description                                                                | Example                     |
| ------------ | ---- | -------------------------------------------------------------------------- | --------------------------- |
| `milestones` | list | List of [`Milestone`](#milestone) objects — milestones, each with `tasks`. | see [Milestone](#milestone) |

### CreateProjectRequest

Required: `project`, `account`.

| Field        | Type   | Description                                                                                                                                                     | Example              |
| ------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| `account_id` | string | Existing account id, or empty string to create a new account. Reuse an id from `GET /zapier/project` or a prior `POST /zapier/project` response (`account_id`). | `7892xxxxxxxxxxxx`   |
| `project`    | object | Project details (see below).                                                                                                                                    | see `project` object |
| `account`    | object | Account / company details (see below).                                                                                                                          | see `account` object |

**`project` object**

| Field                    | Type                              | Description                                                                      | Example                                         |
| ------------------------ | --------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------- |
| `project_name`           | string                            | Project name.                                                                    | `Sample Project`                                |
| `start_date`             | string                            | Start date.                                                                      | `2026-03-17T18:30:00Z`                          |
| `due_date`               | string                            | Due date.                                                                        | `2026-06-24T18:30:00Z`                          |
| `project_type`           | string                            | Type of project.                                                                 | `onboarding, service_delivery, sales_deal_room` |
| `project_fee`            | number                            | One-time project fee.                                                            | `0`                                             |
| `revenue`                | number                            | Revenue amount.                                                                  | `25000`                                         |
| `show_forecasted_date`   | boolean                           | Whether a forecasted date is shown.                                              | `false`                                         |
| `is_arr`                 | boolean                           | Whether revenue is recurring (ARR).                                              | `false`                                         |
| `project_template`       | object                            | Template to base the project on. Use a template id from `GET /zapier/templates`. | `{ "template_id": "7892xxxx" }`                 |
| `project_owner`          | [`ProjectMember`](#projectmember) | Internal project owner. Use a user id from `GET /zapier/users`.                  | see [ProjectMember](#projectmember)             |
| `customer_project_owner` | [`CustomerRef`](#customerref)     | Customer-side project owner. Use a contact id from `GET /zapier/contact` (list). | see [CustomerRef](#customerref)                 |

**`account` object**

| Field           | Type                              | Description                                                                             | Example                             |
| --------------- | --------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------------- |
| `company_id`    | string                            | Existing company id to link, or empty to create. Get from `GET /zapier/company` (list). | `7892xxxxxxxxxxxx`                  |
| `account_name`  | string                            | Account / company name.                                                                 | `Sample Company`                    |
| `description`   | string                            | Account description.                                                                    | `Sample description`                |
| `region`        | string                            | Region.                                                                                 | `North America, EMEA`               |
| `vertical`      | string                            | Industry vertical.                                                                      | `Education, SaaS`                   |
| `segment`       | string                            | Customer segment.                                                                       | `mid_market, enterprise`            |
| `website_url`   | string                            | Company website.                                                                        | `https://sample.com`                |
| `account_owner` | [`ProjectMember`](#projectmember) | Internal account owner. Use a user id from `GET /zapier/users`.                         | see [ProjectMember](#projectmember) |
| `customer`      | [`CustomerRef`](#customerref)     | Primary customer contact. Use a contact id from `GET /zapier/contact` (list).           | see [CustomerRef](#customerref)     |
| `invite_type`   | string                            | When/whether to invite the customer.                                                    | `invite_later, invite_now`          |

### CreateProjectResponse

| Field        | Type   | Description                         | Example            |
| ------------ | ------ | ----------------------------------- | ------------------ |
| `status`     | string | Outcome status.                     | `success`          |
| `project_id` | string | Id of the created project.          | `7892xxxxxxxxxxxx` |
| `account_id` | string | Id of the created / linked account. | `7892xxxxxxxxxxxx` |
| `name`       | string | Created project name.               | `Sample Project`   |
| `message`    | string | Human-readable result message.      | `Project created`  |

### ProjectMember

| Field           | Type           | Description                       | Example              |
| --------------- | -------------- | --------------------------------- | -------------------- |
| `user_id`       | string \| null | User id.                          | `7892xxxxxxxxxxxx`   |
| `full_name`     | string \| null | Full name.                        | `Sample First Last`  |
| `profile_image` | string \| null | Profile image URL.                | `https://sample.com` |
| `email`         | string \| null | Email address.                    | `sample@mail.com`    |
| `role`          | string \| null | Role on the project.              | `owner, member`      |
| `phone_number`  | string \| null | Phone number.                     | `+1 1234567xxx`      |
| `is_customer`   | boolean        | Whether the member is a customer. | `false`              |

### CustomerRef

| Field        | Type           | Description                                  | Example             |
| ------------ | -------------- | -------------------------------------------- | ------------------- |
| `contact_id` | string \| null | Linked contact id.                           | `7892xxxxxxxxxxxx`  |
| `name`       | string \| null | Short name.                                  | `Sample`            |
| `full_name`  | string \| null | Full name.                                   | `Sample First Last` |
| `email`      | string \| null | Email address.                               | `sample@mail.com`   |
| `team_id`    | string         | Customer team id.                            | `7892xxxxxxxxxxxx`  |
| `is_contact` | boolean        | Whether this references an existing contact. | `true`              |

### Task

| Field              | Type                            | Description                                                                         | Example                                                                                                                                   |
| ------------------ | ------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `item_id`          | string                          | Task id.                                                                            | `7892xxxxxxxxxxxx`                                                                                                                        |
| `display_id`       | string                          | Human-readable display id.                                                          | `TASK_0042`                                                                                                                               |
| `title`            | string                          | Task title.                                                                         | `Sample Task`                                                                                                                             |
| `description`      | string \| null                  | Task description.                                                                   | `Sample description`                                                                                                                      |
| `due_date`         | string                          | Due date / datetime.                                                                | `2026-05-29`                                                                                                                              |
| `tags`             | list                            | List of objects `{ tag_id, tag_name }` — task tags.                                 | `[{ "tag_id": "7892xxxx", "tag_name": "urgent" }]`                                                                                        |
| `checklist_items`  | list                            | List of objects `{ item, is_checked }` — checklist entries.                         | `[{ "item": "Send brief", "is_checked": false }]`                                                                                         |
| `is_completed`     | boolean                         | Whether the task is completed.                                                      | `false`                                                                                                                                   |
| `is_private`       | boolean                         | Whether the task is private.                                                        | `false`                                                                                                                                   |
| `is_starred`       | boolean                         | Whether the task is starred.                                                        | `false`                                                                                                                                   |
| `is_predefined`    | boolean                         | Whether the task came from a template.                                              | `false`                                                                                                                                   |
| `is_blocked`       | boolean                         | Whether the task is blocked.                                                        | `false`                                                                                                                                   |
| `status`           | [`StatusRef`](#statusref)       | Task status.                                                                        | `{ "status_name": "Not Started" }`                                                                                                        |
| `project_id`       | string                          | Parent project id.                                                                  | `7892xxxxxxxxxxxx`                                                                                                                        |
| `project_name`     | string                          | Parent project name.                                                                | `Sample Project`                                                                                                                          |
| `milestone_id`     | string                          | Parent milestone id.                                                                | `7892xxxxxxxxxxxx`                                                                                                                        |
| `milestone`        | object `{ name, milestone_id }` | Parent milestone reference.                                                         | `{ "name": "Kickoff", "milestone_id": "7892xxxx" }`                                                                                       |
| `users`            | list                            | List of objects `{ user_id, full_name, email, role, added_date }` — assigned users. | `[{ "user_id": "7892xxxx", "full_name": "Sample First Last", "email": "sample@mail.com", "role": "member", "added_date": "2026-05-29" }]` |
| `creation_time`    | string (date-time)              | When the task was created.                                                          | `2026-06-05T07:46:23.312Z`                                                                                                                |
| `last_update_time` | string (date-time)              | When the task was last updated.                                                     | `2026-06-05T07:46:23.312Z`                                                                                                                |

### CreateTaskRequest

Required: `title`, `project_id`.

| Field             | Type                      | Required | Description                                                                                                    | Example                                           |
| ----------------- | ------------------------- | -------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `title`           | string                    | yes      | Task title.                                                                                                    | `Sample Task`                                     |
| `project_id`      | string                    | yes      | Project to create the task in. Get from `GET /zapier/project` (list) or the `POST /zapier/project` response.   | `7892xxxxxxxxxxxx`                                |
| `description`     | string                    | no       | Task description.                                                                                              | `Sample description`                              |
| `milestone_id`    | string                    | no       | Milestone to place the task under. Get from `GET /zapier/project/info/{project_id}` (`stages[].milestone_id`). | `7892xxxxxxxxxxxx`                                |
| `due_date`        | string                    | no       | Due date (`YYYY-MM-DD`).                                                                                       | `2026-05-29`                                      |
| `status`          | [`StatusRef`](#statusref) | no       | Task status.                                                                                                   | `{ "status_key": "not_started" }`                 |
| `item_type`       | integer                   | no       | Numeric item type.                                                                                             | `1`                                               |
| `item_type_key`   | string                    | no       | Item type key.                                                                                                 | `task`                                            |
| `users`           | list                      | no       | List of [`ProjectMember`](#projectmember) objects — assignees. Use user ids from `GET /zapier/users`.          | see [ProjectMember](#projectmember)               |
| `checklist_items` | list                      | no       | List of objects `{ item, is_checked }` — checklist entries.                                                    | `[{ "item": "Send brief", "is_checked": false }]` |
| `tags`            | list                      | no       | List of objects `{ tag_name, is_new }` — tags to attach.                                                       | `[{ "tag_name": "urgent", "is_new": true }]`      |

### TaskOptionsResponse

Task option sets for a template (e.g. available statuses).

| Field    | Type | Description                                                          | Example                     |
| -------- | ---- | -------------------------------------------------------------------- | --------------------------- |
| `status` | list | List of [`StatusRef`](#statusref) objects — available task statuses. | see [StatusRef](#statusref) |

### User

| Field          | Type    | Description                           | Example             |
| -------------- | ------- | ------------------------------------- | ------------------- |
| `id`           | string  | Internal user id (mirrors `user_id`). | `7892xxxxxxxxxxxx`  |
| `user_id`      | string  | User id.                              | `7892xxxxxxxxxxxx`  |
| `full_name`    | string  | User's full name.                     | `Sample First Last` |
| `email`        | string  | User's email.                         | `sample@mail.com`   |
| `role`         | string  | User's role.                          | `admin, member`     |
| `phone_number` | string  | User's phone number.                  | `+1 1234567xxx`     |
| `is_customer`  | boolean | Whether the user is a customer.       | `false`             |
| `is_partner`   | boolean | Whether the user is a partner.        | `false`             |

### Template

| Field           | Type   | Description                                                             | Example                     |
| --------------- | ------ | ----------------------------------------------------------------------- | --------------------------- |
| `id`            | string | Template id.                                                            | `7892xxxxxxxxxxxx`          |
| `org_temp_id`   | string | Org-scoped template id.                                                 | `7892xxxxxxxxxxxx`          |
| `template_name` | string | Template name.                                                          | `Onboarding Template`       |
| `milestone`     | list   | List of [`Milestone`](#milestone) objects — template milestones/stages. | see [Milestone](#milestone) |

### TemplateListResponse

| Field     | Type | Description                                                  | Example                   |
| --------- | ---- | ------------------------------------------------------------ | ------------------------- |
| `results` | list | List of [`Template`](#template) objects — page of templates. | see [Template](#template) |

### OptionsResponse

Single-element array carrying metadata option sets. The exact keys depend on the resource (e.g. `company_types`, `company_revenues`, `contact_person_categories`, `contact_buying_roles`). Shape: `[ { … } ]`.

### FieldConfigResponse

Resource field-configuration metadata (open object).

### WebhookSubscribeRequest

Required: `target_url`, `events`, `app_name`.

| Field        | Type         | Required | Description                                                                                                                             | Example                              |
| ------------ | ------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `target_url` | string (uri) | yes      | URL events are delivered to.                                                                                                            | `https://sample.com/hooks/abc`       |
| `events`     | string       | yes      | List literal of event names.                                                                                                            | `"['task_created', 'task_updated']"` |
| `app_name`   | string       | yes      | Source app name.                                                                                                                        | `zapier`                             |
| `project_id` | string       | no       | Required for task events; scopes delivery to one project. Get from `GET /zapier/project` (list) or the `POST /zapier/project` response. | `7892xxxxxxxxxxxx`                   |

**Webhook event names**

`company_created`, `company_updated`, `contact_created`, `contact_updated`, `deal_created`, `deal_updated`, `project_created`, `project_updated`, `task_created`, `task_updated` (task events additionally accept `task_assigned`, `task_status_changed`, `task_completed`).
