# Models

## The Workspace object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":"string"},"domain":{"type":"string"},"avatar":{"type":"string","format":"uri"},"color":{"type":"string"},"settings":{"type":"object"},"type":{"type":"string"},"trialEndsAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archived":{"type":"boolean"}}}}}}
```

## The Company object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"Company":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string"},"domain":{"type":"string"},"logo":{"type":"string","format":"uri"},"description":{"type":"string"},"linkedin":{"type":"string"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"location":{"type":"object","description":"Geographic location of the company. Stored as a structured object, not a plain string.\n","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"continent":{"type":"string"},"countryCode":{"type":"string"},"stateCode":{"type":"string"},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}}},"parentCompanyId":{"type":"string","format":"uuid","nullable":true,"description":"ID of the parent company, for hierarchical company structures."},"custom":{"type":"object","description":"Custom property values, keyed by column UUID. Use `GET /api/columns` to discover available custom property IDs and types. When updating via PATCH, always use dot-notation (e.g. `\"custom.<COLUMN_ID>\": \"value\"`) to avoid overwriting other custom properties.\n"},"externalId":{"type":"string","description":"ID from external system for integrations"},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archived":{"type":"boolean"},"createdById":{"type":"string","format":"uuid"}}}}}}
```

## The CompanyCreate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CompanyCreate":{"type":"object","required":["workspaceId"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string"},"domain":{"type":"string"},"logo":{"type":"string","format":"uri"},"description":{"type":"string"},"linkedin":{"type":"string"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"location":{"type":"object","description":"Geographic location as a structured object. Do not pass a plain string.","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"continent":{"type":"string"}}},"parentCompanyId":{"type":"string","format":"uuid","description":"ID of the parent company."},"custom":{"type":"object"},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The CompanyUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CompanyUpdate":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"logo":{"type":"string","format":"uri"},"description":{"type":"string"},"linkedin":{"type":"string"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"location":{"type":"object","description":"Geographic location as a structured object. Do not pass a plain string.","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"continent":{"type":"string"}}},"parentCompanyId":{"type":"string","format":"uuid"},"custom":{"type":"object"},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The Contact object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"title":{"type":"string"},"phone":{"type":"string"},"linkedin":{"type":"string"},"x":{"type":"string","description":"X (formerly Twitter) handle"},"facebook":{"type":"string"},"github":{"type":"string"},"avatar":{"type":"string","format":"uri"},"location":{"type":"object","description":"Geographic location of the contact. Stored as a structured object, not a plain string.\n","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"continent":{"type":"string"},"countryCode":{"type":"string"},"stateCode":{"type":"string"},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}}},"type":{"type":"string"},"custom":{"type":"object","description":"Custom property values, keyed by column UUID. Use `GET /api/columns` to discover available custom property IDs and types. When updating via PATCH, always use dot-notation (e.g. `\"custom.<COLUMN_ID>\": \"value\"`) to avoid overwriting other custom properties.\n"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"externalId":{"type":"string"},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archived":{"type":"boolean"},"createdById":{"type":"string","format":"uuid"}}}}}}
```

## The ContactCreate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"ContactCreate":{"type":"object","required":["workspaceId"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid","description":"If not provided but email or linkedin is given, the system will automatically find or create the associated company."},"name":{"type":"string"},"email":{"type":"string","format":"email"},"title":{"type":"string"},"phone":{"type":"string"},"linkedin":{"type":"string"},"x":{"type":"string","description":"X (formerly Twitter) handle"},"facebook":{"type":"string"},"github":{"type":"string"},"avatar":{"type":"string","format":"uri"},"location":{"type":"object","description":"Geographic location as a structured object. Do not pass a plain string.","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"continent":{"type":"string"}}},"type":{"type":"string"},"custom":{"type":"object"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The ContactUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"ContactUpdate":{"type":"object","properties":{"companyId":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"title":{"type":"string"},"phone":{"type":"string"},"linkedin":{"type":"string"},"x":{"type":"string","description":"X (formerly Twitter) handle"},"facebook":{"type":"string"},"github":{"type":"string"},"avatar":{"type":"string","format":"uri"},"location":{"type":"object","description":"Geographic location as a structured object. Do not pass a plain string.","properties":{"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"continent":{"type":"string"}}},"type":{"type":"string"},"custom":{"type":"object"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The Deal object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"Deal":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"pipelineId":{"type":"string","format":"uuid","description":"The pipeline this deal belongs to."},"companyId":{"type":"string","format":"uuid"},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"}},"name":{"type":"string"},"stage":{"type":"string","description":"UUID of the pipeline stage."},"value":{"type":"number"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Win probability as a decimal fraction between 0 and 1 (e.g. `0.75` = 75%).\nDo not use percentages (0–100) — values outside the 0–1 range will fail.\n"},"closeDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"custom":{"type":"object","description":"Custom property values, keyed by column UUID. Use `GET /api/columns` to discover available custom property IDs and types. When updating via PATCH, always use dot-notation (e.g. `\"custom.<COLUMN_ID>\": \"value\"`) to avoid overwriting other custom properties.\n"},"externalId":{"type":"string"},"source":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archived":{"type":"boolean"},"createdById":{"type":"string","format":"uuid"}}}}}}
```

## The DealCreate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"DealCreate":{"type":"object","required":["workspaceId"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"}},"name":{"type":"string"},"stage":{"type":"string","description":"If not provided, defaults to the workspace defaultDealStage setting."},"value":{"type":"number"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Win probability as a decimal fraction between 0 and 1 (e.g. `0.75` = 75%). Do not use percentages."},"closeDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"custom":{"type":"object"},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The CustomActivity object

````json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CustomActivity":{"type":"object","description":"A logged activity (call, meeting, or custom interaction) linked to companies, contacts, and deals.","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Title or summary of the activity"},"typeId":{"type":"string","format":"uuid","nullable":true,"description":"ID of the custom activity type (e.g. Call, Meeting). Use `GET /api/customActivityTypes` to discover available types."},"type":{"type":"string","nullable":true,"description":"Legacy type string. Prefer using `typeId` for new activities."},"time":{"type":"string","format":"date-time","nullable":true,"description":"When the activity occurred (ISO 8601)"},"content":{"type":"object","nullable":true,"description":"Flexible JSONB object for structured activity data (e.g. call notes, meeting agenda)."},"custom":{"type":"object","nullable":true,"description":"Custom property values defined by the activity type's `customFields`. Keyed by the custom field `id`.\n\nFor example, if the Call type has a custom field with `\"id\": \"call-result\"`, you can store:\n```json\n{\"call-result\": \"connected\"}\n```\n\nWhen updating via PATCH, use dot-notation (e.g. `\"custom.call-result\": \"connected\"`) to avoid overwriting other custom properties.\n"},"userId":{"type":"string","format":"uuid","nullable":true,"description":"The user who performed the activity. Auto-set from the authenticated user on creation if not provided."},"userIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Multiple users associated with the activity"},"companyIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Companies linked to this activity"},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Contacts linked to this activity"},"dealIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Deals linked to this activity"},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdById":{"type":"string","format":"uuid","nullable":true},"externalId":{"type":"string","nullable":true,"description":"ID from external system for integrations"},"source":{"type":"string","nullable":true}}}}}}
````

## The CustomActivityCreate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CustomActivityCreate":{"type":"object","required":["workspaceId"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Title or summary of the activity"},"typeId":{"type":"string","format":"uuid","description":"ID of the custom activity type. Use `GET /api/customActivityTypes` to discover available types."},"time":{"type":"string","format":"date-time","description":"When the activity occurred. Defaults to now if not provided."},"content":{"type":"object","description":"Flexible JSONB object for structured activity data."},"custom":{"type":"object","description":"Custom property values keyed by the activity type's custom field IDs."},"userId":{"type":"string","format":"uuid","description":"The user who performed the activity. Auto-set from the authenticated user if not provided."},"userIds":{"type":"array","items":{"type":"string","format":"uuid"}},"companyIds":{"type":"array","items":{"type":"string","format":"uuid"}},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"}},"dealIds":{"type":"array","items":{"type":"string","format":"uuid"}},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The CustomActivityUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CustomActivityUpdate":{"type":"object","description":"All fields are optional. Array fields (`contactIds`, `companyIds`, `dealIds`, `userIds`) replace the existing array entirely on update.\n","properties":{"name":{"type":"string"},"typeId":{"type":"string","format":"uuid"},"time":{"type":"string","format":"date-time"},"content":{"type":"object"},"custom":{"type":"object"},"userId":{"type":"string","format":"uuid"},"userIds":{"type":"array","items":{"type":"string","format":"uuid"}},"companyIds":{"type":"array","items":{"type":"string","format":"uuid"}},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"}},"dealIds":{"type":"array","items":{"type":"string","format":"uuid"}},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The CustomActivityType object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CustomActivityType":{"type":"object","description":"A definition for a type of activity that can be logged in a workspace (e.g. Call, Meeting, Site Visit).\n\nEach type can define custom fields that appear when logging an activity. Default types (Call, Meeting) are created automatically for new workspaces.\n","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Display name of the activity type (e.g. \"Call\", \"Meeting\")"},"icon":{"type":"string","nullable":true,"description":"Icon identifier (e.g. \"phone\", \"calendar\", \"building\")"},"color":{"type":"string","nullable":true,"description":"Hex color code for UI display (e.g. \"#C48E1C\")"},"shortcut":{"type":"string","nullable":true,"description":"Keyboard shortcut key for quick activity logging (e.g. \"K\" for Call, \"M\" for Meeting)"},"description":{"type":"string","nullable":true,"description":"Human-readable description of the activity type"},"customFields":{"type":"array","description":"Custom field definitions for this activity type. When creating an activity with this type, the `custom` object on the activity can contain values keyed by these field IDs.\n","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the custom field. Used as the key in the activity's `custom` object."},"name":{"type":"string","description":"Human-readable field name"},"type":{"type":"string","description":"Field type (e.g. \"select\", \"text\", \"number\")"},"options":{"type":"array","description":"Available options for select-type fields","items":{"type":"object","properties":{"key":{"type":"string","description":"The value stored on the activity"},"name":{"type":"string","description":"Human-readable option name"},"color":{"type":"string","description":"Hex color code for UI display"}}}}}}},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdById":{"type":"string","format":"uuid","nullable":true}}}}}}
```

## The CustomActivityTypeCreate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CustomActivityTypeCreate":{"type":"object","required":["workspaceId","name"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Display name of the activity type"},"icon":{"type":"string","description":"Icon identifier"},"color":{"type":"string","description":"Hex color code"},"shortcut":{"type":"string","description":"Keyboard shortcut key"},"description":{"type":"string"},"customFields":{"type":"array","description":"Custom field definitions for this activity type","items":{"type":"object","required":["id","name","type"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}}}}}}}}}}}}
```

## The CustomActivityTypeUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"CustomActivityTypeUpdate":{"type":"object","description":"All fields are optional. The `customFields` array replaces the existing array entirely on update — always include all desired fields.\n","properties":{"name":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"},"shortcut":{"type":"string"},"description":{"type":"string"},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}}}}}}}}}}}}
```

## The DealUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"DealUpdate":{"type":"object","properties":{"companyId":{"type":"string","format":"uuid"},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"}},"name":{"type":"string"},"stage":{"type":"string"},"value":{"type":"number"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Win probability as a decimal fraction between 0 and 1 (e.g. `0.75` = 75%). Do not use percentages."},"closeDate":{"type":"string","format":"date"},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"listIds":{"type":"array","items":{"type":"string","format":"uuid"}},"ownerIds":{"type":"array","items":{"type":"string","format":"uuid"}},"custom":{"type":"object"},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The Column object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"Column":{"type":"object","description":"A custom property definition. The `id` is used as the key inside the `custom` object on records.","properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier for this custom property. Use this as the key when filtering or updating custom fields on records."},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Human-readable name of the custom property"},"description":{"type":"string","nullable":true,"description":"Optional description of the custom property"},"key":{"type":"string","description":"Dot-notation path for this column, e.g. `custom.<UUID>`. Convenient for constructing filter and update payloads."},"type":{"type":"string","enum":["text","richtext","number","currency","date","timestamp","select","multiselect","boolean","url","email","phone","user","company","companies","contact","contacts"],"description":"The data type of the custom property.\n\n| Type | Description |\n|------|-------------|\n| `text` | Plain text string |\n| `richtext` | Rich-text / formatted content |\n| `number` | Numeric value |\n| `currency` | Monetary value |\n| `date` | Date (no time) |\n| `timestamp` | Date and time |\n| `select` | Single choice from a predefined list — use option `key` UUIDs |\n| `multiselect` | Multiple choices from a predefined list — use option `key` UUIDs |\n| `boolean` | True/false |\n| `url` | URL string |\n| `email` | Email address |\n| `phone` | Phone number |\n| `user` | Reference to a workspace user |\n| `company` | Relation to a single company record |\n| `companies` | Relation to multiple company records |\n| `contact` | Relation to a single contact record |\n| `contacts` | Relation to multiple contact records |\n"},"entity":{"type":"string","enum":["companies","contacts","deals"],"description":"Which record type this custom property belongs to (plural form)."},"options":{"type":"array","nullable":true,"description":"Available options for `select` and `multiselect` type columns. `null` for all other types.\n\n> **Important:** Use the option `key` UUID (not the `name`) when filtering or updating records.\n","items":{"type":"object","properties":{"key":{"type":"string","format":"uuid","description":"The UUID value stored on records. Use this when filtering (`$in`, `$overlaps`, exact match) or writing to a select/multiselect field."},"name":{"type":"string","description":"Human-readable display name for the option"},"color":{"type":"string","description":"Hex color code for UI display (e.g. `#4CAF50`)"}}}},"ai":{"type":"boolean","description":"Whether this column is AI-generated"},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdById":{"type":"string","format":"uuid"}}}}}}
```

## The Note object

````json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"Note":{"type":"object","description":"A note attached to one or more records (company, contact, or deal).","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Title of the note"},"emoji":{"type":"string","description":"Emoji icon for the note (e.g. \"🗒️\", \"🔥\")"},"content":{"type":"object","nullable":true,"description":"Note body in [Tiptap](https://tiptap.dev/) document format. A JSON object with `type: \"doc\"` at the root containing an array of block nodes.\n\n```json\n{\n  \"type\": \"doc\",\n  \"content\": [\n    {\n      \"type\": \"paragraph\",\n      \"content\": [\n        {\"type\": \"text\", \"text\": \"Your note text here\"}\n      ]\n    }\n  ]\n}\n```\n"},"companyId":{"type":"string","format":"uuid","nullable":true},"contactId":{"type":"string","format":"uuid","nullable":true},"dealId":{"type":"string","format":"uuid","nullable":true},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdById":{"type":"string","format":"uuid"},"externalId":{"type":"string","nullable":true},"source":{"type":"string","nullable":true}}}}}}
````

## The NoteCreate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"NoteCreate":{"type":"object","required":["workspaceId"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Title of the note"},"emoji":{"type":"string","description":"Emoji icon for the note"},"content":{"type":"object","description":"Note body in Tiptap document format. Can be omitted and set later via PATCH."},"companyId":{"type":"string","format":"uuid","description":"Associate the note with a company"},"contactId":{"type":"string","format":"uuid","description":"Associate the note with a contact"},"dealId":{"type":"string","format":"uuid","description":"Associate the note with a deal"},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The NoteUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"NoteUpdate":{"type":"object","properties":{"name":{"type":"string"},"emoji":{"type":"string"},"content":{"type":"object","description":"Replaces the entire note body. Must be a valid Tiptap document."},"companyId":{"type":"string","format":"uuid"},"contactId":{"type":"string","format":"uuid"},"dealId":{"type":"string","format":"uuid"},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The Task object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"Task":{"type":"object","description":"A task that can be assigned to users and linked to companies, contacts, and deals.","properties":{"id":{"type":"string","format":"uuid"},"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Title of the task"},"done":{"type":"boolean","description":"Whether the task has been completed","default":false},"priority":{"type":"integer","nullable":true,"description":"Task priority level.\n- `null` — No priority\n- `1` — Low\n- `2` — Medium\n- `3` — High\n- `4` — Urgent\n","enum":[null,1,2,3,4]},"deadline":{"type":"string","format":"date-time","nullable":true,"description":"Due date and time (ISO 8601)"},"content":{"type":"object","description":"Task title as a Tiptap document. Auto-generated from `name` if not provided on creation."},"description":{"type":"object","description":"Extended notes or context for the task, in Tiptap document format. Supports rich formatting."},"companyIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Companies linked to this task"},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Contacts linked to this task"},"dealIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Deals linked to this task"},"assignedToIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"User IDs this task is assigned to"},"type":{"type":"string","nullable":true,"description":"Set automatically by integrations (e.g. `circleback` for meeting-generated tasks, `ai-generated` for AI-created tasks). Not intended to be set manually via the API.\n"},"message":{"type":"string","nullable":true},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdById":{"type":"string","format":"uuid","nullable":true},"externalId":{"type":"string","nullable":true},"source":{"type":"string","nullable":true}}}}}}
```

## The TaskCreate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"TaskCreate":{"type":"object","required":["workspaceId","name"],"properties":{"workspaceId":{"type":"string","format":"uuid"},"name":{"type":"string","description":"Title of the task. Also used to auto-generate `content` if `content` is not provided."},"content":{"type":"object","description":"Task title as a Tiptap document. If omitted, auto-generated from `name`."},"description":{"type":"object","description":"Extended notes in Tiptap document format. Supports headings, bullet lists, task lists, and inline formatting."},"done":{"type":"boolean","default":false},"priority":{"type":"integer","nullable":true,"description":"`null` = No priority, `1` = Low, `2` = Medium, `3` = High, `4` = Urgent","enum":[null,1,2,3,4]},"deadline":{"type":"string","format":"date-time"},"companyIds":{"type":"array","items":{"type":"string","format":"uuid"}},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"}},"dealIds":{"type":"array","items":{"type":"string","format":"uuid"}},"assignedToIds":{"type":"array","items":{"type":"string","format":"uuid"}},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```

## The TaskUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Zero API","version":"1.5.0"},"components":{"schemas":{"TaskUpdate":{"type":"object","description":"All fields are optional. Array fields (`contactIds`, `companyIds`, `dealIds`, `assignedToIds`) replace the existing array entirely on update.\n","properties":{"name":{"type":"string"},"content":{"type":"object","description":"Replaces the entire task content. Must be a valid Tiptap document."},"description":{"type":"object","description":"Replaces the entire description. Must be a valid Tiptap document."},"done":{"type":"boolean"},"priority":{"type":"integer","nullable":true,"enum":[null,1,2,3,4]},"deadline":{"type":"string","format":"date-time","nullable":true},"companyIds":{"type":"array","items":{"type":"string","format":"uuid"}},"contactIds":{"type":"array","items":{"type":"string","format":"uuid"}},"dealIds":{"type":"array","items":{"type":"string","format":"uuid"}},"assignedToIds":{"type":"array","items":{"type":"string","format":"uuid"}},"externalId":{"type":"string"},"source":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zero.inc/features/api/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
