{
  "openapi": "3.1.2",
  "info": {
    "title": "Enrik API",
    "version": "v1",
    "description": "The public Enrik API, version 1. It is a server-to-server API: call it from your backend, never from a browser. It sends no CORS headers, and an `OPTIONS` request to an API path answers `405 method_not_allowed`. Authenticate with an API key sent as a Bearer token; each operation lists the scopes the key needs, and the `apiKey` security scheme says what each scope grants. Operations marked `x-stability-level: beta` may still change; `stable` ones change only in a new version. A query parameter or body field an operation does not declare is refused with `422 validation_error`, naming it. Every error answers the same envelope: branch on the HTTP status and `error.code`, whose known values `ErrorInfo` lists.",
    "contact": {
      "name": "Enrik support",
      "email": "support@enrik.ai",
      "url": "https://docs.enrik.ai"
    }
  },
  "externalDocs": {
    "description": "Guides, authentication, errors, scopes and pagination.",
    "url": "https://docs.enrik.ai"
  },
  "servers": [
    {
      "url": "https://api.enrik.ai",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "apiKeys",
      "description": "API keys. Public, for any authenticated key: `GET /v1/me`, where it reads its own id, name, display prefix, expiry, workspace and scopes, and `POST /v1/me/rotate` and `POST /v1/me/revoke`, where it rotates its own secret or revokes itself. Minting, listing, rotating and revoking other keys is internal: an owner or admin does it in Settings → API keys."
    },
    {
      "name": "companies",
      "description": "Companies: the organisations in your workspace, with their contacts, timeline and where their facts came from."
    },
    {
      "name": "companyCandidates",
      "description": "Company candidates: companies a discovery job found, or a user added, waiting for review. Accept, reject (dismiss), archive and promote them, one at a time or in bulk."
    },
    {
      "name": "companyDiscoveryJobs",
      "description": "Company discovery jobs: searches for candidate companies from one source, with their candidates and a quality summary. Read-only here; running a job stays in the app."
    },
    {
      "name": "companySignals",
      "description": "Company signals: displayed signals about one company, with their evidence. Manual writes are internal session operations."
    },
    {
      "name": "contacts",
      "description": "Contacts: the people in your workspace, with their timeline."
    },
    {
      "name": "customFieldDefinitions",
      "description": "Custom fields: the fields a workspace added to its contacts and companies, which their `customFields` hold by key."
    },
    {
      "name": "discoveryBriefs",
      "description": "Discovery briefs: how to find and judge companies for one ICP profile version, and their immutable versions. Read-only here."
    },
    {
      "name": "exportFields",
      "description": "The fields an export can carry, the workspace’s custom and recommendation fields included."
    },
    {
      "name": "exportJobs",
      "description": "CSV exports of companies, contacts and candidates: create a draft, preview it, start it, poll it and download the file. A key reads them with `exports:read` and runs them with `exports:run` and `crm:read`; delivery to a webhook destination stays in the app."
    },
    {
      "name": "feedback",
      "description": "Anonymous agent feedback about the public API. Any authenticated API key may send a note, which is stored with no sender; the report is an internal operator read."
    },
    {
      "name": "health",
      "description": "Whether the API is up: `GET /v1/health`, public and needing no API key, is the API catalog’s `status` link. The liveness and readiness probes for load balancers stay internal."
    },
    {
      "name": "icpAssessments",
      "description": "ICP assessments: how one company fares against an ICP profile version, as stored. Reading never evaluates."
    },
    {
      "name": "icpProfiles",
      "description": "ICP profiles: ideal customer profiles and the immutable versions that hold their criteria. Read-only here."
    },
    {
      "name": "savedViews",
      "description": "Saved views: named sets of filters, sort and columns over contacts or companies, which replay to the same records as the equivalent list query."
    },
    {
      "name": "signalDefinitions",
      "description": "Signal definitions: the signals the workspace looks for in companies, and the immutable versions that say what they are. Read-only here."
    },
    {
      "name": "signalDetectors",
      "description": "Signal detectors: the kinds of detector a signal definition can use, and why any cannot run."
    },
    {
      "name": "webhookEventDeliveries",
      "description": "The delivery log of webhook events: states and attempts, never a body."
    },
    {
      "name": "webhookEventTypes",
      "description": "The webhook event types a subscription can name, and the permission and key scope each needs."
    },
    {
      "name": "webhookSubscriptions",
      "description": "Webhook subscriptions: which events Enrik sends, signed, to a receiver URL; edit, test, pause, resume and archive them, and rotate their signing secret. Owners and admins manage them, and grant `webhooks:write` to a key."
    },
    {
      "name": "websiteOnboarding",
      "description": "Workspace company setup: shared profile confirmation and durable command receipts. Public scoped setup operations and internal handoff/artifact projections."
    },
    {
      "name": "workspaceMembers",
      "description": "Workspace members: the people who use the workspace, as the user id and name a contact’s or company’s `ownerUserId` takes. Read-only."
    }
  ],
  "paths": {
    "/v1/companies": {
      "get": {
        "operationId": "companies.list",
        "summary": "List companies",
        "description": "Pages through the workspace’s live companies, newest first unless `sort` says otherwise. Pass `pageInfo.endCursor` as `cursor` to fetch the next page, with the same query. With `rankingMode` (and `sort=contextual_priority`) the companies are ranked by recommendation and each carries it; ranking reads the workspace’s ICP profile (and the brief), so an API key also needs `discovery:read` for it, or the request is refused with 403 `insufficient_scope`. A sort by a custom field, or by a field the list cannot sort by, is refused with 400 `invalid_sort`.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "description": "The conditions a company must meet, as JSON text: an array of `{ field, operator, value }` objects, every one of which must hold (AND). At most 50. The fields: `name`, `domain`, `website`, `industry`, `linkedinUrl`, `country`, `city`, `legalForm`, `registerNumber` and `summary` (text); `employeeCount` and `annualRevenue` (numbers); `id` and `ownerUserId` (ids); `createdAt` and `updatedAt` (ISO 8601 instants); and a custom field as `customFields.<key>`. `contains` and `startsWith` compare text only. `id` with `in` reads several records at once, at most 100 ids (with `limit` 100 they fit on one page): an id that is not found is left out. `nameOrDomain` matches the name or the domain, with `contains` or `eq`. The signal fields take `eq` and read the company’s active signals: `hasActiveSignals` (`true` or `false`); `minSignalRelevanceScore` (a number the highest relevance must reach); `signalCategory`, `signalStrength` and `signalConfidence` (a value one of the signals has); `signalFreshness` (`fresh` or `stale`: the latest signal is at most, or more than, 90 days old). The review fields read the company’s review item and need `review_items:read` (403 without it): `reviewStage` (`eq` or `in`, of `signal_review`, `activation_ready`, `export_ready`, `sync_ready` and `done`); `reviewPriority` (`eq` or `in`, of `low`, `medium`, `high` and `urgent`); `reviewAssignee` (`eq`: `me`, `unassigned` or a user id). A company without a review item matches none of them.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "The sort order. Without `rankingMode`: JSON text, an array of `{ field, direction }` objects (`name`, `domain`, `createdAt` or `updatedAt`; `asc` or `desc`); `reviewPriority` (`desc` is urgent first) or `reviewStage` (`asc` is pipeline order) need `review_items:read`, and put a company without a review item last. With `rankingMode`: the string `contextual_priority`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "required": false,
            "description": "The visible columns, as JSON text: an array of field paths. A display hint; it changes no result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customFieldKeys",
            "in": "query",
            "required": false,
            "description": "Only these custom fields in each row’s `customFields`: their keys, comma-separated, 1 to 20. A key the row holds no value for is left out of it. Without it, every custom field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "The per-column cell states to add to each company, comma-separated: `enrichmentCells`, `formulaCells`, `customApiCells` and `agentCells`. Other values are ignored. Each cell map is read with its own permission: an API key needs `enrichment:read` for the first three and `automation:read` for `agentCells`, or the whole request is refused with 403 `insufficient_scope`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search, as plain text of 1 to 200 characters, split on whitespace: every term must appear, ignoring case, in the name or the domain; different terms may match different fields. ANDed with `filters`. No ranking: the list keeps its `sort`, and a cursor is valid only with the same `q` (another `q` answers `422` with `error.details.code` `invalid_cursor`). `%` and `_` match themselves. Not available with `rankingMode`.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "rankingMode",
            "in": "query",
            "required": false,
            "description": "Rank the companies by recommendation: `icp_only` (fit to the ideal customer profile) or `contextual` (fit to a discovery brief, with `briefId` and `briefVersionId`). Needs `sort=contextual_priority`. Ranking reads the ICP profile and the brief, so an API key also needs `discovery:read`.",
            "schema": {
              "type": "string",
              "enum": [
                "icp_only",
                "contextual"
              ]
            }
          },
          {
            "name": "briefId",
            "in": "query",
            "required": false,
            "description": "With `rankingMode=contextual`: the discovery brief.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "briefVersionId",
            "in": "query",
            "required": false,
            "description": "With `rankingMode=contextual`: the brief’s version.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "snoozed",
            "in": "query",
            "required": false,
            "description": "With `rankingMode`: `exclude` snoozed companies (the default), `include` them, or show `only` them.",
            "schema": {
              "type": "string",
              "enum": [
                "exclude",
                "include",
                "only"
              ]
            }
          },
          {
            "name": "customerStatus",
            "in": "query",
            "required": false,
            "description": "With `rankingMode`: only `customer`s, `not_customer`s, or companies with no status recorded (`unavailable`).",
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "not_customer",
                "unavailable"
              ]
            }
          },
          {
            "name": "salesWorkState",
            "in": "query",
            "required": false,
            "description": "With `rankingMode`: only companies `in_sales_work`, `not_in_sales_work`, or with none recorded (`unavailable`).",
            "schema": {
              "type": "string",
              "enum": [
                "in_sales_work",
                "not_in_sales_work",
                "unavailable"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of companies.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000d101",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "name": "Analytical Engines",
                      "domain": "example.com",
                      "website": "https://example.com",
                      "industry": "Software",
                      "employeeCount": 120,
                      "annualRevenue": 12500000,
                      "address": {
                        "city": "Vienna",
                        "country": "AT"
                      },
                      "linkedinUrl": null,
                      "country": "Austria",
                      "summary": "Builds engines that compute.",
                      "city": "Vienna",
                      "legalForm": "GmbH",
                      "registerNumber": "FN 123456a",
                      "buildingEnergyTags": null,
                      "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                      "customFields": {
                        "segment": "enterprise"
                      },
                      "canonicalCompanyId": null,
                      "enrikUpdateAvailable": false,
                      "enrikSnapshotVersion": null,
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z",
                      "deletedAt": null,
                      "signalSummary": {
                        "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                        "latestSignalTitle": "Hiring five engineers",
                        "latestSignalCategory": "hiring",
                        "latestSignalDate": "2026-09-20",
                        "latestSignalStrength": "strong",
                        "latestSignalConfidence": "high",
                        "latestSignalRelevanceScore": 82,
                        "activeSignalCount": 3,
                        "strongSignalCount": 1,
                        "signalPriorityScore": 82,
                        "scoringVersion": "v1"
                      }
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  },
                  "contextualRanking": {
                    "available": false
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "companies.create",
        "summary": "Create a company",
        "description": "Creates a company. Send an `Idempotency-Key`: a retry with the same key and body returns the company the first request created instead of creating another, and the same key with another body is refused with 409 `idempotency_key_reused`. Returning that company to a retry also needs `crm:read`; without it the retry is refused with 403 `permission_denied`. A domain another live, unlinked company has is refused with 409 `conflict`, `details.code` `duplicate_domain`, and `details.companyId` names that company; an `ownerUserId` not active in the workspace with 422 `validation_error` (`related_record_not_found`).",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCreateRequest"
              },
              "example": {
                "name": "Analytical Engines",
                "domain": "example.com",
                "industry": "Software",
                "employeeCount": 120,
                "customFields": {
                  "segment": "enterprise"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "An organisation in your workspace.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "name": "Analytical Engines",
                  "domain": "example.com",
                  "website": "https://example.com",
                  "industry": "Software",
                  "employeeCount": 120,
                  "annualRevenue": 12500000,
                  "address": {
                    "city": "Vienna",
                    "country": "AT"
                  },
                  "linkedinUrl": null,
                  "country": "Austria",
                  "summary": "Builds engines that compute.",
                  "city": "Vienna",
                  "legalForm": "GmbH",
                  "registerNumber": "FN 123456a",
                  "buildingEnergyTags": null,
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "customFields": {
                    "segment": "enterprise"
                  },
                  "canonicalCompanyId": null,
                  "enrikUpdateAvailable": false,
                  "enrikSnapshotVersion": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z",
                  "deletedAt": null,
                  "signalSummary": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/bulk-create": {
      "post": {
        "operationId": "companies.bulkCreate",
        "summary": "Create up to 100 companies",
        "description": "Creates up to 100 companies, each from the body `companies.create` takes. Send an `Idempotency-Key` for the whole request: a retry with the same key and body returns the first answer, item for item, instead of creating again, and the same key with another body is refused with 409 `idempotency_key_reused`. Returning that answer to a retry also needs `crm:read`; without it the retry is refused with 403 `permission_denied`. The body is checked as a whole first: a malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written. Then the items are created one after another, and one that fails, such as a domain another live, unlinked company has (`conflict`, `details.code` `duplicate_domain`), is left out while the others are created. The answer is 200 with one result per item, in order, and the counts: a written item has `outcome` `created` and the record; a failed one has `outcome` `failed` and an `error` in the error envelope’s shape, with the code and details `companies.create` would have answered. A request counts against the `api-key-bulk` rate-limit policy as well as `api-key`.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyBulkCreateRequest"
              },
              "example": {
                "items": [
                  {
                    "name": "Analytical Engines",
                    "domain": "example.com",
                    "industry": "Software"
                  },
                  {
                    "name": "Difference Engines",
                    "domain": "taken.example"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What a bulk write did, item by item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/BulkRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/BulkRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBulkWriteResult"
                },
                "example": {
                  "results": [
                    {
                      "index": 0,
                      "outcome": "created",
                      "company": {
                        "id": "0199a1b2-0000-7000-8000-00000000d101",
                        "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                        "name": "Analytical Engines",
                        "domain": "example.com",
                        "website": "https://example.com",
                        "industry": "Software",
                        "employeeCount": 120,
                        "annualRevenue": 12500000,
                        "address": {
                          "city": "Vienna",
                          "country": "AT"
                        },
                        "linkedinUrl": null,
                        "country": "Austria",
                        "summary": "Builds engines that compute.",
                        "city": "Vienna",
                        "legalForm": "GmbH",
                        "registerNumber": "FN 123456a",
                        "buildingEnergyTags": null,
                        "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                        "customFields": {
                          "segment": "enterprise"
                        },
                        "canonicalCompanyId": null,
                        "enrikUpdateAvailable": false,
                        "enrikSnapshotVersion": null,
                        "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "createdAt": "2026-09-29T08:00:00.000Z",
                        "updatedAt": "2026-09-29T08:00:00.000Z",
                        "deletedAt": null,
                        "signalSummary": null
                      }
                    },
                    {
                      "index": 1,
                      "outcome": "failed",
                      "error": {
                        "code": "conflict",
                        "message": "A company with this domain already exists in this workspace",
                        "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10",
                        "details": {
                          "code": "duplicate_domain",
                          "companyId": "0199a1b2-0000-7000-8000-00000000d104"
                        }
                      }
                    }
                  ],
                  "created": 1,
                  "updated": 0,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/BulkRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-rate-class": "bulk",
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/bulk-update": {
      "post": {
        "operationId": "companies.bulkUpdate",
        "summary": "Update up to 100 companies",
        "description": "Changes up to 100 companies, each item the body `companies.update` takes plus the `id` of the record to change. Send an `Idempotency-Key` for the whole request: a retry with the same key and body returns the first answer, item for item, instead of changing again, and the same key with another body is refused with 409 `idempotency_key_reused`; returning that answer to a retry also needs `crm:read`. The body is checked as a whole first: a malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written. Then the items run one after another, so one that fails leaves the others written: an `id` that is not a live record of the workspace fails with `not_found`, and an `expectedUpdatedAt` the record has changed since fails with `stale_version`, nothing written for it. The answer is 200 with one result per item, in order, and the counts: a written item has `outcome` `updated` and the record; a failed one has `outcome` `failed` and an `error` in the error envelope’s shape, with the code and details `companies.update` would have answered. A request counts against the `api-key-bulk` rate-limit policy as well as `api-key`.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyBulkUpdateRequest"
              },
              "example": {
                "items": [
                  {
                    "id": "0199a1b2-0000-7000-8000-00000000d101",
                    "employeeCount": 140
                  },
                  {
                    "id": "0199a1b2-0000-7000-8000-00000000d104",
                    "industry": "Energy",
                    "expectedUpdatedAt": "2026-09-29T08:00:00.000Z"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What a bulk write did, item by item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/BulkRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/BulkRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBulkWriteResult"
                },
                "example": {
                  "results": [
                    {
                      "index": 0,
                      "outcome": "updated",
                      "company": {
                        "id": "0199a1b2-0000-7000-8000-00000000d101",
                        "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                        "name": "Analytical Engines",
                        "domain": "example.com",
                        "website": "https://example.com",
                        "industry": "Software",
                        "employeeCount": 140,
                        "annualRevenue": 12500000,
                        "address": {
                          "city": "Vienna",
                          "country": "AT"
                        },
                        "linkedinUrl": null,
                        "country": "Austria",
                        "summary": "Builds engines that compute.",
                        "city": "Vienna",
                        "legalForm": "GmbH",
                        "registerNumber": "FN 123456a",
                        "buildingEnergyTags": null,
                        "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                        "customFields": {
                          "segment": "enterprise"
                        },
                        "canonicalCompanyId": null,
                        "enrikUpdateAvailable": false,
                        "enrikSnapshotVersion": null,
                        "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "createdAt": "2026-09-29T08:00:00.000Z",
                        "updatedAt": "2026-09-30T09:30:00.000Z",
                        "deletedAt": null,
                        "signalSummary": null
                      }
                    },
                    {
                      "index": 1,
                      "outcome": "failed",
                      "error": {
                        "code": "stale_version",
                        "message": "This record changed since it was read; re-read it and retry",
                        "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10",
                        "details": {
                          "resourceType": "company",
                          "resourceId": "0199a1b2-0000-7000-8000-00000000d104",
                          "currentUpdatedAt": "2026-09-30T09:30:00.000Z"
                        }
                      }
                    }
                  ],
                  "created": 0,
                  "updated": 1,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/BulkRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-rate-class": "bulk",
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/bulk-upsert": {
      "post": {
        "operationId": "companies.bulkUpsert",
        "summary": "Create or update up to 100 companies by domain",
        "description": "Creates or updates up to 100 companies, each found by its `domain` as `companies.upsert` finds it: a company created needs `name` (else the item fails with `validation_error` at `name`), and a domain more than one live company has fails the item with `conflict`, `details.code` `ambiguous_domain`. The body is checked as a whole first: a malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written. Then the items run one after another, each in its own transaction, so one that fails leaves the others written. The answer is 200 with one result per item, in order, and the counts: a written item has `outcome` `created` or `updated` and the record; a failed one has `outcome` `failed` and an `error` in the error envelope’s shape, with the code and details the single upsert would have answered. Every item is keyed by its natural key, so sending the same body again is harmless: no `Idempotency-Key` is taken, and a failed request or failed items can simply be sent again. A request counts against the `api-key-bulk` rate-limit policy as well as `api-key`.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyBulkUpsertRequest"
              },
              "example": {
                "items": [
                  {
                    "domain": "https://www.example.com",
                    "name": "Analytical Engines",
                    "industry": "Software"
                  },
                  {
                    "domain": "shared.example",
                    "industry": "Energy"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What a bulk write did, item by item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/BulkRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/BulkRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyBulkWriteResult"
                },
                "example": {
                  "results": [
                    {
                      "index": 0,
                      "outcome": "created",
                      "company": {
                        "id": "0199a1b2-0000-7000-8000-00000000d101",
                        "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                        "name": "Analytical Engines",
                        "domain": "example.com",
                        "website": "https://example.com",
                        "industry": "Software",
                        "employeeCount": 120,
                        "annualRevenue": 12500000,
                        "address": {
                          "city": "Vienna",
                          "country": "AT"
                        },
                        "linkedinUrl": null,
                        "country": "Austria",
                        "summary": "Builds engines that compute.",
                        "city": "Vienna",
                        "legalForm": "GmbH",
                        "registerNumber": "FN 123456a",
                        "buildingEnergyTags": null,
                        "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                        "customFields": {
                          "segment": "enterprise"
                        },
                        "canonicalCompanyId": null,
                        "enrikUpdateAvailable": false,
                        "enrikSnapshotVersion": null,
                        "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "createdAt": "2026-09-29T08:00:00.000Z",
                        "updatedAt": "2026-09-29T08:00:00.000Z",
                        "deletedAt": null,
                        "signalSummary": null
                      }
                    },
                    {
                      "index": 1,
                      "outcome": "failed",
                      "error": {
                        "code": "conflict",
                        "message": "More than one live company has this domain",
                        "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10",
                        "details": {
                          "code": "ambiguous_domain",
                          "companyIds": [
                            "0199a1b2-0000-7000-8000-00000000d102",
                            "0199a1b2-0000-7000-8000-00000000d103"
                          ]
                        }
                      }
                    }
                  ],
                  "created": 1,
                  "updated": 0,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/BulkRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-rate-class": "bulk",
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/trash": {
      "get": {
        "operationId": "companies.listTrash",
        "summary": "List deleted companies",
        "description": "Pages through the workspace’s deleted companies, most recently deleted first. A deleted company can be restored.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "deletedAfter",
            "in": "query",
            "required": false,
            "description": "Only companies deleted after this instant (ISO 8601, with an offset or `Z`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of deleted companies, most recently deleted first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedCompanyList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000d101",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "name": "Analytical Engines",
                      "domain": "example.com",
                      "website": "https://example.com",
                      "industry": "Software",
                      "employeeCount": 120,
                      "annualRevenue": 12500000,
                      "address": {
                        "city": "Vienna",
                        "country": "AT"
                      },
                      "linkedinUrl": null,
                      "country": "Austria",
                      "summary": "Builds engines that compute.",
                      "city": "Vienna",
                      "legalForm": "GmbH",
                      "registerNumber": "FN 123456a",
                      "buildingEnergyTags": null,
                      "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                      "customFields": {
                        "segment": "enterprise"
                      },
                      "canonicalCompanyId": null,
                      "enrikUpdateAvailable": false,
                      "enrikSnapshotVersion": null,
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z",
                      "deletedAt": "2026-09-30T09:00:00.000Z",
                      "signalSummary": null
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/upsert": {
      "post": {
        "operationId": "companies.upsert",
        "summary": "Create or update a company by domain",
        "description": "Creates the company with this `domain`, or updates the live company that has it; a URL is reduced to its host first. An update writes only the fields you send and keeps the rest, as `companies.update` does; a create also needs `name`, or the request is refused with 422 `validation_error` at `name`. The answer says which it was, as `outcome`. A company in the trash is not matched: restore it to update it. A domain that more than one live company has, linked to Enrik Data or not, names no single company: the request is refused with 409 `conflict`, `details.code` `ambiguous_domain`, and `details.companyIds` lists them. The domain is the idempotency key, so sending the same body again is harmless and no `Idempotency-Key` is taken. An `ownerUserId` not active in the workspace is refused with 422 `validation_error` (`related_record_not_found`).",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpsertRequest"
              },
              "example": {
                "domain": "https://www.example.com",
                "name": "Analytical Engines",
                "industry": "Software",
                "employeeCount": 120
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What an upsert did, and the company.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyUpsertResult"
                },
                "example": {
                  "outcome": "created",
                  "company": {
                    "id": "0199a1b2-0000-7000-8000-00000000d101",
                    "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                    "name": "Analytical Engines",
                    "domain": "example.com",
                    "website": "https://example.com",
                    "industry": "Software",
                    "employeeCount": 120,
                    "annualRevenue": 12500000,
                    "address": {
                      "city": "Vienna",
                      "country": "AT"
                    },
                    "linkedinUrl": null,
                    "country": "Austria",
                    "summary": "Builds engines that compute.",
                    "city": "Vienna",
                    "legalForm": "GmbH",
                    "registerNumber": "FN 123456a",
                    "buildingEnergyTags": null,
                    "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                    "customFields": {
                      "segment": "enterprise"
                    },
                    "canonicalCompanyId": null,
                    "enrikUpdateAvailable": false,
                    "enrikSnapshotVersion": null,
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-29T08:00:00.000Z",
                    "updatedAt": "2026-09-29T08:00:00.000Z",
                    "deletedAt": null,
                    "signalSummary": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}": {
      "get": {
        "operationId": "companies.get",
        "summary": "Get a company",
        "description": "One live company, by id, with its review item. A deleted company is not found.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "The per-column cell states to add to each company, comma-separated: `enrichmentCells`, `formulaCells`, `customApiCells` and `agentCells`. Other values are ignored. Each cell map is read with its own permission: an API key needs `enrichment:read` for the first three and `automation:read` for `agentCells`, or the whole request is refused with 403 `insufficient_scope`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A company, with its review item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDetail"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "name": "Analytical Engines",
                  "domain": "example.com",
                  "website": "https://example.com",
                  "industry": "Software",
                  "employeeCount": 120,
                  "annualRevenue": 12500000,
                  "address": {
                    "city": "Vienna",
                    "country": "AT"
                  },
                  "linkedinUrl": null,
                  "country": "Austria",
                  "summary": "Builds engines that compute.",
                  "city": "Vienna",
                  "legalForm": "GmbH",
                  "registerNumber": "FN 123456a",
                  "buildingEnergyTags": null,
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "customFields": {
                    "segment": "enterprise"
                  },
                  "canonicalCompanyId": null,
                  "enrikUpdateAvailable": false,
                  "enrikSnapshotVersion": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z",
                  "deletedAt": null,
                  "signalSummary": null
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "companies.update",
        "summary": "Update a company",
        "description": "Changes the fields you send and keeps the rest; `null` clears a field. Send an `Idempotency-Key`: a retry with the same key and body answers the company the first request saved instead of updating again, and the same key with another body is refused with 409 `idempotency_key_reused`; returning it to a retry also needs `crm:read`. To keep from overwriting someone else’s change, send the `updatedAt` you read as `expectedUpdatedAt`: if the company changed since, nothing is written and the answer is 409 `stale_version`; read it again and reapply your change. A domain another live, unlinked company has is refused with 409 `conflict` (see `domain`); an `ownerUserId` not active in the workspace with 422 `validation_error` (`related_record_not_found`).",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateRequest"
              },
              "example": {
                "employeeCount": 140,
                "expectedUpdatedAt": "2026-09-29T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An organisation in your workspace.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "name": "Analytical Engines",
                  "domain": "example.com",
                  "website": "https://example.com",
                  "industry": "Software",
                  "employeeCount": 140,
                  "annualRevenue": 12500000,
                  "address": {
                    "city": "Vienna",
                    "country": "AT"
                  },
                  "linkedinUrl": null,
                  "country": "Austria",
                  "summary": "Builds engines that compute.",
                  "city": "Vienna",
                  "legalForm": "GmbH",
                  "registerNumber": "FN 123456a",
                  "buildingEnergyTags": null,
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "customFields": {
                    "segment": "enterprise"
                  },
                  "canonicalCompanyId": null,
                  "enrikUpdateAvailable": false,
                  "enrikSnapshotVersion": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-30T09:30:00.000Z",
                  "deletedAt": null,
                  "signalSummary": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      },
      "delete": {
        "operationId": "companies.delete",
        "summary": "Delete a company",
        "description": "Moves a company to the trash, from where it can be restored. Its contacts stay, and keep their link to it. Send an `Idempotency-Key`: a retry with the same key answers the first delete from its receipt. Deleting one that is already deleted also answers `ok`; an id that never existed is not found.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:delete"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Done: the operation succeeded and has nothing to return.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}/contacts": {
      "get": {
        "operationId": "companies.listContacts",
        "summary": "List a company’s contacts",
        "description": "Pages through the live contacts of a live company, newest first.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of contacts.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000c101",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "firstName": "Ada",
                      "lastName": "Lovelace",
                      "email": "ada@example.com",
                      "phone": null,
                      "jobTitle": "Head of Engineering",
                      "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                      "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                      "customFields": {},
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z",
                      "deletedAt": null
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}/icp-assessment": {
      "get": {
        "operationId": "icpAssessments.get",
        "summary": "Get a company’s ICP assessment",
        "description": "The stored assessment of one company against an ICP profile version: its score, verdict and how it fared on each criterion. Name `icpProfileId` (and `icpProfileVersionId` for an exact version); without them, the workspace’s one active profile is used, and more than one is refused. Reading never evaluates: a company not yet assessed answers `never_evaluated`.",
        "tags": [
          "icpAssessments"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read",
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "icpProfileId",
            "in": "query",
            "required": false,
            "description": "Assess against this ICP profile. Without it, the workspace’s one active profile.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "icpProfileVersionId",
            "in": "query",
            "required": false,
            "description": "Assess against this exact version of the profile. Without it, the profile’s current version.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A company’s stored ICP assessment, or the news that there is none yet.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpAssessment"
                },
                "example": {
                  "status": "ok",
                  "evaluatedAt": "2026-09-23T07:00:00.000Z",
                  "companyId": "0199a1b2-0000-7000-8000-00000000f301",
                  "companyName": "Alpine Robotics GmbH",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileName": "DACH machine builders",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "versionNumber": 2,
                  "score": 72,
                  "verdict": "possible_fit",
                  "coverage": 0.5,
                  "coverageNote": "Half of the criteria could be assessed.",
                  "criteriaAssessed": 1,
                  "criteriaTotal": 2,
                  "breakdown": [
                    {
                      "criterionId": "countries",
                      "label": "Countries",
                      "type": "firmographic",
                      "operator": "in_set",
                      "weight": 1,
                      "required": true,
                      "verdict": "pass",
                      "unknownReason": null,
                      "groundedIn": "observation",
                      "observationIds": [
                        "0199a1b2-0000-7000-8000-00000000f401"
                      ],
                      "evidenceIds": [
                        "0199a1b2-0000-7000-8000-00000000f501"
                      ],
                      "explanation": "Registered in Austria.",
                      "evidenceQuote": null
                    }
                  ],
                  "unknowns": [
                    {
                      "criterionId": "employee_range",
                      "label": "Employees",
                      "reason": "no_observation"
                    }
                  ],
                  "disqualifiedBy": [],
                  "qualitativeFollowUp": null,
                  "rights": {
                    "state": "current",
                    "redactedCriterionIds": [],
                    "unresolvedObservationCount": 0
                  },
                  "display": {
                    "formulaVersion": "icp-fit-range-v1",
                    "state": "insufficient",
                    "range": {
                      "confirmed": 0,
                      "potential": 100
                    },
                    "band": null,
                    "exclusionCriterionIds": [],
                    "unresolvedRequiredCriterionIds": [],
                    "preferenceWeight": {
                      "met": 0,
                      "answered": 0,
                      "total": 1
                    }
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}/provenance": {
      "get": {
        "operationId": "companies.getProvenance",
        "summary": "Get where a company’s fields came from",
        "description": "For each field of a live company that a source filled in: the source, how the value was arrived at, how fresh it is and whether sources disagreed, with the credit lines the sources require. Show every credit line wherever you show those fields.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Where a company’s fields came from.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyProvenance"
                },
                "example": {
                  "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                  "fields": [
                    {
                      "fieldKey": "employeeCount",
                      "sourceProvider": "gleif",
                      "method": null,
                      "reliability": null,
                      "observedAt": "2026-09-20T10:00:00.000Z",
                      "freshness": "fresh",
                      "materializationState": "materialized",
                      "competingClaimCount": 0
                    }
                  ],
                  "attributions": []
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}/restore": {
      "post": {
        "operationId": "companies.restore",
        "summary": "Restore a deleted company",
        "description": "Brings a deleted company back. Restoring a company that is live answers it unchanged. Send an `Idempotency-Key`: a retry with the same key answers the first restore from its receipt, which also needs `crm:read`. If another live, unlinked company took its domain meanwhile, the restore of an unlinked company is refused with 409 `conflict`.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "An organisation in your workspace.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "name": "Analytical Engines",
                  "domain": "example.com",
                  "website": "https://example.com",
                  "industry": "Software",
                  "employeeCount": 120,
                  "annualRevenue": 12500000,
                  "address": {
                    "city": "Vienna",
                    "country": "AT"
                  },
                  "linkedinUrl": null,
                  "country": "Austria",
                  "summary": "Builds engines that compute.",
                  "city": "Vienna",
                  "legalForm": "GmbH",
                  "registerNumber": "FN 123456a",
                  "buildingEnergyTags": null,
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "customFields": {
                    "segment": "enterprise"
                  },
                  "canonicalCompanyId": null,
                  "enrikUpdateAvailable": false,
                  "enrikSnapshotVersion": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z",
                  "deletedAt": null,
                  "signalSummary": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}/signal-summary": {
      "get": {
        "operationId": "companies.getSignalSummary",
        "summary": "Get a company’s signal summary",
        "description": "What a live company’s active signals add up to: the latest one, the counts and the priority. An API key is served what the app shows. With no signals, or while the app hides the company’s signal-check results, the answer is the empty summary: the counts are 0 and the latest-signal fields and the priority `null`.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "What a company’s active signals add up to.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySignalSummary"
                },
                "example": {
                  "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                  "latestSignalTitle": "Hiring five engineers",
                  "latestSignalCategory": "hiring",
                  "latestSignalDate": "2026-09-20",
                  "latestSignalStrength": "strong",
                  "latestSignalConfidence": "high",
                  "latestSignalRelevanceScore": 82,
                  "activeSignalCount": 3,
                  "strongSignalCount": 1,
                  "signalPriorityScore": 82,
                  "scoringVersion": "v1"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}/signals": {
      "get": {
        "operationId": "companies.listSignals",
        "summary": "List a company’s signals",
        "description": "Pages through the signals recorded about a live company, newest first. Filter by stored `status`; an active signal past its age reads `expired`. An API key is served what the app shows: the same signals, fields and `evidence` passages. Signals from signal checks that the app hides, because their evidence was purged, is past its retention or may not be shown, are left out before paging, so `pageInfo` describes only the signals served.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only signals with this stored status: `active`, `dismissed` or `archived`. An active signal past its age is answered as `expired`, but is filtered as `active`.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "dismissed",
                "archived"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of a company’s signals, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySignalList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000a301",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                      "category": "hiring",
                      "title": "Hiring five engineers",
                      "summary": "The careers page lists five open engineering roles.",
                      "signalDate": "2026-09-20",
                      "observedAt": "2026-09-21T07:00:00.000Z",
                      "sourceType": "manual",
                      "sourceUrl": "https://example.com/careers",
                      "sourceLabel": "Careers page",
                      "strength": "strong",
                      "confidence": "high",
                      "status": "active",
                      "freshnessScore": 96,
                      "relevanceScore": 82,
                      "evidence": [
                        "We are hiring five backend engineers."
                      ],
                      "extractedBy": "manual",
                      "extractionRunId": null,
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "dismissedBy": null,
                      "dismissedAt": null,
                      "createdAt": "2026-09-21T07:00:00.000Z",
                      "updatedAt": "2026-09-21T07:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/companies/{companyId}/timeline": {
      "get": {
        "operationId": "companies.listTimeline",
        "summary": "List a company’s timeline",
        "description": "Pages through what happened to a live company, newest first.",
        "tags": [
          "companies"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "The company’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of a record’s timeline, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineEventList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e201",
                      "eventName": "company.created",
                      "actor": {
                        "type": "user",
                        "userId": "0199a1b2-0000-7000-8000-00000000c001",
                        "apiKeyId": null
                      },
                      "payload": {
                        "id": "0199a1b2-0000-7000-8000-00000000d101"
                      },
                      "createdAt": "2026-09-29T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates": {
      "get": {
        "operationId": "companyCandidates.list",
        "summary": "List candidates",
        "description": "Pages through the workspace’s company candidates, by review priority unless `sort` says otherwise. Filter by job, status, scores or source. Pass `rankingMode` with `sort=contextual_priority` for a ranked list (`contextualRanking.available` says whether the workspace can have one); its rows also carry a `recommendation`. A ranked sort without `rankingMode`, or another sort with it, is refused with `invalid_sort`.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "rankingMode",
            "in": "query",
            "required": false,
            "description": "Rank the candidates: `icp_only` against the ICP profile, `contextual` against a brief.",
            "schema": {
              "type": "string",
              "enum": [
                "icp_only",
                "contextual"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort by one score, highest first, or by `createdAt`, newest first. A ranked list sorts by `contextual_priority`, and only by it. Without it, candidates come by review priority.",
            "schema": {
              "type": "string",
              "enum": [
                "reviewPriorityScore",
                "candidateIcpFitScore",
                "candidateQualityScore",
                "candidateEvidenceScore",
                "createdAt",
                "contextual_priority"
              ]
            }
          },
          {
            "name": "briefId",
            "in": "query",
            "required": false,
            "description": "A contextual ranked list: the brief to rank against.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "briefVersionId",
            "in": "query",
            "required": false,
            "description": "A contextual ranked list: the exact brief version to rank against.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "snoozed",
            "in": "query",
            "required": false,
            "description": "A ranked list: leave snoozed candidates out (`exclude`, the default), in, or only.",
            "schema": {
              "type": "string",
              "enum": [
                "exclude",
                "include",
                "only"
              ]
            }
          },
          {
            "name": "customerStatus",
            "in": "query",
            "required": false,
            "description": "A ranked list: only candidates with this customer status.",
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "not_customer",
                "unavailable"
              ]
            }
          },
          {
            "name": "salesWorkState",
            "in": "query",
            "required": false,
            "description": "A ranked list: only candidates in this state of sales work.",
            "schema": {
              "type": "string",
              "enum": [
                "in_sales_work",
                "not_in_sales_work",
                "unavailable"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "discoveryJobId",
            "in": "query",
            "required": false,
            "description": "Only the candidates of this discovery job.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only candidates in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "needs_review",
                "accepted",
                "rejected",
                "archived",
                "promoted",
                "linked_existing",
                "failed"
              ]
            }
          },
          {
            "name": "dedupeStatus",
            "in": "query",
            "required": false,
            "description": "Only candidates with this duplicate status.",
            "schema": {
              "type": "string",
              "enum": [
                "unchecked",
                "no_match",
                "possible_duplicate",
                "existing_company_match",
                "duplicate_candidate"
              ]
            }
          },
          {
            "name": "scoringStatus",
            "in": "query",
            "required": false,
            "description": "Only candidates with this scoring status.",
            "schema": {
              "type": "string",
              "enum": [
                "unscored",
                "scored",
                "failed",
                "stale"
              ]
            }
          },
          {
            "name": "reviewPriorityTier",
            "in": "query",
            "required": false,
            "description": "Only candidates in this review-priority band.",
            "schema": {
              "type": "string",
              "enum": [
                "high_priority",
                "medium_priority",
                "low_priority",
                "reject_likely",
                "insufficient_data"
              ]
            }
          },
          {
            "name": "recommendedAction",
            "in": "query",
            "required": false,
            "description": "Only candidates with this recommended next action.",
            "schema": {
              "type": "string",
              "enum": [
                "promote_candidate",
                "review_manually",
                "verify_domain",
                "possible_duplicate_review",
                "reject_candidate",
                "insufficient_data"
              ]
            }
          },
          {
            "name": "sourceType",
            "in": "query",
            "required": false,
            "description": "Only candidates from this kind of source.",
            "schema": {
              "type": "string",
              "enum": [
                "pasted_list",
                "manual_candidate",
                "user_provided_source_page",
                "controlled_source",
                "csv_upload",
                "enrik_data",
                "infobel_firmographics",
                "website_visit"
              ]
            }
          },
          {
            "name": "sourceCategory",
            "in": "query",
            "required": false,
            "description": "Only candidates from this category of controlled source.",
            "schema": {
              "type": "string",
              "enum": [
                "trade_fair_exhibitor",
                "event_sponsor",
                "industry_directory",
                "association_member_list",
                "conference_partner",
                "other_structured_b2b_list"
              ]
            }
          },
          {
            "name": "minReviewPriorityScore",
            "in": "query",
            "required": false,
            "description": "Only candidates with at least this review priority, 0 to 100. Empty means no minimum.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minIcpFitScore",
            "in": "query",
            "required": false,
            "description": "Only candidates with at least this ICP fit, 0 to 100. Empty means no minimum.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of candidates: by review priority, by the `sort` asked for, or ranked (`rankingMode`).",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCandidateList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e001",
                      "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                      "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                      "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "discoveryBriefId": null,
                      "name": "Alpine Robotics GmbH",
                      "normalizedName": "alpine robotics",
                      "website": "https://alpine-robotics.example",
                      "domain": "alpine-robotics.example",
                      "normalizedDomain": "alpine-robotics.example",
                      "country": "AT",
                      "description": "Industrial robot cells for small manufacturers.",
                      "sourceType": "pasted_list",
                      "sourceLabel": "Trade fair shortlist",
                      "sourceUrl": null,
                      "sourceRowIndex": 0,
                      "sourcePayload": {
                        "row": "Alpine Robotics GmbH, alpine-robotics.example"
                      },
                      "status": "needs_review",
                      "dedupeStatus": "no_match",
                      "domainVerificationStatus": "verified",
                      "confidence": "high",
                      "matchedCompanyId": null,
                      "promotedCompanyId": null,
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:07.000Z",
                      "updatedAt": "2026-09-29T08:00:08.000Z",
                      "candidateQualityScore": 90,
                      "candidateIcpFitScore": 75,
                      "candidateEvidenceScore": 60,
                      "sourceConfidenceScore": 70,
                      "reviewPriorityScore": 78,
                      "reviewPriorityTier": "medium_priority",
                      "recommendedAction": "review_manually",
                      "scoringStatus": "scored",
                      "scoredAt": "2026-09-29T08:00:08.000Z",
                      "scoringVersion": "deterministic-v1",
                      "scoringMetadata": {
                        "scoringMode": "deterministic",
                        "scoringVersion": "deterministic-v1",
                        "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                        "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                        "discoveryBriefId": null,
                        "inputs": [
                          "name",
                          "website",
                          "country",
                          "description"
                        ],
                        "scoreBreakdown": {
                          "candidateQuality": {
                            "score": 90,
                            "reasons": [
                              "Name, website and description are present."
                            ]
                          },
                          "icpFit": {
                            "score": 75,
                            "reasons": [
                              "The country matches.",
                              "The industry matches."
                            ]
                          },
                          "evidence": {
                            "score": 60,
                            "reasons": [
                              "The website was verified."
                            ]
                          },
                          "sourceConfidence": {
                            "score": 70,
                            "reasons": [
                              "A pasted list from a known trade fair."
                            ]
                          }
                        },
                        "penalties": []
                      },
                      "canonicalCompanyId": null,
                      "entityCompanyId": null,
                      "sourceProfileStatus": null,
                      "workspaceMatchStatus": null,
                      "workspaceCompanyId": null,
                      "enrikSnapshotVersion": null,
                      "profileFetchedAt": null,
                      "retrievalQuery": null,
                      "retrievalReasons": null
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  },
                  "contextualRanking": {
                    "available": true
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/bulk-accept": {
      "post": {
        "operationId": "companyCandidates.bulkAccept",
        "summary": "Accept candidates",
        "description": "Accepts each candidate on its own; one failure never fails another. A repeat with a new key reports the accepted ones as invalid_status and changes nothing. A retry with the same Idempotency-Key answers the first result.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCandidateActionRequest"
              },
              "example": {
                "candidateIds": [
                  "0199a1b2-0000-7000-8000-00000000e001",
                  "0199a1b2-0000-7000-8000-00000000e002"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The per-item result of a bulk action.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkCandidateResponse"
                },
                "example": {
                  "results": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e001",
                      "ok": true
                    },
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e002",
                      "ok": false,
                      "code": "invalid_status",
                      "message": "Not allowed"
                    }
                  ],
                  "succeeded": 1,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/bulk-archive": {
      "post": {
        "operationId": "companyCandidates.bulkArchive",
        "summary": "Archive candidates",
        "description": "Archives each candidate on its own; one failure never fails another. A repeat with a new key reports the archived ones as invalid_status and changes nothing. A retry with the same Idempotency-Key answers the first result.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCandidateActionRequest"
              },
              "example": {
                "candidateIds": [
                  "0199a1b2-0000-7000-8000-00000000e001",
                  "0199a1b2-0000-7000-8000-00000000e002"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The per-item result of a bulk action.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkCandidateResponse"
                },
                "example": {
                  "results": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e001",
                      "ok": true
                    },
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e002",
                      "ok": false,
                      "code": "invalid_status",
                      "message": "Not allowed"
                    }
                  ],
                  "succeeded": 1,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/bulk-promote": {
      "post": {
        "operationId": "companyCandidates.bulkPromote",
        "summary": "Promote candidates",
        "description": "Promotes each candidate on its own, completing its review item, with one of six outcomes per item; one failure never fails another. An already promoted or linked candidate is skipped, so a repeat creates no company. Needs `crm:write` beside `discovery:write`.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write",
              "crm:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCandidateActionRequest"
              },
              "example": {
                "candidateIds": [
                  "0199a1b2-0000-7000-8000-00000000e001",
                  "0199a1b2-0000-7000-8000-00000000e002"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The per-item result of a bulk promotion.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkPromoteResponse"
                },
                "example": {
                  "results": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e001",
                      "outcome": "promoted",
                      "workspaceCompanyId": "0199a1b2-0000-7000-8000-00000000a001"
                    },
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e002",
                      "outcome": "skipped",
                      "workspaceCompanyId": null
                    }
                  ],
                  "counts": {
                    "promoted": 1,
                    "already_in_workspace": 0,
                    "linked_existing": 0,
                    "needs_collision_resolution": 0,
                    "failed": 0,
                    "skipped": 1
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/bulk-reject": {
      "post": {
        "operationId": "companyCandidates.bulkReject",
        "summary": "Reject candidates",
        "description": "Rejects each candidate on its own, as the single reject does; one failure never fails another. A repeat with a new key reports the rejected ones as invalid_status. A retry with the same Idempotency-Key answers the first result.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkCandidateActionRequest"
              },
              "example": {
                "candidateIds": [
                  "0199a1b2-0000-7000-8000-00000000e001",
                  "0199a1b2-0000-7000-8000-00000000e002"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The per-item result of a bulk action.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkCandidateResponse"
                },
                "example": {
                  "results": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e001",
                      "ok": true
                    },
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e002",
                      "ok": false,
                      "code": "invalid_status",
                      "message": "Not allowed"
                    }
                  ],
                  "succeeded": 1,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/{candidateId}": {
      "get": {
        "operationId": "companyCandidates.get",
        "summary": "Get a candidate",
        "description": "One company candidate, by id, with its scores and how they were reached, and its review item.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "candidateId",
            "in": "path",
            "required": true,
            "description": "The candidate’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A company candidate, with its review item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCandidateDetail"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000e001",
                  "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "name": "Alpine Robotics GmbH",
                  "normalizedName": "alpine robotics",
                  "website": "https://alpine-robotics.example",
                  "domain": "alpine-robotics.example",
                  "normalizedDomain": "alpine-robotics.example",
                  "country": "AT",
                  "description": "Industrial robot cells for small manufacturers.",
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceUrl": null,
                  "sourceRowIndex": 0,
                  "sourcePayload": {
                    "row": "Alpine Robotics GmbH, alpine-robotics.example"
                  },
                  "status": "needs_review",
                  "dedupeStatus": "no_match",
                  "domainVerificationStatus": "verified",
                  "confidence": "high",
                  "matchedCompanyId": null,
                  "promotedCompanyId": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:07.000Z",
                  "updatedAt": "2026-09-29T08:00:08.000Z",
                  "candidateQualityScore": 90,
                  "candidateIcpFitScore": 75,
                  "candidateEvidenceScore": 60,
                  "sourceConfidenceScore": 70,
                  "reviewPriorityScore": 78,
                  "reviewPriorityTier": "medium_priority",
                  "recommendedAction": "review_manually",
                  "scoringStatus": "scored",
                  "scoredAt": "2026-09-29T08:00:08.000Z",
                  "scoringVersion": "deterministic-v1",
                  "scoringMetadata": {
                    "scoringMode": "deterministic",
                    "scoringVersion": "deterministic-v1",
                    "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                    "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                    "discoveryBriefId": null,
                    "inputs": [
                      "name",
                      "website",
                      "country",
                      "description"
                    ],
                    "scoreBreakdown": {
                      "candidateQuality": {
                        "score": 90,
                        "reasons": [
                          "Name, website and description are present."
                        ]
                      },
                      "icpFit": {
                        "score": 75,
                        "reasons": [
                          "The country matches.",
                          "The industry matches."
                        ]
                      },
                      "evidence": {
                        "score": 60,
                        "reasons": [
                          "The website was verified."
                        ]
                      },
                      "sourceConfidence": {
                        "score": 70,
                        "reasons": [
                          "A pasted list from a known trade fair."
                        ]
                      }
                    },
                    "penalties": []
                  },
                  "canonicalCompanyId": null,
                  "entityCompanyId": null,
                  "sourceProfileStatus": null,
                  "workspaceMatchStatus": null,
                  "workspaceCompanyId": null,
                  "enrikSnapshotVersion": null,
                  "profileFetchedAt": null,
                  "retrievalQuery": null,
                  "retrievalReasons": null,
                  "reviewItemId": "0199a1b2-0000-7000-8000-00000000e101"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/{candidateId}/accept": {
      "post": {
        "operationId": "companyCandidates.accept",
        "summary": "Accept a candidate",
        "description": "Moves a new or needs_review candidate to accepted, ready to promote. A repeat with a new key changes nothing and answers 422 invalid_status. A retry with the same Idempotency-Key answers the first result.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "candidateId",
            "in": "path",
            "required": true,
            "description": "The candidate’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "A company a discovery job found (or a user added), waiting for review.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCandidate"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000e001",
                  "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "name": "Alpine Robotics GmbH",
                  "normalizedName": "alpine robotics",
                  "website": "https://alpine-robotics.example",
                  "domain": "alpine-robotics.example",
                  "normalizedDomain": "alpine-robotics.example",
                  "country": "AT",
                  "description": "Industrial robot cells for small manufacturers.",
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceUrl": null,
                  "sourceRowIndex": 0,
                  "sourcePayload": {
                    "row": "Alpine Robotics GmbH, alpine-robotics.example"
                  },
                  "status": "accepted",
                  "dedupeStatus": "no_match",
                  "domainVerificationStatus": "verified",
                  "confidence": "high",
                  "matchedCompanyId": null,
                  "promotedCompanyId": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:07.000Z",
                  "updatedAt": "2026-09-29T08:00:08.000Z",
                  "candidateQualityScore": 90,
                  "candidateIcpFitScore": 75,
                  "candidateEvidenceScore": 60,
                  "sourceConfidenceScore": 70,
                  "reviewPriorityScore": 78,
                  "reviewPriorityTier": "medium_priority",
                  "recommendedAction": "review_manually",
                  "scoringStatus": "scored",
                  "scoredAt": "2026-09-29T08:00:08.000Z",
                  "scoringVersion": "deterministic-v1",
                  "scoringMetadata": {
                    "scoringMode": "deterministic",
                    "scoringVersion": "deterministic-v1",
                    "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                    "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                    "discoveryBriefId": null,
                    "inputs": [
                      "name",
                      "website",
                      "country",
                      "description"
                    ],
                    "scoreBreakdown": {
                      "candidateQuality": {
                        "score": 90,
                        "reasons": [
                          "Name, website and description are present."
                        ]
                      },
                      "icpFit": {
                        "score": 75,
                        "reasons": [
                          "The country matches.",
                          "The industry matches."
                        ]
                      },
                      "evidence": {
                        "score": 60,
                        "reasons": [
                          "The website was verified."
                        ]
                      },
                      "sourceConfidence": {
                        "score": 70,
                        "reasons": [
                          "A pasted list from a known trade fair."
                        ]
                      }
                    },
                    "penalties": []
                  },
                  "canonicalCompanyId": null,
                  "entityCompanyId": null,
                  "sourceProfileStatus": null,
                  "workspaceMatchStatus": null,
                  "workspaceCompanyId": null,
                  "enrikSnapshotVersion": null,
                  "profileFetchedAt": null,
                  "retrievalQuery": null,
                  "retrievalReasons": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/{candidateId}/archive": {
      "post": {
        "operationId": "companyCandidates.archive",
        "summary": "Archive a candidate",
        "description": "Moves an accepted, rejected or promoted candidate to archived, which hides it from review. A promoted candidate’s company stays. A repeat with a new key changes nothing and answers 422 invalid_status. A retry with the same Idempotency-Key answers the first result.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "candidateId",
            "in": "path",
            "required": true,
            "description": "The candidate’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "A company a discovery job found (or a user added), waiting for review.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCandidate"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000e001",
                  "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "name": "Alpine Robotics GmbH",
                  "normalizedName": "alpine robotics",
                  "website": "https://alpine-robotics.example",
                  "domain": "alpine-robotics.example",
                  "normalizedDomain": "alpine-robotics.example",
                  "country": "AT",
                  "description": "Industrial robot cells for small manufacturers.",
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceUrl": null,
                  "sourceRowIndex": 0,
                  "sourcePayload": {
                    "row": "Alpine Robotics GmbH, alpine-robotics.example"
                  },
                  "status": "archived",
                  "dedupeStatus": "no_match",
                  "domainVerificationStatus": "verified",
                  "confidence": "high",
                  "matchedCompanyId": null,
                  "promotedCompanyId": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:07.000Z",
                  "updatedAt": "2026-09-29T08:00:08.000Z",
                  "candidateQualityScore": 90,
                  "candidateIcpFitScore": 75,
                  "candidateEvidenceScore": 60,
                  "sourceConfidenceScore": 70,
                  "reviewPriorityScore": 78,
                  "reviewPriorityTier": "medium_priority",
                  "recommendedAction": "review_manually",
                  "scoringStatus": "scored",
                  "scoredAt": "2026-09-29T08:00:08.000Z",
                  "scoringVersion": "deterministic-v1",
                  "scoringMetadata": {
                    "scoringMode": "deterministic",
                    "scoringVersion": "deterministic-v1",
                    "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                    "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                    "discoveryBriefId": null,
                    "inputs": [
                      "name",
                      "website",
                      "country",
                      "description"
                    ],
                    "scoreBreakdown": {
                      "candidateQuality": {
                        "score": 90,
                        "reasons": [
                          "Name, website and description are present."
                        ]
                      },
                      "icpFit": {
                        "score": 75,
                        "reasons": [
                          "The country matches.",
                          "The industry matches."
                        ]
                      },
                      "evidence": {
                        "score": 60,
                        "reasons": [
                          "The website was verified."
                        ]
                      },
                      "sourceConfidence": {
                        "score": 70,
                        "reasons": [
                          "A pasted list from a known trade fair."
                        ]
                      }
                    },
                    "penalties": []
                  },
                  "canonicalCompanyId": null,
                  "entityCompanyId": null,
                  "sourceProfileStatus": null,
                  "workspaceMatchStatus": null,
                  "workspaceCompanyId": null,
                  "enrikSnapshotVersion": null,
                  "profileFetchedAt": null,
                  "retrievalQuery": null,
                  "retrievalReasons": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/{candidateId}/promote": {
      "post": {
        "operationId": "companyCandidates.promote",
        "summary": "Promote a candidate",
        "description": "Turns an accepted candidate into a workspace company (through the Enrik flow for one from Enrik data) and completes its review item: 201 for a new company, 200 for a link to one the workspace has. A domain the workspace already holds answers 409. A repeat creates nothing: 422 invalid_status, or already_in_workspace from Enrik data. Needs `crm:write` beside `discovery:write`.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write",
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "candidateId",
            "in": "path",
            "required": true,
            "description": "The candidate’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromoteCandidateRequest"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "201": {
            "description": "The result of promoting a candidate.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromoteCandidateResponse"
                },
                "example": {
                  "candidate": {
                    "id": "0199a1b2-0000-7000-8000-00000000e001",
                    "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                    "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                    "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                    "discoveryBriefId": null,
                    "name": "Alpine Robotics GmbH",
                    "normalizedName": "alpine robotics",
                    "website": "https://alpine-robotics.example",
                    "domain": "alpine-robotics.example",
                    "normalizedDomain": "alpine-robotics.example",
                    "country": "AT",
                    "description": "Industrial robot cells for small manufacturers.",
                    "sourceType": "pasted_list",
                    "sourceLabel": "Trade fair shortlist",
                    "sourceUrl": null,
                    "sourceRowIndex": 0,
                    "sourcePayload": {
                      "row": "Alpine Robotics GmbH, alpine-robotics.example"
                    },
                    "status": "promoted",
                    "dedupeStatus": "no_match",
                    "domainVerificationStatus": "verified",
                    "confidence": "high",
                    "matchedCompanyId": null,
                    "promotedCompanyId": "0199a1b2-0000-7000-8000-00000000a001",
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-29T08:00:07.000Z",
                    "updatedAt": "2026-09-29T08:00:08.000Z",
                    "candidateQualityScore": 90,
                    "candidateIcpFitScore": 75,
                    "candidateEvidenceScore": 60,
                    "sourceConfidenceScore": 70,
                    "reviewPriorityScore": 78,
                    "reviewPriorityTier": "medium_priority",
                    "recommendedAction": "review_manually",
                    "scoringStatus": "scored",
                    "scoredAt": "2026-09-29T08:00:08.000Z",
                    "scoringVersion": "deterministic-v1",
                    "scoringMetadata": {
                      "scoringMode": "deterministic",
                      "scoringVersion": "deterministic-v1",
                      "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                      "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "discoveryBriefId": null,
                      "inputs": [
                        "name",
                        "website",
                        "country",
                        "description"
                      ],
                      "scoreBreakdown": {
                        "candidateQuality": {
                          "score": 90,
                          "reasons": [
                            "Name, website and description are present."
                          ]
                        },
                        "icpFit": {
                          "score": 75,
                          "reasons": [
                            "The country matches.",
                            "The industry matches."
                          ]
                        },
                        "evidence": {
                          "score": 60,
                          "reasons": [
                            "The website was verified."
                          ]
                        },
                        "sourceConfidence": {
                          "score": 70,
                          "reasons": [
                            "A pasted list from a known trade fair."
                          ]
                        }
                      },
                      "penalties": []
                    },
                    "canonicalCompanyId": null,
                    "entityCompanyId": null,
                    "sourceProfileStatus": null,
                    "workspaceMatchStatus": null,
                    "workspaceCompanyId": null,
                    "enrikSnapshotVersion": null,
                    "profileFetchedAt": null,
                    "retrievalQuery": null,
                    "retrievalReasons": null
                  },
                  "companyId": "0199a1b2-0000-7000-8000-00000000a001",
                  "outcome": "promoted"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-candidates/{candidateId}/reject": {
      "post": {
        "operationId": "companyCandidates.reject",
        "summary": "Reject a candidate",
        "description": "Rejects a new, needs_review or accepted candidate and its review item, reason other; a website-visit one also dismisses its visitor (`companies:update`). A repeat answers 422 invalid_status. A retry with the same Idempotency-Key answers the first result.",
        "tags": [
          "companyCandidates"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "candidateId",
            "in": "path",
            "required": true,
            "description": "The candidate’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "A company a discovery job found (or a user added), waiting for review.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyCandidate"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000e001",
                  "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "name": "Alpine Robotics GmbH",
                  "normalizedName": "alpine robotics",
                  "website": "https://alpine-robotics.example",
                  "domain": "alpine-robotics.example",
                  "normalizedDomain": "alpine-robotics.example",
                  "country": "AT",
                  "description": "Industrial robot cells for small manufacturers.",
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceUrl": null,
                  "sourceRowIndex": 0,
                  "sourcePayload": {
                    "row": "Alpine Robotics GmbH, alpine-robotics.example"
                  },
                  "status": "rejected",
                  "dedupeStatus": "no_match",
                  "domainVerificationStatus": "verified",
                  "confidence": "high",
                  "matchedCompanyId": null,
                  "promotedCompanyId": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:07.000Z",
                  "updatedAt": "2026-09-29T08:00:08.000Z",
                  "candidateQualityScore": 90,
                  "candidateIcpFitScore": 75,
                  "candidateEvidenceScore": 60,
                  "sourceConfidenceScore": 70,
                  "reviewPriorityScore": 78,
                  "reviewPriorityTier": "medium_priority",
                  "recommendedAction": "review_manually",
                  "scoringStatus": "scored",
                  "scoredAt": "2026-09-29T08:00:08.000Z",
                  "scoringVersion": "deterministic-v1",
                  "scoringMetadata": {
                    "scoringMode": "deterministic",
                    "scoringVersion": "deterministic-v1",
                    "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                    "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                    "discoveryBriefId": null,
                    "inputs": [
                      "name",
                      "website",
                      "country",
                      "description"
                    ],
                    "scoreBreakdown": {
                      "candidateQuality": {
                        "score": 90,
                        "reasons": [
                          "Name, website and description are present."
                        ]
                      },
                      "icpFit": {
                        "score": 75,
                        "reasons": [
                          "The country matches.",
                          "The industry matches."
                        ]
                      },
                      "evidence": {
                        "score": 60,
                        "reasons": [
                          "The website was verified."
                        ]
                      },
                      "sourceConfidence": {
                        "score": 70,
                        "reasons": [
                          "A pasted list from a known trade fair."
                        ]
                      }
                    },
                    "penalties": []
                  },
                  "canonicalCompanyId": null,
                  "entityCompanyId": null,
                  "sourceProfileStatus": null,
                  "workspaceMatchStatus": null,
                  "workspaceCompanyId": null,
                  "enrikSnapshotVersion": null,
                  "profileFetchedAt": null,
                  "retrievalQuery": null,
                  "retrievalReasons": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-discovery-jobs": {
      "get": {
        "operationId": "companyDiscoveryJobs.list",
        "summary": "List discovery jobs",
        "description": "Pages through the workspace’s company discovery jobs, newest first. Filter by `status` or `sourceType`; pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only jobs in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "queued",
                "running",
                "completed",
                "completed_with_errors",
                "failed",
                "canceled",
                "archived"
              ]
            }
          },
          {
            "name": "sourceType",
            "in": "query",
            "required": false,
            "description": "Only jobs with this kind of source.",
            "schema": {
              "type": "string",
              "enum": [
                "pasted_list",
                "manual_candidate",
                "user_provided_source_page",
                "controlled_source",
                "csv_upload",
                "enrik_data",
                "infobel_firmographics"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of discovery jobs, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJobList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000d001",
                      "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                      "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "discoveryBriefId": null,
                      "sourceType": "pasted_list",
                      "sourceLabel": "Trade fair shortlist",
                      "sourceConfig": {
                        "rows": 2
                      },
                      "status": "completed",
                      "stats": {
                        "candidatesCreated": 2,
                        "rowsSkipped": 0
                      },
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdByApiKeyId": null,
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "startedAt": "2026-09-29T08:00:05.000Z",
                      "completedAt": "2026-09-29T08:00:09.000Z",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:09.000Z"
                    },
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000d002",
                      "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                      "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "discoveryBriefId": null,
                      "sourceType": "pasted_list",
                      "sourceLabel": "Trade fair shortlist",
                      "sourceConfig": {
                        "rows": 2
                      },
                      "status": "draft",
                      "stats": {
                        "candidatesCreated": 2,
                        "rowsSkipped": 0
                      },
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdByApiKeyId": null,
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "startedAt": null,
                      "completedAt": null,
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:09.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": true,
                    "endCursor": "eyJ2IjoxLCJzaWciOiIifQ",
                    "limit": 2
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "companyDiscoveryJobs.create",
        "summary": "Create a discovery job",
        "description": "Creates a job in `draft`; it finds no candidates until it is started, and creating one spends nothing. The job and its audit row commit only after this answer is checked. A retry with the same Idempotency-Key and body replays the same answer for 24 hours instead of creating a second job. A job an API key creates names that key in `createdByApiKeyId`.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:run"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyDiscoveryJobCreateRequest"
              },
              "example": {
                "sourceType": "pasted_list",
                "sourceLabel": "Trade fair shortlist",
                "sourceConfig": {
                  "rows": [
                    {
                      "name": "Alpine Robotics GmbH",
                      "website": "alpine-robotics.example"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A company discovery job: one search for candidate companies from one source.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJob"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceConfig": {
                    "rows": [
                      {
                        "name": "Alpine Robotics GmbH",
                        "website": "alpine-robotics.example"
                      }
                    ]
                  },
                  "status": "draft",
                  "stats": {},
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdByApiKeyId": null,
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:09.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-discovery-jobs/{jobId}": {
      "get": {
        "operationId": "companyDiscoveryJobs.get",
        "summary": "Get a discovery job",
        "description": "One company discovery job, by id, with the counters it recorded while it ran.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The discovery job’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A company discovery job: one search for candidate companies from one source.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJob"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceConfig": {
                    "rows": 2
                  },
                  "status": "completed",
                  "stats": {
                    "candidatesCreated": 2,
                    "rowsSkipped": 0
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdByApiKeyId": null,
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "startedAt": "2026-09-29T08:00:05.000Z",
                  "completedAt": "2026-09-29T08:00:09.000Z",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:09.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "companyDiscoveryJobs.update",
        "summary": "Update a draft discovery job",
        "description": "Changes the label or the ICP and brief links of a draft job, fenced against a concurrent start; a job that is no longer a draft answers 409. The same patch again leaves the same job; a refused answer after the write is committed.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:run"
            ]
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The discovery job’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyDiscoveryJobUpdateRequest"
              },
              "example": {
                "sourceLabel": "Trade fair shortlist"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A company discovery job: one search for candidate companies from one source.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJob"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceConfig": {
                    "rows": [
                      {
                        "name": "Alpine Robotics GmbH",
                        "website": "alpine-robotics.example"
                      }
                    ]
                  },
                  "status": "draft",
                  "stats": {},
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdByApiKeyId": null,
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:09.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-discovery-jobs/{jobId}/archive": {
      "post": {
        "operationId": "companyDiscoveryJobs.archive",
        "summary": "Archive a discovery job",
        "description": "Moves the job to archived; the row stays. A queued or running job answers 409 conflict: cancel it first. An archived job answers the neutral 404, so a repeat adds nothing.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The discovery job’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A company discovery job: one search for candidate companies from one source.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJob"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceConfig": {
                    "rows": [
                      {
                        "name": "Alpine Robotics GmbH",
                        "website": "alpine-robotics.example"
                      }
                    ]
                  },
                  "status": "archived",
                  "stats": {},
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdByApiKeyId": null,
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:09.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-discovery-jobs/{jobId}/cancel": {
      "post": {
        "operationId": "companyDiscoveryJobs.cancel",
        "summary": "Cancel a discovery job",
        "description": "Cancels a draft, queued or running job. A job an API key created may be canceled by any key holding `discovery:run` and by any member who may cancel jobs; a member’s job by that member, or by another with members:manage, and never by a key (403). A job that already ended is returned unchanged, so repeating is safe.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:run"
            ]
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The discovery job’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A company discovery job: one search for candidate companies from one source.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJob"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceConfig": {
                    "rows": [
                      {
                        "name": "Alpine Robotics GmbH",
                        "website": "alpine-robotics.example"
                      }
                    ]
                  },
                  "status": "canceled",
                  "stats": {},
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdByApiKeyId": null,
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "startedAt": null,
                  "completedAt": "2026-09-29T08:00:09.000Z",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:09.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-discovery-jobs/{jobId}/candidates": {
      "get": {
        "operationId": "companyDiscoveryJobs.listCandidates",
        "summary": "List a discovery job’s candidates",
        "description": "Pages through the candidates one discovery job found. Filter by `status`; pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The discovery job’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only candidates in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "needs_review",
                "accepted",
                "rejected",
                "archived",
                "promoted",
                "linked_existing",
                "failed"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of one discovery job’s candidates.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJobCandidateList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e001",
                      "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                      "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                      "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "discoveryBriefId": null,
                      "name": "Alpine Robotics GmbH",
                      "normalizedName": "alpine robotics",
                      "website": "https://alpine-robotics.example",
                      "domain": "alpine-robotics.example",
                      "normalizedDomain": "alpine-robotics.example",
                      "country": "AT",
                      "description": "Industrial robot cells for small manufacturers.",
                      "sourceType": "pasted_list",
                      "sourceLabel": "Trade fair shortlist",
                      "sourceUrl": null,
                      "sourceRowIndex": 0,
                      "sourcePayload": {
                        "row": "Alpine Robotics GmbH, alpine-robotics.example"
                      },
                      "status": "needs_review",
                      "dedupeStatus": "no_match",
                      "domainVerificationStatus": "verified",
                      "confidence": "high",
                      "matchedCompanyId": null,
                      "promotedCompanyId": null,
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:07.000Z",
                      "updatedAt": "2026-09-29T08:00:08.000Z",
                      "candidateQualityScore": 90,
                      "candidateIcpFitScore": 75,
                      "candidateEvidenceScore": 60,
                      "sourceConfidenceScore": 70,
                      "reviewPriorityScore": 78,
                      "reviewPriorityTier": "medium_priority",
                      "recommendedAction": "review_manually",
                      "scoringStatus": "scored",
                      "scoredAt": "2026-09-29T08:00:08.000Z",
                      "scoringVersion": "deterministic-v1",
                      "scoringMetadata": {
                        "scoringMode": "deterministic",
                        "scoringVersion": "deterministic-v1",
                        "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                        "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                        "discoveryBriefId": null,
                        "inputs": [
                          "name",
                          "website",
                          "country",
                          "description"
                        ],
                        "scoreBreakdown": {
                          "candidateQuality": {
                            "score": 90,
                            "reasons": [
                              "Name, website and description are present."
                            ]
                          },
                          "icpFit": {
                            "score": 75,
                            "reasons": [
                              "The country matches.",
                              "The industry matches."
                            ]
                          },
                          "evidence": {
                            "score": 60,
                            "reasons": [
                              "The website was verified."
                            ]
                          },
                          "sourceConfidence": {
                            "score": 70,
                            "reasons": [
                              "A pasted list from a known trade fair."
                            ]
                          }
                        },
                        "penalties": []
                      },
                      "canonicalCompanyId": null,
                      "entityCompanyId": null,
                      "sourceProfileStatus": null,
                      "workspaceMatchStatus": null,
                      "workspaceCompanyId": null,
                      "enrikSnapshotVersion": null,
                      "profileFetchedAt": null,
                      "retrievalQuery": null,
                      "retrievalReasons": null
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/company-discovery-jobs/{jobId}/quality-summary": {
      "get": {
        "operationId": "companyDiscoveryJobs.getQualitySummary",
        "summary": "Get a discovery job’s quality summary",
        "description": "How good one discovery job’s candidates are: how many fall in each review band, the average scores and a one-word verdict. Computed when asked, never stored.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The discovery job’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "How good a discovery job’s candidates are, computed when asked.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CandidateQualitySummary"
                },
                "example": {
                  "discoveryJobId": "0199a1b2-0000-7000-8000-00000000d001",
                  "total": 12,
                  "tierCounts": {
                    "high_priority": 3,
                    "medium_priority": 5,
                    "low_priority": 2,
                    "reject_likely": 1,
                    "insufficient_data": 1
                  },
                  "scoredCount": 12,
                  "verifiedDomainCount": 9,
                  "duplicateCount": 1,
                  "promotedCount": 2,
                  "promotableCount": 6,
                  "averageReviewPriorityScore": 64.5,
                  "averageIcpFitScore": 58.25,
                  "averageEvidenceScore": 51,
                  "label": "good"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/company-discovery-jobs/{jobId}/start": {
      "post": {
        "operationId": "companyDiscoveryJobs.start",
        "summary": "Start a discovery job",
        "description": "After the plan check (and, for a controlled source, the job quota) moves a draft or queued job to queued, publishing it and recording its usage in that transaction, which commits only after the queued job passed this schema. Answers the job as read after the commit; poll it from there. Starting a queued job again republishes it under the same queue id and counts once; a job that already runs or ended answers 409. Starting spends provider budget, so an API key’s start also needs the operator’s spend switch (off: 403 `permission_denied`, `details.code` `api_spend_disabled`), fewer than the workspace’s active-job cap (409 `concurrent_run_limit`, `discovery_active_jobs`) and room in the daily allowance (409 `conflict`, `discovery_daily_limit`). The job then runs with the key’s own authority.",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:run"
            ]
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "The discovery job’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "A company discovery job: one search for candidate companies from one source.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyDiscoveryJob"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000d001",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "discoveryBriefId": null,
                  "sourceType": "pasted_list",
                  "sourceLabel": "Trade fair shortlist",
                  "sourceConfig": {
                    "rows": [
                      {
                        "name": "Alpine Robotics GmbH",
                        "website": "alpine-robotics.example"
                      }
                    ]
                  },
                  "status": "queued",
                  "stats": {},
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdByApiKeyId": null,
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:09.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/company-signals/{id}": {
      "get": {
        "operationId": "companySignals.get",
        "summary": "Get a company signal",
        "description": "Returns one signal under the same display rule as the app. A signal whose check evidence the app would hide is answered as a neutral 404. The response includes the displayed evidence and omits internal provenance fields.",
        "tags": [
          "companySignals"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The company signal’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Something that happened at a company.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanySignal"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000a301",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                  "category": "hiring",
                  "title": "Hiring five engineers",
                  "summary": "The careers page lists five open engineering roles.",
                  "signalDate": "2026-09-20",
                  "observedAt": "2026-09-21T07:00:00.000Z",
                  "sourceType": "manual",
                  "sourceUrl": "https://example.com/careers",
                  "sourceLabel": "Careers page",
                  "strength": "strong",
                  "confidence": "high",
                  "status": "active",
                  "freshnessScore": 96,
                  "relevanceScore": 82,
                  "evidence": [
                    "We are hiring five backend engineers."
                  ],
                  "extractedBy": "manual",
                  "extractionRunId": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "dismissedBy": null,
                  "dismissedAt": null,
                  "createdAt": "2026-09-21T07:00:00.000Z",
                  "updatedAt": "2026-09-21T07:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts": {
      "get": {
        "operationId": "contacts.list",
        "summary": "List contacts",
        "description": "Pages through the workspace’s live contacts, newest first unless `sort` says otherwise. Pass `pageInfo.endCursor` as `cursor` to fetch the next page, with the same `filters` and `sort`. A sort by a custom field is refused with 400 `invalid_sort`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "description": "The conditions a contact must meet, as JSON text: an array of `{ field, operator, value }` objects, every one of which must hold (AND). At most 50. The fields: `firstName`, `lastName`, `email`, `phone` and `jobTitle` (text); `id`, `ownerUserId` and `companyId` (ids); `createdAt` and `updatedAt` (ISO 8601 instants); and a custom field as `customFields.<key>`. `contains` and `startsWith` compare text only. `id` with `in` reads several records at once, at most 100 ids (with `limit` 100 they fit on one page): an id that is not found is left out.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "The sort order, as JSON text: an array of `{ field, direction }` objects, most significant first; `direction` is `asc` or `desc`. The fields: `firstName`, `lastName`, `email`, `phone`, `jobTitle`, `createdAt` and `updatedAt`. Custom fields cannot be sorted by. At most 10.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "columns",
            "in": "query",
            "required": false,
            "description": "The visible columns, as JSON text: an array of field paths. A display hint; it changes no result.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customFieldKeys",
            "in": "query",
            "required": false,
            "description": "Only these custom fields in each row’s `customFields`: their keys, comma-separated, 1 to 20. A key the row holds no value for is left out of it. Without it, every custom field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "What to add to each contact, comma-separated: `company` (the linked company), and the per-column cell states `enrichmentCells`, `formulaCells`, `customApiCells` and `agentCells`. Other values are ignored. Each cell map is read with its own permission: an API key needs `enrichment:read` for the first three and `automation:read` for `agentCells`, or the whole request is refused with 403 `insufficient_scope`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search, as plain text of 1 to 200 characters, split on whitespace: every term must appear, ignoring case, in the first name, the last name or the e-mail address; different terms may match different fields. ANDed with `filters`. No ranking: the list keeps its `sort`, and a cursor is valid only with the same `q` (another `q` answers `422` with `error.details.code` `invalid_cursor`). `%` and `_` match themselves.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of contacts.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000c101",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "firstName": "Ada",
                      "lastName": "Lovelace",
                      "email": "ada@example.com",
                      "phone": "+43 1 234 5678",
                      "jobTitle": "Head of Engineering",
                      "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                      "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                      "customFields": {
                        "tier": "gold"
                      },
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z",
                      "deletedAt": null
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "contacts.create",
        "summary": "Create a contact",
        "description": "Creates a contact. It needs at least one of `firstName`, `lastName` or `email`, not blank; a body without one is refused with 422 `validation_error`, its one details entry at the path `\"\"` (the body). Send an `Idempotency-Key`: a retry with the same key and body returns the contact the first request created instead of creating another, and the same key with another body is refused with 409 `idempotency_key_reused`. Returning that contact to a retry also needs `crm:read`, as reading it would; without it the retry is refused with 403 `permission_denied`. An e-mail another live contact has is refused with 409 `conflict`, `details.code` `duplicate_email`, and `details.contactId` names that contact. A `companyId` that is not a live company of the workspace, or an `ownerUserId` that is not an active member, is refused with 422 `validation_error`; its details entry names the field and has `code` `related_record_not_found`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreateRequestInput"
              },
              "example": {
                "firstName": "Ada",
                "lastName": "Lovelace",
                "email": "ada@example.com",
                "jobTitle": "Head of Engineering",
                "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                "customFields": {
                  "tier": "gold"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A person in your workspace.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000c101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "firstName": "Ada",
                  "lastName": "Lovelace",
                  "email": "ada@example.com",
                  "phone": "+43 1 234 5678",
                  "jobTitle": "Head of Engineering",
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                  "customFields": {
                    "tier": "gold"
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z",
                  "deletedAt": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/bulk-create": {
      "post": {
        "operationId": "contacts.bulkCreate",
        "summary": "Create up to 100 contacts",
        "description": "Creates up to 100 contacts, each from the body `contacts.create` takes. Send an `Idempotency-Key` for the whole request: a retry with the same key and body returns the first answer, item for item, instead of creating again, and the same key with another body is refused with 409 `idempotency_key_reused`. Returning that answer to a retry also needs `crm:read`; without it the retry is refused with 403 `permission_denied`. The body is checked as a whole first: a malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written. Then the items are created one after another, and one that fails, such as an e-mail address another live contact has (`conflict`, `details.code` `duplicate_email`), is left out while the others are created. The answer is 200 with one result per item, in order, and the counts: a written item has `outcome` `created` and the record; a failed one has `outcome` `failed` and an `error` in the error envelope’s shape, with the code and details `contacts.create` would have answered. A request counts against the `api-key-bulk` rate-limit policy as well as `api-key`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactBulkCreateRequestInput"
              },
              "example": {
                "items": [
                  {
                    "firstName": "Ada",
                    "lastName": "Lovelace",
                    "email": "ada@example.com"
                  },
                  {
                    "firstName": "Grace",
                    "email": "grace@example.com"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What a bulk write did, item by item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/BulkRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/BulkRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactBulkWriteResult"
                },
                "example": {
                  "results": [
                    {
                      "index": 0,
                      "outcome": "created",
                      "contact": {
                        "id": "0199a1b2-0000-7000-8000-00000000c101",
                        "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                        "firstName": "Ada",
                        "lastName": "Lovelace",
                        "email": "ada@example.com",
                        "phone": "+43 1 234 5678",
                        "jobTitle": "Head of Engineering",
                        "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                        "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                        "customFields": {
                          "tier": "gold"
                        },
                        "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "createdAt": "2026-09-29T08:00:00.000Z",
                        "updatedAt": "2026-09-29T08:00:00.000Z",
                        "deletedAt": null
                      }
                    },
                    {
                      "index": 1,
                      "outcome": "failed",
                      "error": {
                        "code": "conflict",
                        "message": "A contact with this email already exists in this workspace",
                        "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10",
                        "details": {
                          "code": "duplicate_email",
                          "contactId": "0199a1b2-0000-7000-8000-00000000c104"
                        }
                      }
                    }
                  ],
                  "created": 1,
                  "updated": 0,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/BulkRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-rate-class": "bulk",
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/bulk-update": {
      "post": {
        "operationId": "contacts.bulkUpdate",
        "summary": "Update up to 100 contacts",
        "description": "Changes up to 100 contacts, each item the body `contacts.update` takes plus the `id` of the record to change. Send an `Idempotency-Key` for the whole request: a retry with the same key and body returns the first answer, item for item, instead of changing again, and the same key with another body is refused with 409 `idempotency_key_reused`; returning that answer to a retry also needs `crm:read`. The body is checked as a whole first: a malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written. Then the items run one after another, so one that fails leaves the others written: an `id` that is not a live record of the workspace fails with `not_found`, and an `expectedUpdatedAt` the record has changed since fails with `stale_version`, nothing written for it. The answer is 200 with one result per item, in order, and the counts: a written item has `outcome` `updated` and the record; a failed one has `outcome` `failed` and an `error` in the error envelope’s shape, with the code and details `contacts.update` would have answered. A request counts against the `api-key-bulk` rate-limit policy as well as `api-key`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactBulkUpdateRequest"
              },
              "example": {
                "items": [
                  {
                    "id": "0199a1b2-0000-7000-8000-00000000c101",
                    "jobTitle": "CTO"
                  },
                  {
                    "id": "0199a1b2-0000-7000-8000-00000000c104",
                    "phone": null,
                    "expectedUpdatedAt": "2026-09-29T08:00:00.000Z"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What a bulk write did, item by item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/BulkRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/BulkRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactBulkWriteResult"
                },
                "example": {
                  "results": [
                    {
                      "index": 0,
                      "outcome": "updated",
                      "contact": {
                        "id": "0199a1b2-0000-7000-8000-00000000c101",
                        "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                        "firstName": "Ada",
                        "lastName": "Lovelace",
                        "email": "ada@example.com",
                        "phone": "+43 1 234 5678",
                        "jobTitle": "CTO",
                        "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                        "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                        "customFields": {
                          "tier": "gold"
                        },
                        "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "createdAt": "2026-09-29T08:00:00.000Z",
                        "updatedAt": "2026-09-30T09:30:00.000Z",
                        "deletedAt": null
                      }
                    },
                    {
                      "index": 1,
                      "outcome": "failed",
                      "error": {
                        "code": "stale_version",
                        "message": "This record changed since it was read; re-read it and retry",
                        "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10",
                        "details": {
                          "resourceType": "contact",
                          "resourceId": "0199a1b2-0000-7000-8000-00000000c104",
                          "currentUpdatedAt": "2026-09-30T09:30:00.000Z"
                        }
                      }
                    }
                  ],
                  "created": 0,
                  "updated": 1,
                  "failed": 1
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/BulkRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-rate-class": "bulk",
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/bulk-upsert": {
      "post": {
        "operationId": "contacts.bulkUpsert",
        "summary": "Create or update up to 100 contacts by e-mail",
        "description": "Creates or updates up to 100 contacts, each found by its `email` as `contacts.upsert` finds it, comparing the address ignoring case; a `companyId` or `ownerUserId` the workspace does not have fails the item with `validation_error` (`related_record_not_found`). The body is checked as a whole first: a malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written. Then the items run one after another, each in its own transaction, so one that fails leaves the others written. The answer is 200 with one result per item, in order, and the counts: a written item has `outcome` `created` or `updated` and the record; a failed one has `outcome` `failed` and an `error` in the error envelope’s shape, with the code and details the single upsert would have answered. Every item is keyed by its natural key, so sending the same body again is harmless: no `Idempotency-Key` is taken, and a failed request or failed items can simply be sent again. A request counts against the `api-key-bulk` rate-limit policy as well as `api-key`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactBulkUpsertRequest"
              },
              "example": {
                "items": [
                  {
                    "email": "ada@example.com",
                    "jobTitle": "Head of Engineering"
                  },
                  {
                    "email": "grace@example.com",
                    "firstName": "Grace",
                    "lastName": "Hopper"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What a bulk write did, item by item.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/BulkRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/BulkRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactBulkWriteResult"
                },
                "example": {
                  "results": [
                    {
                      "index": 0,
                      "outcome": "updated",
                      "contact": {
                        "id": "0199a1b2-0000-7000-8000-00000000c101",
                        "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                        "firstName": "Ada",
                        "lastName": "Lovelace",
                        "email": "ada@example.com",
                        "phone": "+43 1 234 5678",
                        "jobTitle": "Head of Engineering",
                        "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                        "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                        "customFields": {
                          "tier": "gold"
                        },
                        "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "createdAt": "2026-09-29T08:00:00.000Z",
                        "updatedAt": "2026-09-29T08:00:00.000Z",
                        "deletedAt": null
                      }
                    },
                    {
                      "index": 1,
                      "outcome": "created",
                      "contact": {
                        "id": "0199a1b2-0000-7000-8000-00000000c102",
                        "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                        "firstName": "Grace",
                        "lastName": "Hopper",
                        "email": "grace@example.com",
                        "phone": null,
                        "jobTitle": null,
                        "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                        "companyId": null,
                        "customFields": {},
                        "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                        "createdAt": "2026-09-29T08:00:00.000Z",
                        "updatedAt": "2026-09-29T08:00:00.000Z",
                        "deletedAt": null
                      }
                    }
                  ],
                  "created": 1,
                  "updated": 1,
                  "failed": 0
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/BulkRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-rate-class": "bulk",
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/trash": {
      "get": {
        "operationId": "contacts.listTrash",
        "summary": "List deleted contacts",
        "description": "Pages through the workspace’s deleted contacts, most recently deleted first. A deleted contact can be restored.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "deletedAfter",
            "in": "query",
            "required": false,
            "description": "Only contacts deleted after this instant (ISO 8601, with an offset or `Z`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of contacts.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000c101",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "firstName": "Ada",
                      "lastName": "Lovelace",
                      "email": "ada@example.com",
                      "phone": "+43 1 234 5678",
                      "jobTitle": "Head of Engineering",
                      "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                      "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                      "customFields": {
                        "tier": "gold"
                      },
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z",
                      "deletedAt": "2026-09-30T09:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/upsert": {
      "post": {
        "operationId": "contacts.upsert",
        "summary": "Create or update a contact by e-mail",
        "description": "Creates the contact with this `email`, or updates the live contact that has it, comparing the address ignoring case. An update writes only the fields you send and keeps the rest, as `contacts.update` does. The answer says which it was, as `outcome`. A contact in the trash is not matched: restore it to update it. The e-mail address is the idempotency key, so sending the same body again is harmless and no `Idempotency-Key` is taken. A `companyId` that is not a live company of the workspace, or an `ownerUserId` that is not an active member, is refused with 422 `validation_error`; its details entry names the field and has `code` `related_record_not_found`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpsertRequest"
              },
              "example": {
                "email": "ada@example.com",
                "firstName": "Ada",
                "lastName": "Lovelace",
                "jobTitle": "Head of Engineering"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What an upsert did, and the contact.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactUpsertResult"
                },
                "example": {
                  "outcome": "updated",
                  "contact": {
                    "id": "0199a1b2-0000-7000-8000-00000000c101",
                    "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                    "firstName": "Ada",
                    "lastName": "Lovelace",
                    "email": "ada@example.com",
                    "phone": "+43 1 234 5678",
                    "jobTitle": "Head of Engineering",
                    "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                    "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                    "customFields": {
                      "tier": "gold"
                    },
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-29T08:00:00.000Z",
                    "updatedAt": "2026-09-29T08:00:00.000Z",
                    "deletedAt": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/{contactId}": {
      "get": {
        "operationId": "contacts.get",
        "summary": "Get a contact",
        "description": "One live contact, by id. A deleted contact is not found.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "description": "The contact’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "What to add to each contact, comma-separated: `company` (the linked company), and the per-column cell states `enrichmentCells`, `formulaCells`, `customApiCells` and `agentCells`. Other values are ignored. Each cell map is read with its own permission: an API key needs `enrichment:read` for the first three and `automation:read` for `agentCells`, or the whole request is refused with 403 `insufficient_scope`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A person in your workspace.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000c101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "firstName": "Ada",
                  "lastName": "Lovelace",
                  "email": "ada@example.com",
                  "phone": "+43 1 234 5678",
                  "jobTitle": "Head of Engineering",
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                  "customFields": {
                    "tier": "gold"
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z",
                  "deletedAt": null,
                  "company": {
                    "id": "0199a1b2-0000-7000-8000-00000000d101",
                    "name": "Analytical Engines",
                    "domain": "example.com"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "contacts.update",
        "summary": "Update a contact",
        "description": "Changes the fields you send and keeps the rest; `null` clears a field. Send an `Idempotency-Key`: a retry with the same key and body answers the contact the first request saved instead of updating again, and the same key with another body is refused with 409 `idempotency_key_reused`; returning it to a retry also needs `crm:read`. To keep from overwriting someone else’s change, send the `updatedAt` you read as `expectedUpdatedAt`: if the contact changed since, nothing is written and the answer is 409 `stale_version`; read it again and reapply your change. A `companyId` that is not a live company of the workspace, or an `ownerUserId` that is not an active member, is refused with 422 `validation_error`; its details entry names the field and has `code` `related_record_not_found`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "description": "The contact’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdateRequest"
              },
              "example": {
                "jobTitle": "CTO",
                "expectedUpdatedAt": "2026-09-29T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A person in your workspace.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000c101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "firstName": "Ada",
                  "lastName": "Lovelace",
                  "email": "ada@example.com",
                  "phone": "+43 1 234 5678",
                  "jobTitle": "CTO",
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                  "customFields": {
                    "tier": "gold"
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-30T09:30:00.000Z",
                  "deletedAt": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      },
      "delete": {
        "operationId": "contacts.delete",
        "summary": "Delete a contact",
        "description": "Moves a contact to the trash, from where it can be restored. Send an `Idempotency-Key`: a retry with the same key answers the first delete from its receipt. Deleting one that is already deleted also answers `ok`; an id that never existed is not found.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:delete"
            ]
          }
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "description": "The contact’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Done: the operation succeeded and has nothing to return.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/{contactId}/restore": {
      "post": {
        "operationId": "contacts.restore",
        "summary": "Restore a deleted contact",
        "description": "Brings a deleted contact back. Restoring a contact that is live answers it unchanged. Send an `Idempotency-Key`: a retry with the same key answers the first restore from its receipt, which also needs `crm:read`.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "description": "The contact’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "A person in your workspace.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000c101",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "firstName": "Ada",
                  "lastName": "Lovelace",
                  "email": "ada@example.com",
                  "phone": "+43 1 234 5678",
                  "jobTitle": "Head of Engineering",
                  "ownerUserId": "0199a1b2-0000-7000-8000-00000000c001",
                  "companyId": "0199a1b2-0000-7000-8000-00000000d101",
                  "customFields": {
                    "tier": "gold"
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z",
                  "deletedAt": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/contacts/{contactId}/timeline": {
      "get": {
        "operationId": "contacts.listTimeline",
        "summary": "List a contact’s timeline",
        "description": "Pages through what happened to a live contact, newest first.",
        "tags": [
          "contacts"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "description": "The contact’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of a record’s timeline, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineEventList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000e101",
                      "eventName": "contact.created",
                      "actor": {
                        "type": "user",
                        "userId": "0199a1b2-0000-7000-8000-00000000c001",
                        "apiKeyId": null
                      },
                      "payload": {
                        "id": "0199a1b2-0000-7000-8000-00000000c101"
                      },
                      "createdAt": "2026-09-29T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/custom-field-definitions": {
      "get": {
        "operationId": "customFieldDefinitions.list",
        "summary": "List custom fields",
        "description": "Pages through the custom fields the workspace defined on one object type: the active ones by position, then (with `includeInactive=true`) the deactivated ones. A contact’s or company’s `customFields` holds each value under the field’s `key`. Pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "customFieldDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "objectType",
            "in": "query",
            "required": true,
            "description": "Whose custom fields to list: `contact` or `company`. Required.",
            "schema": {
              "type": "string",
              "enum": [
                "contact",
                "company"
              ]
            }
          },
          {
            "name": "includeInactive",
            "in": "query",
            "required": false,
            "description": "`true` to list deactivated custom fields too, after the active ones. Any other value, or none, lists the active ones only.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of custom fields: the active ones by position, then the deactivated ones.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldDefinitionList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000f101",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "objectType": "contact",
                      "key": "tier",
                      "label": "Tier",
                      "fieldType": "select",
                      "options": [
                        {
                          "value": "gold",
                          "label": "Gold"
                        },
                        {
                          "value": "silver",
                          "label": "Silver"
                        }
                      ],
                      "isRequired": false,
                      "validation": null,
                      "position": 0,
                      "isActive": true,
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/discovery-briefs": {
      "get": {
        "operationId": "discoveryBriefs.list",
        "summary": "List discovery briefs",
        "description": "Pages through the workspace’s discovery briefs, newest first. Filter by `icpProfileId` or `status`; pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "icpProfileId",
            "in": "query",
            "required": false,
            "description": "Only the briefs drawn from this ICP profile.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only briefs in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "active",
                "archived"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of discovery briefs, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBriefList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000f101",
                      "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                      "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "title": "Exporting machine builders",
                      "brief": {
                        "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                        "mustHaveCriteria": [
                          "Builds machines",
                          "Based in DACH"
                        ],
                        "niceToHaveCriteria": [
                          "Exhibits at trade fairs"
                        ],
                        "disqualifiers": [
                          "Insolvency proceedings"
                        ],
                        "recommendedSourceCategories": [
                          "trade_fair_exhibitor",
                          "industry_directory"
                        ],
                        "fieldsToCollect": [
                          {
                            "name": "Export markets",
                            "required": false
                          }
                        ],
                        "scoringRubric": {
                          "criteria": [
                            {
                              "label": "Export share",
                              "weight": 40
                            }
                          ]
                        },
                        "suggestedSearchQueries": [
                          "Maschinenbau Export Mittelstand"
                        ],
                        "candidateReviewChecklist": [
                          "Check the imprint for the legal form"
                        ],
                        "limitations": [
                          "Employee counts are estimates"
                        ],
                        "confidence": "medium"
                      },
                      "status": "active",
                      "revision": 2,
                      "currentVersionId": "0199a1b2-0000-7000-8000-00000000f111",
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-21T08:00:00.000Z",
                      "updatedAt": "2026-09-22T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "discoveryBriefs.create",
        "summary": "Create a discovery brief",
        "description": "Saves a brief pinned to one ICP profile version of this workspace; a version of another profile or workspace answers 404. The brief and its audit row commit only after this answer is checked. A retry with the same Idempotency-Key and body replays the same answer for 24 hours instead of creating a second brief.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscoveryBriefCreateRequest"
              },
              "example": {
                "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                "title": "Exporting machine builders",
                "brief": {
                  "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                  "mustHaveCriteria": [
                    "Builds machines",
                    "Based in DACH"
                  ],
                  "niceToHaveCriteria": [
                    "Exhibits at trade fairs"
                  ],
                  "disqualifiers": [
                    "Insolvency proceedings"
                  ],
                  "recommendedSourceCategories": [
                    "trade_fair_exhibitor",
                    "industry_directory"
                  ],
                  "fieldsToCollect": [
                    {
                      "name": "Export markets",
                      "required": false
                    }
                  ],
                  "scoringRubric": {
                    "criteria": [
                      {
                        "label": "Export share",
                        "weight": 40
                      }
                    ]
                  },
                  "suggestedSearchQueries": [
                    "Maschinenbau Export Mittelstand"
                  ],
                  "candidateReviewChecklist": [
                    "Check the imprint for the legal form"
                  ],
                  "limitations": [
                    "Employee counts are estimates"
                  ],
                  "confidence": "medium"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A discovery brief: how to find and judge companies for one ICP profile version.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBrief"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f101",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "title": "Exporting machine builders",
                  "brief": {
                    "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                    "mustHaveCriteria": [
                      "Builds machines",
                      "Based in DACH"
                    ],
                    "niceToHaveCriteria": [
                      "Exhibits at trade fairs"
                    ],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "recommendedSourceCategories": [
                      "trade_fair_exhibitor",
                      "industry_directory"
                    ],
                    "fieldsToCollect": [
                      {
                        "name": "Export markets",
                        "required": false
                      }
                    ],
                    "scoringRubric": {
                      "criteria": [
                        {
                          "label": "Export share",
                          "weight": 40
                        }
                      ]
                    },
                    "suggestedSearchQueries": [
                      "Maschinenbau Export Mittelstand"
                    ],
                    "candidateReviewChecklist": [
                      "Check the imprint for the legal form"
                    ],
                    "limitations": [
                      "Employee counts are estimates"
                    ],
                    "confidence": "medium"
                  },
                  "status": "active",
                  "revision": 2,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f111",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-21T08:00:00.000Z",
                  "updatedAt": "2026-09-22T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/discovery-briefs/{discoveryBriefId}": {
      "get": {
        "operationId": "discoveryBriefs.get",
        "summary": "Get a discovery brief",
        "description": "One discovery brief, by id, with what it asks for.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "discoveryBriefId",
            "in": "path",
            "required": true,
            "description": "The discovery brief’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A discovery brief: how to find and judge companies for one ICP profile version.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBrief"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f101",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "title": "Exporting machine builders",
                  "brief": {
                    "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                    "mustHaveCriteria": [
                      "Builds machines",
                      "Based in DACH"
                    ],
                    "niceToHaveCriteria": [
                      "Exhibits at trade fairs"
                    ],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "recommendedSourceCategories": [
                      "trade_fair_exhibitor",
                      "industry_directory"
                    ],
                    "fieldsToCollect": [
                      {
                        "name": "Export markets",
                        "required": false
                      }
                    ],
                    "scoringRubric": {
                      "criteria": [
                        {
                          "label": "Export share",
                          "weight": 40
                        }
                      ]
                    },
                    "suggestedSearchQueries": [
                      "Maschinenbau Export Mittelstand"
                    ],
                    "candidateReviewChecklist": [
                      "Check the imprint for the legal form"
                    ],
                    "limitations": [
                      "Employee counts are estimates"
                    ],
                    "confidence": "medium"
                  },
                  "status": "active",
                  "revision": 2,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f111",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-21T08:00:00.000Z",
                  "updatedAt": "2026-09-22T08:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "discoveryBriefs.update",
        "summary": "Update a discovery brief",
        "description": "Changes the title, the brief or the status. A title or brief change appends a compatibility version; once the brief has an authored version it needs the revision you were shown, and a stale one is 409 `stale_version`. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "discoveryBriefId",
            "in": "path",
            "required": true,
            "description": "The discovery brief’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscoveryBriefUpdateRequest"
              },
              "example": {
                "status": "active",
                "expectedRevision": 2
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A discovery brief: how to find and judge companies for one ICP profile version.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBrief"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f101",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "title": "Exporting machine builders",
                  "brief": {
                    "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                    "mustHaveCriteria": [
                      "Builds machines",
                      "Based in DACH"
                    ],
                    "niceToHaveCriteria": [
                      "Exhibits at trade fairs"
                    ],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "recommendedSourceCategories": [
                      "trade_fair_exhibitor",
                      "industry_directory"
                    ],
                    "fieldsToCollect": [
                      {
                        "name": "Export markets",
                        "required": false
                      }
                    ],
                    "scoringRubric": {
                      "criteria": [
                        {
                          "label": "Export share",
                          "weight": 40
                        }
                      ]
                    },
                    "suggestedSearchQueries": [
                      "Maschinenbau Export Mittelstand"
                    ],
                    "candidateReviewChecklist": [
                      "Check the imprint for the legal form"
                    ],
                    "limitations": [
                      "Employee counts are estimates"
                    ],
                    "confidence": "medium"
                  },
                  "status": "active",
                  "revision": 3,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f111",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-21T08:00:00.000Z",
                  "updatedAt": "2026-09-22T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/discovery-briefs/{discoveryBriefId}/archive": {
      "post": {
        "operationId": "discoveryBriefs.archive",
        "summary": "Archive a discovery brief",
        "description": "Moves the brief to `archived`. Name the revision you were shown: a stale one is 409 `stale_version` and archives nothing. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it. An archived, absent or foreign brief answers the neutral 404.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "discoveryBriefId",
            "in": "path",
            "required": true,
            "description": "The discovery brief’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscoveryBriefArchiveRequest"
              },
              "example": {
                "expectedRevision": 2
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A discovery brief: how to find and judge companies for one ICP profile version.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBrief"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f101",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "title": "Exporting machine builders",
                  "brief": {
                    "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                    "mustHaveCriteria": [
                      "Builds machines",
                      "Based in DACH"
                    ],
                    "niceToHaveCriteria": [
                      "Exhibits at trade fairs"
                    ],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "recommendedSourceCategories": [
                      "trade_fair_exhibitor",
                      "industry_directory"
                    ],
                    "fieldsToCollect": [
                      {
                        "name": "Export markets",
                        "required": false
                      }
                    ],
                    "scoringRubric": {
                      "criteria": [
                        {
                          "label": "Export share",
                          "weight": 40
                        }
                      ]
                    },
                    "suggestedSearchQueries": [
                      "Maschinenbau Export Mittelstand"
                    ],
                    "candidateReviewChecklist": [
                      "Check the imprint for the legal form"
                    ],
                    "limitations": [
                      "Employee counts are estimates"
                    ],
                    "confidence": "medium"
                  },
                  "status": "archived",
                  "revision": 3,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f111",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-21T08:00:00.000Z",
                  "updatedAt": "2026-09-22T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/discovery-briefs/{discoveryBriefId}/versions": {
      "get": {
        "operationId": "discoveryBriefs.listVersions",
        "summary": "List a discovery brief’s versions",
        "description": "Pages through the versions of one discovery brief, newest first. Filter by `snapshotKind`; pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "discoveryBriefId",
            "in": "path",
            "required": true,
            "description": "The discovery brief’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "snapshotKind",
            "in": "query",
            "required": false,
            "description": "Only versions of this kind.",
            "schema": {
              "type": "string",
              "enum": [
                "authored",
                "migration_snapshot",
                "legacy_compat"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of a discovery brief’s versions, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBriefVersionList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000f111",
                      "discoveryBriefId": "0199a1b2-0000-7000-8000-00000000f101",
                      "versionNumber": 2,
                      "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                      "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "title": "Exporting machine builders",
                      "brief": {
                        "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                        "mustHaveCriteria": [
                          "Builds machines",
                          "Based in DACH"
                        ],
                        "niceToHaveCriteria": [
                          "Exhibits at trade fairs"
                        ],
                        "disqualifiers": [
                          "Insolvency proceedings"
                        ],
                        "recommendedSourceCategories": [
                          "trade_fair_exhibitor",
                          "industry_directory"
                        ],
                        "fieldsToCollect": [
                          {
                            "name": "Export markets",
                            "required": false
                          }
                        ],
                        "scoringRubric": {
                          "criteria": [
                            {
                              "label": "Export share",
                              "weight": 40
                            }
                          ]
                        },
                        "suggestedSearchQueries": [
                          "Maschinenbau Export Mittelstand"
                        ],
                        "candidateReviewChecklist": [
                          "Check the imprint for the legal form"
                        ],
                        "limitations": [
                          "Employee counts are estimates"
                        ],
                        "confidence": "medium"
                      },
                      "commercialFocus": {
                        "source": "manual",
                        "offering": "Collaborative robot cells",
                        "useCase": "Automating manual assembly",
                        "objective": "Assemble more with the same team",
                        "materialConstraints": [],
                        "unresolvedAssumptions": [
                          "Assembly is still mostly manual"
                        ],
                        "statedBy": "Sales lead"
                      },
                      "ruleGroups": [],
                      "signalPins": [
                        {
                          "pinId": "pin-trade-fair",
                          "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                          "signalDefinitionVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                          "role": "boost",
                          "groupId": null,
                          "rationale": "Exhibitors are actively selling abroad.",
                          "position": 0
                        }
                      ],
                      "schemaVersion": 1,
                      "contentFingerprint": "sha256:9f2c4b1d",
                      "snapshotKind": "authored",
                      "capturedAt": "2026-09-22T08:00:00.000Z",
                      "legacyCreatedAt": null,
                      "legacyUpdatedAt": null,
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "originKind": "manual",
                      "createdAt": "2026-09-22T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "discoveryBriefs.appendVersion",
        "summary": "Add a discovery brief version",
        "description": "Appends an immutable authored version. `expectedRevision` is required (a never-versioned brief is 0); a stale one is 409 `stale_version`. Answers the version and the brief’s new revision, which commit only after this answer is checked; a retry with the same Idempotency-Key replays it instead of appending a second version.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "discoveryBriefId",
            "in": "path",
            "required": true,
            "description": "The discovery brief’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscoveryBriefVersionAppendRequest"
              },
              "example": {
                "body": {
                  "title": "Exporting machine builders",
                  "brief": {
                    "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                    "mustHaveCriteria": [
                      "Builds machines",
                      "Based in DACH"
                    ],
                    "niceToHaveCriteria": [
                      "Exhibits at trade fairs"
                    ],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "recommendedSourceCategories": [
                      "trade_fair_exhibitor",
                      "industry_directory"
                    ],
                    "fieldsToCollect": [
                      {
                        "name": "Export markets",
                        "required": false
                      }
                    ],
                    "scoringRubric": {
                      "criteria": [
                        {
                          "label": "Export share",
                          "weight": 40
                        }
                      ]
                    },
                    "suggestedSearchQueries": [
                      "Maschinenbau Export Mittelstand"
                    ],
                    "candidateReviewChecklist": [
                      "Check the imprint for the legal form"
                    ],
                    "limitations": [
                      "Employee counts are estimates"
                    ],
                    "confidence": "medium"
                  },
                  "commercialFocus": {
                    "source": "manual",
                    "offering": "Collaborative robot cells",
                    "useCase": "Automating manual assembly",
                    "objective": "Assemble more with the same team",
                    "materialConstraints": [],
                    "unresolvedAssumptions": [
                      "Assembly is still mostly manual"
                    ],
                    "statedBy": "Sales lead"
                  },
                  "signalPins": [
                    {
                      "pinId": "pin-trade-fair",
                      "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                      "signalDefinitionVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                      "role": "boost",
                      "rationale": "Exhibitors are actively selling abroad."
                    }
                  ],
                  "ruleGroups": []
                },
                "expectedRevision": 2
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A newly appended discovery brief version and the brief’s new revision.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBriefVersionAppended"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f111",
                  "discoveryBriefId": "0199a1b2-0000-7000-8000-00000000f101",
                  "versionNumber": 2,
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "title": "Exporting machine builders",
                  "brief": {
                    "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                    "mustHaveCriteria": [
                      "Builds machines",
                      "Based in DACH"
                    ],
                    "niceToHaveCriteria": [
                      "Exhibits at trade fairs"
                    ],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "recommendedSourceCategories": [
                      "trade_fair_exhibitor",
                      "industry_directory"
                    ],
                    "fieldsToCollect": [
                      {
                        "name": "Export markets",
                        "required": false
                      }
                    ],
                    "scoringRubric": {
                      "criteria": [
                        {
                          "label": "Export share",
                          "weight": 40
                        }
                      ]
                    },
                    "suggestedSearchQueries": [
                      "Maschinenbau Export Mittelstand"
                    ],
                    "candidateReviewChecklist": [
                      "Check the imprint for the legal form"
                    ],
                    "limitations": [
                      "Employee counts are estimates"
                    ],
                    "confidence": "medium"
                  },
                  "commercialFocus": {
                    "source": "manual",
                    "offering": "Collaborative robot cells",
                    "useCase": "Automating manual assembly",
                    "objective": "Assemble more with the same team",
                    "materialConstraints": [],
                    "unresolvedAssumptions": [
                      "Assembly is still mostly manual"
                    ],
                    "statedBy": "Sales lead"
                  },
                  "ruleGroups": [],
                  "signalPins": [
                    {
                      "pinId": "pin-trade-fair",
                      "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                      "signalDefinitionVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                      "role": "boost",
                      "groupId": null,
                      "rationale": "Exhibitors are actively selling abroad.",
                      "position": 0
                    }
                  ],
                  "schemaVersion": 1,
                  "contentFingerprint": "sha256:9f2c4b1d",
                  "snapshotKind": "authored",
                  "capturedAt": "2026-09-22T08:00:00.000Z",
                  "legacyCreatedAt": null,
                  "legacyUpdatedAt": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "originKind": "manual",
                  "createdAt": "2026-09-22T08:00:00.000Z",
                  "revision": 3
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/discovery-briefs/{discoveryBriefId}/versions/{versionId}": {
      "get": {
        "operationId": "discoveryBriefs.getVersion",
        "summary": "Get a discovery brief version",
        "description": "One exact version of one discovery brief. A version of another brief is not found.",
        "tags": [
          "discoveryBriefs"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "discoveryBriefId",
            "in": "path",
            "required": true,
            "description": "The discovery brief’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "description": "The version’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "One immutable version of a discovery brief.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoveryBriefVersion"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f111",
                  "discoveryBriefId": "0199a1b2-0000-7000-8000-00000000f101",
                  "versionNumber": 2,
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "icpProfileVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "title": "Exporting machine builders",
                  "brief": {
                    "targetAccountSummary": "Exporting machine builders in DACH with 50 to 500 employees.",
                    "mustHaveCriteria": [
                      "Builds machines",
                      "Based in DACH"
                    ],
                    "niceToHaveCriteria": [
                      "Exhibits at trade fairs"
                    ],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "recommendedSourceCategories": [
                      "trade_fair_exhibitor",
                      "industry_directory"
                    ],
                    "fieldsToCollect": [
                      {
                        "name": "Export markets",
                        "required": false
                      }
                    ],
                    "scoringRubric": {
                      "criteria": [
                        {
                          "label": "Export share",
                          "weight": 40
                        }
                      ]
                    },
                    "suggestedSearchQueries": [
                      "Maschinenbau Export Mittelstand"
                    ],
                    "candidateReviewChecklist": [
                      "Check the imprint for the legal form"
                    ],
                    "limitations": [
                      "Employee counts are estimates"
                    ],
                    "confidence": "medium"
                  },
                  "commercialFocus": {
                    "source": "manual",
                    "offering": "Collaborative robot cells",
                    "useCase": "Automating manual assembly",
                    "objective": "Assemble more with the same team",
                    "materialConstraints": [],
                    "unresolvedAssumptions": [
                      "Assembly is still mostly manual"
                    ],
                    "statedBy": "Sales lead"
                  },
                  "ruleGroups": [],
                  "signalPins": [
                    {
                      "pinId": "pin-trade-fair",
                      "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                      "signalDefinitionVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                      "role": "boost",
                      "groupId": null,
                      "rationale": "Exhibitors are actively selling abroad.",
                      "position": 0
                    }
                  ],
                  "schemaVersion": 1,
                  "contentFingerprint": "sha256:9f2c4b1d",
                  "snapshotKind": "authored",
                  "capturedAt": "2026-09-22T08:00:00.000Z",
                  "legacyCreatedAt": null,
                  "legacyUpdatedAt": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "originKind": "manual",
                  "createdAt": "2026-09-22T08:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/export-fields": {
      "get": {
        "operationId": "exportFields.getCatalogue",
        "summary": "Get the export field catalogue",
        "description": "Every field an export of a record type can carry, the workspace’s custom fields and the recommendation fields included, in one answer. Name them in an export’s `source.fieldKeys`.",
        "tags": [
          "exportFields"
        ],
        "security": [
          {
            "apiKey": [
              "exports:read",
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "objectType",
            "in": "query",
            "required": true,
            "description": "The record type whose exportable fields to list.",
            "schema": {
              "type": "string",
              "enum": [
                "company",
                "contact",
                "company_candidate"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Export fields, including workspace custom and recommendation fields.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportFieldsResponse"
                },
                "example": {
                  "objectType": "company",
                  "fields": [
                    {
                      "key": "recommendation.score",
                      "label": "Recommendation score",
                      "valueType": "number",
                      "category": "recommendation"
                    }
                  ]
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/export-jobs": {
      "get": {
        "operationId": "exportJobs.list",
        "summary": "List export jobs",
        "description": "Reads the workspace’s export jobs, newest first, whoever created them: in the app or with an API key. Optional filters and an opaque cursor; a page holds at most 100 jobs.",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only jobs in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "queued",
                "running",
                "completed",
                "completed_with_errors",
                "failed",
                "canceled",
                "archived"
              ]
            }
          },
          {
            "name": "exportType",
            "in": "query",
            "required": false,
            "description": "Only jobs of this kind.",
            "schema": {
              "type": "string",
              "enum": [
                "csv_file",
                "webhook_delivery"
              ]
            }
          },
          {
            "name": "objectType",
            "in": "query",
            "required": false,
            "description": "Only jobs that export this record type.",
            "schema": {
              "type": "string",
              "enum": [
                "company",
                "contact",
                "company_candidate"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A cursor page of export jobs.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-000000000001",
                      "exportType": "csv_file",
                      "objectType": "contact",
                      "sourceType": "selected_rows",
                      "sourceId": null,
                      "status": "draft",
                      "config": {},
                      "stats": {},
                      "fileName": null,
                      "fileSizeBytes": null,
                      "downloadExpiresAt": null,
                      "webhookDestinationId": null,
                      "createdBy": null,
                      "startedAt": null,
                      "completedAt": null,
                      "createdAt": "2026-10-05T08:00:00.000Z",
                      "updatedAt": "2026-10-05T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "exportJobs.create",
        "summary": "Create a draft export",
        "description": "Creates a `draft` export job; nothing is read or written until `exportJobs.start`. Needs the read permission of the record type (`crm:read`; candidates also `discovery:read`) and the plan’s exports feature. The same `Idempotency-Key` and body answers the first job again (a replay also needs `export_jobs:read`). An API key creates `csv_file` exports only.",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:run",
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportJobCreateRequest"
              },
              "example": {
                "exportType": "csv_file",
                "objectType": "company",
                "source": {
                  "sourceType": "selected_rows",
                  "recordIds": [
                    "0199bbbb-0000-7000-8000-000000000001"
                  ],
                  "fieldKeys": [
                    "fixed.name"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "An export job with its live status, opaque configuration and file metadata.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobResponse"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000001",
                  "exportType": "csv_file",
                  "objectType": "contact",
                  "sourceType": "selected_rows",
                  "sourceId": null,
                  "status": "draft",
                  "config": {},
                  "stats": {},
                  "fileName": null,
                  "fileSizeBytes": null,
                  "downloadExpiresAt": null,
                  "webhookDestinationId": null,
                  "createdBy": null,
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-10-05T08:00:00.000Z",
                  "updatedAt": "2026-10-05T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/export-jobs/preview": {
      "post": {
        "operationId": "exportJobs.preview",
        "summary": "Preview an export",
        "description": "Resolves up to 10 records of a source and escapes them as the CSV file would. Creates no job, file or delivery, and counts against no quota.",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:run",
              "crm:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportPreviewRequest"
              },
              "example": {
                "objectType": "company",
                "source": {
                  "sourceType": "selected_rows",
                  "recordIds": [
                    "0199bbbb-0000-7000-8000-000000000001"
                  ],
                  "fieldKeys": [
                    "fixed.name"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bounded escaped export sample; no write or delivery.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewExportResponse"
                },
                "example": {
                  "columns": [
                    "fixed.name"
                  ],
                  "sampleRows": [
                    [
                      "Example"
                    ]
                  ],
                  "recordCount": 1,
                  "warnings": []
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-read-only": true,
        "x-stability-level": "beta"
      }
    },
    "/v1/export-jobs/{id}": {
      "get": {
        "operationId": "exportJobs.get",
        "summary": "Get an export job",
        "description": "Reads one export job of the workspace. Poll it after `exportJobs.start` until `status` is final, then download the file with `exportJobs.download`. A job of another workspace answers the same `404` as a missing one.",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The export job id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "An export job with its live status, opaque configuration and file metadata.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobResponse"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000001",
                  "exportType": "csv_file",
                  "objectType": "contact",
                  "sourceType": "selected_rows",
                  "sourceId": null,
                  "status": "draft",
                  "config": {},
                  "stats": {},
                  "fileName": null,
                  "fileSizeBytes": null,
                  "downloadExpiresAt": null,
                  "webhookDestinationId": null,
                  "createdBy": null,
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-10-05T08:00:00.000Z",
                  "updatedAt": "2026-10-05T08:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/export-jobs/{id}/archive": {
      "post": {
        "operationId": "exportJobs.archive",
        "summary": "Archive an export",
        "description": "Archives a job, which stays readable with `status` `archived`. Send an `Idempotency-Key`: a retry with the same key is answered from the receipt (a replay also needs `export_jobs:read`); archiving it again with a new key is `404`.",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:run",
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The export job id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "An export job with its live status, opaque configuration and file metadata.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobResponse"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000001",
                  "exportType": "csv_file",
                  "objectType": "contact",
                  "sourceType": "selected_rows",
                  "sourceId": null,
                  "status": "archived",
                  "config": {},
                  "stats": {},
                  "fileName": null,
                  "fileSizeBytes": null,
                  "downloadExpiresAt": null,
                  "webhookDestinationId": null,
                  "createdBy": null,
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-10-05T08:00:00.000Z",
                  "updatedAt": "2026-10-05T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/export-jobs/{id}/cancel": {
      "post": {
        "operationId": "exportJobs.cancel",
        "summary": "Cancel an export",
        "description": "Cancels a `draft`, `queued` or `running` job. A job that already finished is answered unchanged. Send an `Idempotency-Key`: a retry with the same key is answered from the receipt (a replay also needs `export_jobs:read`).",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:run",
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The export job id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "An export job with its live status, opaque configuration and file metadata.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobResponse"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000001",
                  "exportType": "csv_file",
                  "objectType": "contact",
                  "sourceType": "selected_rows",
                  "sourceId": null,
                  "status": "canceled",
                  "config": {},
                  "stats": {},
                  "fileName": null,
                  "fileSizeBytes": null,
                  "downloadExpiresAt": null,
                  "webhookDestinationId": null,
                  "createdBy": null,
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-10-05T08:00:00.000Z",
                  "updatedAt": "2026-10-05T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/export-jobs/{id}/download": {
      "get": {
        "operationId": "exportJobs.download",
        "summary": "Download an export’s CSV file",
        "description": "Streams the CSV file of a finished `csv_file` export, as an attachment named by `fileName`, until `downloadExpiresAt`. Each download is recorded in the workspace’s audit log. A job without a file yet (still running, failed, or a webhook delivery) is `409 conflict`; past `downloadExpiresAt`, or once a source it rests on can no longer be exported, it is `410 gone` (`details.code` `export_rights_withdrawn` or `export_rights_unverifiable` for the second). Needs the read permission of the record type, as create does.",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:run",
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The export job id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The CSV file, UTF-8, lines ending in LF: a header row of the field labels in `fieldKeys` order (unless `includeHeaders` was `false`), then one row per exported record. A cell a spreadsheet would read as a formula starts with an apostrophe.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "description": "The CSV file, UTF-8, lines ending in LF: a header row of the field labels in `fieldKeys` order (unless `includeHeaders` was `false`), then one row per exported record. A cell a spreadsheet would read as a formula starts with an apostrophe."
                },
                "example": "Name,Domain\nExample,example.com"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/export-jobs/{id}/start": {
      "post": {
        "operationId": "exportJobs.start",
        "summary": "Start an export",
        "description": "Queues a `draft` job and counts it against the plan’s `exports_created` quota, once. It runs in the background: poll `exportJobs.get` until `status` is final, then download the file with `exportJobs.download`. Send an `Idempotency-Key`: a retry with the same key is answered from the receipt with the job as the start queued it (a replay also needs `export_jobs:read`), never started twice. With a new key, a job that is no longer `draft` or `queued` is `409 conflict`. An API key cannot start a `webhook_delivery` export (`403 permission_denied`, `export_delivery_human_only`).",
        "tags": [
          "exportJobs"
        ],
        "security": [
          {
            "apiKey": [
              "exports:run",
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The export job id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "An export job with its live status, opaque configuration and file metadata.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobResponse"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000001",
                  "exportType": "csv_file",
                  "objectType": "contact",
                  "sourceType": "selected_rows",
                  "sourceId": null,
                  "status": "queued",
                  "config": {},
                  "stats": {},
                  "fileName": null,
                  "fileSizeBytes": null,
                  "downloadExpiresAt": null,
                  "webhookDestinationId": null,
                  "createdBy": null,
                  "startedAt": null,
                  "completedAt": null,
                  "createdAt": "2026-10-05T08:00:00.000Z",
                  "updatedAt": "2026-10-05T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/feedback": {
      "post": {
        "operationId": "feedback.submit",
        "summary": "Send anonymous feedback",
        "description": "Stores one anonymous note about the public API. Any valid API key may send it, whatever its scopes; no workspace, user, key, request id, address or user agent is stored with it, and its time is kept to the hour. Do not include personal data. Send a fresh UUIDv4 as `Idempotency-Key` for every note and the same one to retry it: a retry with the same body answers 202 again and stores nothing new, another body answers 409 `idempotency_key_reused`. Requests count against the key’s ordinary rate limit.",
        "tags": [
          "feedback"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A fresh random UUIDv4 for every note. Retrying the same note with the same key and body stores it once; another body with a key already used is refused.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitFeedbackRequest"
              },
              "example": {
                "category": "confusing",
                "message": "The list endpoints could show how to combine filters with a sort.",
                "rating": 3,
                "operationId": "companies.list",
                "client": {
                  "kind": "api",
                  "name": "Example integration",
                  "version": "1.4.0"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The note is stored. Nothing about it, or about its sender, is returned.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackAccepted"
                },
                "example": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-api-key-access": "any-authenticated",
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "health.get",
        "summary": "Check that the API is up",
        "description": "Answers `{ \"status\": \"ok\" }` while the API is up. It needs no API key and reads no dependency, so it says the service answers, not that every feature works. It is the `status` link of the API catalog at `/.well-known/api-catalog`.",
        "tags": [
          "health"
        ],
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The liveness answer: the process is up.",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                },
                "example": {
                  "status": "ok"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-api-key-access": "none",
        "x-stability-level": "beta"
      }
    },
    "/v1/icp-profiles": {
      "get": {
        "operationId": "icpProfiles.list",
        "summary": "List ICP profiles",
        "description": "Pages through the workspace’s ideal customer profiles, newest first. Filter by `status`; pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only profiles in this status.",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "active",
                "archived"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of ICP profiles, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfileList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000f001",
                      "name": "DACH machine builders",
                      "description": "Mid-sized machine builders in Germany, Austria and Switzerland.",
                      "status": "active",
                      "revision": 3,
                      "currentVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-01T09:00:00.000Z",
                      "updatedAt": "2026-09-20T10:30:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "icpProfiles.create",
        "summary": "Create an ICP profile",
        "description": "Creates a profile and its first immutable version. The profile, the version and their audit rows commit only after this answer is checked. A retry with the same Idempotency-Key and body replays the same answer for 24 hours instead of creating a second profile; a name already in use answers 409.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IcpProfileCreateRequest"
              },
              "example": {
                "name": "DACH machine builders",
                "sourceText": "Machine builders in DACH with 50 to 500 employees that export.",
                "structuredCriteria": {
                  "regions": [
                    "DACH"
                  ],
                  "countries": [
                    "DE",
                    "AT",
                    "CH"
                  ],
                  "industries": [
                    "Machine building"
                  ],
                  "excludedIndustries": [],
                  "employeeRange": {
                    "min": 50,
                    "max": 500
                  },
                  "companyTypes": [
                    "Manufacturer"
                  ],
                  "excludedCompanyTypes": [
                    "Distributor"
                  ],
                  "targetPersonas": [
                    "Head of production"
                  ],
                  "positiveSignals": [
                    "Exports to more than three countries"
                  ],
                  "negativeSignals": [],
                  "painHypotheses": [
                    "Too few skilled workers for manual assembly"
                  ],
                  "requiredEvidence": [],
                  "disqualifiers": [
                    "Insolvency proceedings"
                  ],
                  "notes": "",
                  "confidence": "medium"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A new ICP profile together with its first immutable version.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfileCreated"
                },
                "example": {
                  "profile": {
                    "id": "0199a1b2-0000-7000-8000-00000000f001",
                    "name": "DACH machine builders",
                    "description": "Mid-sized machine builders in Germany, Austria and Switzerland.",
                    "status": "active",
                    "revision": 1,
                    "currentVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-01T09:00:00.000Z",
                    "updatedAt": "2026-09-20T10:30:00.000Z"
                  },
                  "version": {
                    "id": "0199a1b2-0000-7000-8000-00000000f011",
                    "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                    "versionNumber": 1,
                    "sourceText": "Machine builders in DACH with 50 to 500 employees that export.",
                    "structuredCriteria": {
                      "regions": [
                        "DACH"
                      ],
                      "countries": [
                        "DE",
                        "AT",
                        "CH"
                      ],
                      "industries": [
                        "Machine building"
                      ],
                      "excludedIndustries": [],
                      "employeeRange": {
                        "min": 50,
                        "max": 500
                      },
                      "companyTypes": [
                        "Manufacturer"
                      ],
                      "excludedCompanyTypes": [
                        "Distributor"
                      ],
                      "targetPersonas": [
                        "Head of production"
                      ],
                      "positiveSignals": [
                        "Exports to more than three countries"
                      ],
                      "negativeSignals": [],
                      "painHypotheses": [
                        "Too few skilled workers for manual assembly"
                      ],
                      "requiredEvidence": [],
                      "disqualifiers": [
                        "Insolvency proceedings"
                      ],
                      "notes": "",
                      "confidence": "medium"
                    },
                    "generatedSummary": null,
                    "modelMetadata": {},
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-20T10:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/icp-profiles/{icpProfileId}": {
      "get": {
        "operationId": "icpProfiles.get",
        "summary": "Get an ICP profile",
        "description": "One ideal customer profile, by id. Its criteria are in its versions.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "icpProfileId",
            "in": "path",
            "required": true,
            "description": "The ICP profile’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "An ideal customer profile: which companies to look for. Its criteria live in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfile"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f001",
                  "name": "DACH machine builders",
                  "description": "Mid-sized machine builders in Germany, Austria and Switzerland.",
                  "status": "active",
                  "revision": 3,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-01T09:00:00.000Z",
                  "updatedAt": "2026-09-20T10:30:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "icpProfiles.update",
        "summary": "Update an ICP profile",
        "description": "Changes the name, description or status, never the criteria (a criteria change is a new version). Name the revision you were shown: without it the answer is 422 `icp_profile_precondition_required`, and a stale one is 409 `stale_version`. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "icpProfileId",
            "in": "path",
            "required": true,
            "description": "The ICP profile’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IcpProfileUpdateRequest"
              },
              "example": {
                "name": "DACH machine builders",
                "expectedRevision": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An ideal customer profile: which companies to look for. Its criteria live in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfile"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f001",
                  "name": "DACH machine builders",
                  "description": "Mid-sized machine builders in Germany, Austria and Switzerland.",
                  "status": "active",
                  "revision": 4,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-01T09:00:00.000Z",
                  "updatedAt": "2026-09-20T10:30:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/icp-profiles/{icpProfileId}/archive": {
      "post": {
        "operationId": "icpProfiles.archive",
        "summary": "Archive an ICP profile",
        "description": "Moves the profile to `archived`. Name the revision you were shown: a stale one is 409 `stale_version` and archives nothing. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it. An archived, absent or foreign profile answers the neutral 404.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "icpProfileId",
            "in": "path",
            "required": true,
            "description": "The ICP profile’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IcpProfileArchiveRequest"
              },
              "example": {
                "expectedRevision": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An ideal customer profile: which companies to look for. Its criteria live in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfile"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f001",
                  "name": "DACH machine builders",
                  "description": "Mid-sized machine builders in Germany, Austria and Switzerland.",
                  "status": "archived",
                  "revision": 4,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-01T09:00:00.000Z",
                  "updatedAt": "2026-09-20T10:30:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/icp-profiles/{icpProfileId}/restore": {
      "post": {
        "operationId": "icpProfiles.restore",
        "summary": "Restore an ICP profile",
        "description": "Moves an archived profile back to `active`. Name the revision you were shown: a stale one is 409 `stale_version` and restores nothing. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it. A profile that is not archived answers the neutral 404.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "icpProfileId",
            "in": "path",
            "required": true,
            "description": "The ICP profile’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IcpProfileRestoreRequest"
              },
              "example": {
                "expectedRevision": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An ideal customer profile: which companies to look for. Its criteria live in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfile"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f001",
                  "name": "DACH machine builders",
                  "description": "Mid-sized machine builders in Germany, Austria and Switzerland.",
                  "status": "active",
                  "revision": 4,
                  "currentVersionId": "0199a1b2-0000-7000-8000-00000000f011",
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-01T09:00:00.000Z",
                  "updatedAt": "2026-09-20T10:30:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/icp-profiles/{icpProfileId}/versions": {
      "get": {
        "operationId": "icpProfiles.listVersions",
        "summary": "List an ICP profile’s versions",
        "description": "Every version of one ICP profile, the highest version number first. A profile that is not found has no versions, so the answer is an empty array.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "icpProfileId",
            "in": "path",
            "required": true,
            "description": "The ICP profile’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IcpProfileVersion"
                  }
                },
                "example": [
                  {
                    "id": "0199a1b2-0000-7000-8000-00000000f011",
                    "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                    "versionNumber": 2,
                    "sourceText": "Machine builders in DACH with 50 to 500 employees that export.",
                    "structuredCriteria": {
                      "regions": [
                        "DACH"
                      ],
                      "countries": [
                        "DE",
                        "AT",
                        "CH"
                      ],
                      "industries": [
                        "Machine building"
                      ],
                      "excludedIndustries": [],
                      "employeeRange": {
                        "min": 50,
                        "max": 500
                      },
                      "companyTypes": [
                        "Manufacturer"
                      ],
                      "excludedCompanyTypes": [
                        "Distributor"
                      ],
                      "targetPersonas": [
                        "Head of production"
                      ],
                      "positiveSignals": [
                        "Exports to more than three countries"
                      ],
                      "negativeSignals": [],
                      "painHypotheses": [
                        "Too few skilled workers for manual assembly"
                      ],
                      "requiredEvidence": [],
                      "disqualifiers": [
                        "Insolvency proceedings"
                      ],
                      "notes": "",
                      "confidence": "medium"
                    },
                    "generatedSummary": null,
                    "modelMetadata": {},
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-20T10:30:00.000Z"
                  }
                ]
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "icpProfiles.createVersion",
        "summary": "Add an ICP profile version",
        "description": "Appends a new immutable version and makes it the profile’s current one. Name the revision you were shown: without it the answer is 422 `icp_profile_precondition_required`, and a stale one is 409 `stale_version`. The version commits only after this answer is checked; a retry with the same Idempotency-Key replays it instead of appending a second version.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "icpProfileId",
            "in": "path",
            "required": true,
            "description": "The ICP profile’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IcpProfileVersionCreateRequest"
              },
              "example": {
                "sourceText": "Machine builders in DACH with 50 to 500 employees that export.",
                "structuredCriteria": {
                  "regions": [
                    "DACH"
                  ],
                  "countries": [
                    "DE",
                    "AT",
                    "CH"
                  ],
                  "industries": [
                    "Machine building"
                  ],
                  "excludedIndustries": [],
                  "employeeRange": {
                    "min": 50,
                    "max": 500
                  },
                  "companyTypes": [
                    "Manufacturer"
                  ],
                  "excludedCompanyTypes": [
                    "Distributor"
                  ],
                  "targetPersonas": [
                    "Head of production"
                  ],
                  "positiveSignals": [
                    "Exports to more than three countries"
                  ],
                  "negativeSignals": [],
                  "painHypotheses": [
                    "Too few skilled workers for manual assembly"
                  ],
                  "requiredEvidence": [],
                  "disqualifiers": [
                    "Insolvency proceedings"
                  ],
                  "notes": "",
                  "confidence": "medium"
                },
                "expectedRevision": 3
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "One immutable version of an ICP profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfileVersion"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f011",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "versionNumber": 3,
                  "sourceText": "Machine builders in DACH with 50 to 500 employees that export.",
                  "structuredCriteria": {
                    "regions": [
                      "DACH"
                    ],
                    "countries": [
                      "DE",
                      "AT",
                      "CH"
                    ],
                    "industries": [
                      "Machine building"
                    ],
                    "excludedIndustries": [],
                    "employeeRange": {
                      "min": 50,
                      "max": 500
                    },
                    "companyTypes": [
                      "Manufacturer"
                    ],
                    "excludedCompanyTypes": [
                      "Distributor"
                    ],
                    "targetPersonas": [
                      "Head of production"
                    ],
                    "positiveSignals": [
                      "Exports to more than three countries"
                    ],
                    "negativeSignals": [],
                    "painHypotheses": [
                      "Too few skilled workers for manual assembly"
                    ],
                    "requiredEvidence": [],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "notes": "",
                    "confidence": "medium"
                  },
                  "generatedSummary": null,
                  "modelMetadata": {},
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-20T10:30:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/icp-profiles/{icpProfileId}/versions/{versionId}": {
      "get": {
        "operationId": "icpProfiles.getVersion",
        "summary": "Get an ICP profile version",
        "description": "One version of one ICP profile. A version of another profile is not found.",
        "tags": [
          "icpProfiles"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "icpProfileId",
            "in": "path",
            "required": true,
            "description": "The ICP profile’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "description": "The version’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "One immutable version of an ICP profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IcpProfileVersion"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f011",
                  "icpProfileId": "0199a1b2-0000-7000-8000-00000000f001",
                  "versionNumber": 2,
                  "sourceText": "Machine builders in DACH with 50 to 500 employees that export.",
                  "structuredCriteria": {
                    "regions": [
                      "DACH"
                    ],
                    "countries": [
                      "DE",
                      "AT",
                      "CH"
                    ],
                    "industries": [
                      "Machine building"
                    ],
                    "excludedIndustries": [],
                    "employeeRange": {
                      "min": 50,
                      "max": 500
                    },
                    "companyTypes": [
                      "Manufacturer"
                    ],
                    "excludedCompanyTypes": [
                      "Distributor"
                    ],
                    "targetPersonas": [
                      "Head of production"
                    ],
                    "positiveSignals": [
                      "Exports to more than three countries"
                    ],
                    "negativeSignals": [],
                    "painHypotheses": [
                      "Too few skilled workers for manual assembly"
                    ],
                    "requiredEvidence": [],
                    "disqualifiers": [
                      "Insolvency proceedings"
                    ],
                    "notes": "",
                    "confidence": "medium"
                  },
                  "generatedSummary": null,
                  "modelMetadata": {},
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-20T10:30:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "apiKeys.getCurrent",
        "summary": "Describe the calling API key",
        "description": "Answers the id of the API key that sent the request, its name, display prefix and expiry, its workspace and the scope names it holds. Any valid API key may call it, whatever its scopes; a browser session gets 401. What a key may do is also bounded by the permissions frozen when it was minted, so a later change to what a scope covers does not reach it: an operation that needs a scope the key lacks still answers 403 `insufficient_scope` naming the scopes it needs. Requests count against the key’s ordinary rate limit.",
        "tags": [
          "apiKeys"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The API key that sent the request: its id, name, display prefix, expiry, workspace and scopes.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentApiKey"
                },
                "example": {
                  "apiKeyId": "0199a1b2-0000-7000-8000-00000000a001",
                  "name": "Nightly sync",
                  "prefix": "crm_live_7Ff4mS0k",
                  "expiresAt": "2027-01-01T00:00:00.000Z",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "scopes": [
                    "crm:read",
                    "discovery:read"
                  ]
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-api-key-access": "any-authenticated",
        "x-stability-level": "beta"
      }
    },
    "/v1/me/revoke": {
      "post": {
        "operationId": "apiKeys.revokeCurrent",
        "summary": "Revoke the calling API key",
        "description": "Revokes the API key that sent the request, and the secret a rotation left working with it. From the next request on, the key answers 401; it stays listed in Settings → API keys as revoked. It cannot be undone: an owner or admin mints a new key there. Any valid API key may call it, whatever its scopes; a browser session gets 401.",
        "tags": [
          "apiKeys"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Done: the operation succeeded and has nothing to return.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-api-key-access": "any-authenticated",
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/me/rotate": {
      "post": {
        "operationId": "apiKeys.rotateCurrent",
        "summary": "Rotate the calling API key",
        "description": "Gives the API key that sent the request a new secret. The key keeps its id, name, scopes and expiry; only the secret changes. The secret that sent the request keeps working until `previousKeyExpiresAt` (by default one hour, at most 24 hours, `0` for none), so every client can move to the new one, then answers 401. Only the current secret may call it: one a rotation replaced gets 401 here, as a revoked key does, retries included, though it may still revoke the key. Send an `Idempotency-Key`: a retry with the same key and body, sent with the new secret, answers the same new secret, as long as the key has not rotated again or been revoked. If the answer is lost, rotate the key in Settings → API keys. Any valid API key may call it, whatever its scopes; a browser session gets 401. An owner or admin can still rotate or revoke the key in Settings, which ends both secrets at once.",
        "tags": [
          "apiKeys"
        ],
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateCurrentApiKeyRequestInput"
              },
              "example": {
                "previousKeyExpiresInSeconds": 3600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rotated key: the same key with a new secret, and when the replaced secret stops working.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotatedApiKey"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000a001",
                  "name": "Nightly sync",
                  "prefix": "crm_live_Qx8pT2vW",
                  "scopes": [
                    "crm:read",
                    "discovery:read"
                  ],
                  "createdAt": "2026-10-01T08:00:00.000Z",
                  "lastUsedAt": "2026-10-09T07:59:12.000Z",
                  "expiresAt": "2027-01-01T00:00:00.000Z",
                  "revokedAt": null,
                  "key": "crm_synthetic_example_not_a_real_token",
                  "previousKeyExpiresAt": "2026-10-09T09:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-api-key-access": "any-authenticated",
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup": {
      "get": {
        "operationId": "websiteOnboarding.get",
        "summary": "Read workspace company setup",
        "description": "Reads shared workspace state and the current writable profile hash. Creates nothing.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The workspace’s company setup and the hash of its saved company profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboarding"
                },
                "example": {
                  "state": {
                    "id": "0199b5e0-0000-7000-8000-00000000d001",
                    "generation": 1,
                    "revision": 2,
                    "draft": {
                      "website": "https://example.com",
                      "source": "website",
                      "locale": "en",
                      "aiOutcome": {
                        "status": "drafted"
                      },
                      "findings": {
                        "companyName": "Analytical Engines",
                        "productDescription": "Builds engines that compute.",
                        "buyerRoles": [
                          "Head of Engineering",
                          "Chief Technology Officer"
                        ],
                        "markets": [
                          "Austria",
                          "Germany"
                        ]
                      }
                    },
                    "setups": null,
                    "confirmed": {
                      "profileId": "0199b5e0-0000-7000-8000-00000000d002",
                      "profile": {
                        "companyName": "Analytical Engines",
                        "website": "https://example.com",
                        "productDescription": "Builds engines that compute.",
                        "valueProposition": null,
                        "targetRegion": "Austria, Germany",
                        "buyerPersonas": [
                          "Head of Engineering",
                          "Chief Technology Officer"
                        ],
                        "mainPainSolved": null,
                        "salesMotion": null,
                        "exclusionNotes": null
                      },
                      "confirmedAt": "2026-10-07T09:05:00.000Z"
                    },
                    "createdAt": "2026-10-07T09:00:00.000Z",
                    "updatedAt": "2026-10-07T09:05:00.000Z"
                  },
                  "profileHash": "bb55bb4ded3975cf8a62c0da6d87c7a83723ac5b1226de6b629b0bbe08fc297b"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup/access": {
      "get": {
        "operationId": "websiteOnboarding.getAccess",
        "summary": "Read workspace setup access",
        "description": "Scoped API keys read workspace setup facts without creator membership. Every authenticated active human member can read their own session workspace gate status, regardless of role permissions. A key is eligible when it holds `setup:run`; a member when their role may change setup. Creates nothing and exposes no private answers or profile contents. An unfinished setup continues at `/onboarding/company-profile`, the one setup page; the other paths and `handoff` are kept for compatibility and no longer answered.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the caller may or must complete the workspace’s setup, and where.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboardingAccess"
                },
                "example": {
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "eligible": true,
                  "required": true,
                  "nextPath": "/onboarding/company-profile",
                  "generation": 1,
                  "revision": 2,
                  "completedAt": null,
                  "handoff": null,
                  "completionSource": null
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup/company-profile/confirm": {
      "post": {
        "operationId": "websiteOnboarding.confirmProfile",
        "summary": "Confirm workspace company profile",
        "description": "Requires one UUID Idempotency-Key matching body operationId. Requires a user or independent API-key actor with setup and company-context read/update. Atomically saves the company profile, resulting snapshot, revision, milestones and durable receipt. The same transaction copies the saved `productDescription` into the company’s short description. When the actor may also manage workspace settings (`settings:manage`) and the workspace still has the name sign-up gave it, it renames the workspace to the saved `companyName`; a setup key or a member without that permission, or a blank name, renames nothing. When company memory is enabled, the same transaction registers the saved website as a company-memory URL source and optional `sourceText` as a text source, then starts background delivery. A fresh confirmation registers only website and text sources not already registered for that setup; changing the website replaces the earlier onboarding website source, while uploaded documents remain. Without company memory the profile is saved and nothing is read. A website that is not a usable web address is refused with 422 `validation_error` at `profile.website` (`invalid_url`). Requires current generation, revision and profile hash. Exact receipt replay returns the original response without registering or starting work again.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:run"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebsiteOnboardingConfirmProfileRequest"
              },
              "example": {
                "operationId": "0199b5e0-0000-7000-8000-00000000e003",
                "generation": 1,
                "expectedRevision": 1,
                "expectedProfileHash": "8b998c3434e02b87555345919ceb03c17c7caba67d4703d135916480bd57c959",
                "profile": {
                  "companyName": "Analytical Engines",
                  "website": "https://example.com",
                  "productDescription": "Builds engines that compute.",
                  "targetRegion": "Austria, Germany",
                  "buyerPersonas": [
                    "Head of Engineering",
                    "Chief Technology Officer"
                  ]
                },
                "sourceText": "We build engines that compute."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The workspace’s company setup and the hash of its saved company profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboarding"
                },
                "example": {
                  "state": {
                    "id": "0199b5e0-0000-7000-8000-00000000d001",
                    "generation": 1,
                    "revision": 2,
                    "draft": {
                      "website": "https://example.com",
                      "source": "website",
                      "locale": "en",
                      "aiOutcome": {
                        "status": "drafted"
                      },
                      "findings": {
                        "companyName": "Analytical Engines",
                        "productDescription": "Builds engines that compute.",
                        "buyerRoles": [
                          "Head of Engineering",
                          "Chief Technology Officer"
                        ],
                        "markets": [
                          "Austria",
                          "Germany"
                        ]
                      }
                    },
                    "setups": null,
                    "confirmed": {
                      "profileId": "0199b5e0-0000-7000-8000-00000000d002",
                      "profile": {
                        "companyName": "Analytical Engines",
                        "website": "https://example.com",
                        "productDescription": "Builds engines that compute.",
                        "valueProposition": null,
                        "targetRegion": "Austria, Germany",
                        "buyerPersonas": [
                          "Head of Engineering",
                          "Chief Technology Officer"
                        ],
                        "mainPainSolved": null,
                        "salesMotion": null,
                        "exclusionNotes": null
                      },
                      "confirmedAt": "2026-10-07T09:05:00.000Z"
                    },
                    "createdAt": "2026-10-07T09:00:00.000Z",
                    "updatedAt": "2026-10-07T09:05:00.000Z"
                  },
                  "profileHash": "bb55bb4ded3975cf8a62c0da6d87c7a83723ac5b1226de6b629b0bbe08fc297b"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup/company-profile/draft": {
      "post": {
        "operationId": "websiteOnboarding.draftProfile",
        "summary": "Draft workspace company profile from website or description",
        "description": "Requires one UUID Idempotency-Key matching body operationId. Durably admits one execution owner, then acquires website evidence once or uses a supplied description without fetching. Enrik sponsors up to two bounded model calls per command within the workspace lifetime allowance. Saves localized findings or manual fallback with a revision fence and replayable receipt. Live duplicates return onboarding_ai_in_progress with retryAfterMs 1000; expiry finalizes manual fallback without redispatch.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:run"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebsiteOnboardingDraftProfileRequest"
              },
              "example": {
                "operationId": "0199b5e0-0000-7000-8000-00000000e002",
                "generation": 1,
                "expectedRevision": 0,
                "locale": "en",
                "source": "website",
                "website": "https://example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The workspace’s company setup and the hash of its saved company profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboarding"
                },
                "example": {
                  "state": {
                    "id": "0199b5e0-0000-7000-8000-00000000d001",
                    "generation": 1,
                    "revision": 1,
                    "draft": {
                      "website": "https://example.com",
                      "source": "website",
                      "locale": "en",
                      "aiOutcome": {
                        "status": "drafted"
                      },
                      "findings": {
                        "companyName": "Analytical Engines",
                        "productDescription": "Builds engines that compute.",
                        "buyerRoles": [
                          "Head of Engineering",
                          "Chief Technology Officer"
                        ],
                        "markets": [
                          "Austria",
                          "Germany"
                        ]
                      }
                    },
                    "setups": null,
                    "confirmed": null,
                    "createdAt": "2026-10-07T09:00:00.000Z",
                    "updatedAt": "2026-10-07T09:01:00.000Z"
                  },
                  "profileHash": "8b998c3434e02b87555345919ceb03c17c7caba67d4703d135916480bd57c959"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup/complete": {
      "post": {
        "operationId": "websiteOnboarding.complete",
        "summary": "Complete workspace setup",
        "description": "Requires one UUID Idempotency-Key matching body operationId. Requires a confirmed company profile in the current generation (409 `onboarding_profile_required` otherwise); setup choices and the handoff acknowledgement are not needed. Atomically records completion and a durable receipt. Only human actors may supply optional private answers; API keys must omit answers entirely. Completed generations ignore further answers and revision preconditions.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:run"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebsiteOnboardingCompleteRequest"
              },
              "example": {
                "operationId": "0199b5e0-0000-7000-8000-00000000e006",
                "generation": 1,
                "expectedRevision": 3,
                "mode": "finish"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The current generation’s completed setup.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboardingCompletion"
                },
                "example": {
                  "state": {
                    "generation": 1,
                    "revision": 4,
                    "completedAt": "2026-10-07T09:08:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup/completion": {
      "get": {
        "operationId": "websiteOnboarding.getCompletion",
        "summary": "Read workspace setup completion",
        "description": "Reads the current generation and its completed milestone. Creates nothing and contains no private answers.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the current generation’s setup is complete.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboardingCompletionStatus"
                },
                "example": {
                  "state": {
                    "generation": 1,
                    "revision": 4,
                    "completedAt": "2026-10-07T09:08:00.000Z"
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup/reset": {
      "post": {
        "operationId": "websiteOnboarding.reset",
        "summary": "Reset workspace company setup",
        "description": "Requires one UUID Idempotency-Key matching body operationId. Starts a new generation and clears confirmation. Preserves the saved company profile and historical command receipts.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:run"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebsiteOnboardingResetRequest"
              },
              "example": {
                "operationId": "0199b5e0-0000-7000-8000-00000000e005",
                "generation": 1,
                "expectedRevision": 3
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The workspace’s company setup and the hash of its saved company profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboarding"
                },
                "example": {
                  "state": {
                    "id": "0199b5e0-0000-7000-8000-00000000d001",
                    "generation": 2,
                    "revision": 0,
                    "draft": null,
                    "setups": null,
                    "confirmed": null,
                    "createdAt": "2026-10-07T09:00:00.000Z",
                    "updatedAt": "2026-10-07T09:10:00.000Z"
                  },
                  "profileHash": "bb55bb4ded3975cf8a62c0da6d87c7a83723ac5b1226de6b629b0bbe08fc297b"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/onboarding/setup/setups": {
      "post": {
        "operationId": "websiteOnboarding.chooseSetups",
        "summary": "Choose workspace setups",
        "description": "Deprecated: setup no longer needs setup choices, and `websiteOnboarding.complete` does not wait for them. Still accepted: requires one UUID Idempotency-Key matching body operationId and records immutable choices once per confirmed generation, which also acknowledges the handoff. Target segments require ICP profiles. Explicitly selecting nothing is valid. Reset starts a new selection; exact receipt replay preserves historical responses.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:run"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebsiteOnboardingChooseSetupsRequest"
              },
              "example": {
                "operationId": "0199b5e0-0000-7000-8000-00000000e004",
                "generation": 1,
                "expectedRevision": 2,
                "setups": {
                  "icpProfiles": true,
                  "targetSegments": true,
                  "buyingSignals": false
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The workspace’s company setup and the hash of its saved company profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboarding"
                },
                "example": {
                  "state": {
                    "id": "0199b5e0-0000-7000-8000-00000000d001",
                    "generation": 1,
                    "revision": 3,
                    "draft": {
                      "website": "https://example.com",
                      "source": "website",
                      "locale": "en",
                      "aiOutcome": {
                        "status": "drafted"
                      },
                      "findings": {
                        "companyName": "Analytical Engines",
                        "productDescription": "Builds engines that compute.",
                        "buyerRoles": [
                          "Head of Engineering",
                          "Chief Technology Officer"
                        ],
                        "markets": [
                          "Austria",
                          "Germany"
                        ]
                      }
                    },
                    "setups": {
                      "icpProfiles": true,
                      "targetSegments": true,
                      "buyingSignals": false
                    },
                    "confirmed": {
                      "profileId": "0199b5e0-0000-7000-8000-00000000d002",
                      "profile": {
                        "companyName": "Analytical Engines",
                        "website": "https://example.com",
                        "productDescription": "Builds engines that compute.",
                        "valueProposition": null,
                        "targetRegion": "Austria, Germany",
                        "buyerPersonas": [
                          "Head of Engineering",
                          "Chief Technology Officer"
                        ],
                        "mainPainSolved": null,
                        "salesMotion": null,
                        "exclusionNotes": null
                      },
                      "confirmedAt": "2026-10-07T09:05:00.000Z"
                    },
                    "createdAt": "2026-10-07T09:00:00.000Z",
                    "updatedAt": "2026-10-07T09:06:00.000Z"
                  },
                  "profileHash": "bb55bb4ded3975cf8a62c0da6d87c7a83723ac5b1226de6b629b0bbe08fc297b"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta",
        "deprecated": true,
        "x-deprecated-since": "2026-10-29"
      }
    },
    "/v1/onboarding/setup/start": {
      "post": {
        "operationId": "websiteOnboarding.start",
        "summary": "Start workspace company setup",
        "description": "Requires one UUID Idempotency-Key matching body operationId. Creates setup if absent and records a durable command receipt. Existing state is preserved.",
        "tags": [
          "websiteOnboarding"
        ],
        "security": [
          {
            "apiKey": [
              "setup:run"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebsiteOnboardingStartRequest"
              },
              "example": {
                "operationId": "0199b5e0-0000-7000-8000-00000000e001"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The workspace’s company setup and the hash of its saved company profile.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RunRateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RunRateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebsiteOnboarding"
                },
                "example": {
                  "state": {
                    "id": "0199b5e0-0000-7000-8000-00000000d001",
                    "generation": 1,
                    "revision": 0,
                    "draft": null,
                    "setups": null,
                    "confirmed": null,
                    "createdAt": "2026-10-07T09:00:00.000Z",
                    "updatedAt": "2026-10-07T09:00:00.000Z"
                  },
                  "profileHash": "8b998c3434e02b87555345919ceb03c17c7caba67d4703d135916480bd57c959"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RunRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/saved-views": {
      "get": {
        "operationId": "savedViews.list",
        "summary": "List saved views",
        "description": "Pages through the workspace’s saved views of one object type, ordered by name. Pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "savedViews"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "objectType",
            "in": "query",
            "required": true,
            "description": "Whose views to list: `contact` or `company`. Required.",
            "schema": {
              "type": "string",
              "enum": [
                "contact",
                "company"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of saved views, ordered by name.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedViewList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000a001",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "objectType": "contact",
                      "name": "Engineers in Vienna",
                      "query": {
                        "filters": [
                          {
                            "field": "jobTitle",
                            "operator": "contains",
                            "value": "Engineer"
                          },
                          {
                            "field": "customFields.city",
                            "operator": "eq",
                            "value": "Vienna"
                          }
                        ],
                        "sort": [
                          {
                            "field": "lastName",
                            "direction": "asc"
                          }
                        ],
                        "columns": [
                          "firstName",
                          "lastName",
                          "email",
                          "jobTitle"
                        ]
                      },
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z"
                    },
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000a002",
                      "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                      "objectType": "contact",
                      "name": "Newest first",
                      "query": {
                        "filters": [],
                        "sort": [
                          {
                            "field": "createdAt",
                            "direction": "desc"
                          }
                        ]
                      },
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-29T08:00:00.000Z",
                      "updatedAt": "2026-09-29T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": true,
                    "endCursor": "eyJ2IjoxLCJzaWciOiIifQ",
                    "limit": 2
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "savedViews.create",
        "summary": "Create a saved view",
        "description": "Creates a saved view. Send an `Idempotency-Key`: a retry with the same key and body returns the view the first request created instead of creating another. Returning that view to a retry also needs `crm:read`, as reading it would; without it the retry is refused with 403 `permission_denied`. A sort by a custom field is refused with `invalid_sort`.",
        "tags": [
          "savedViews"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedViewCreateRequestInput"
              },
              "example": {
                "name": "Engineers in Vienna",
                "objectType": "contact",
                "query": {
                  "filters": [
                    {
                      "field": "jobTitle",
                      "operator": "contains",
                      "value": "Engineer"
                    },
                    {
                      "field": "customFields.city",
                      "operator": "eq",
                      "value": "Vienna"
                    }
                  ],
                  "sort": [
                    {
                      "field": "lastName",
                      "direction": "asc"
                    }
                  ],
                  "columns": [
                    "firstName",
                    "lastName",
                    "email",
                    "jobTitle"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A named set of filters, sort and columns over contacts or companies.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedView"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000a001",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "objectType": "contact",
                  "name": "Engineers in Vienna",
                  "query": {
                    "filters": [
                      {
                        "field": "jobTitle",
                        "operator": "contains",
                        "value": "Engineer"
                      },
                      {
                        "field": "customFields.city",
                        "operator": "eq",
                        "value": "Vienna"
                      }
                    ],
                    "sort": [
                      {
                        "field": "lastName",
                        "direction": "asc"
                      }
                    ],
                    "columns": [
                      "firstName",
                      "lastName",
                      "email",
                      "jobTitle"
                    ]
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/saved-views/{savedViewId}": {
      "get": {
        "operationId": "savedViews.get",
        "summary": "Get a saved view",
        "description": "One saved view, by id. Name the object type of a company view (`objectType=company`); a view of another object type is not found.",
        "tags": [
          "savedViews"
        ],
        "security": [
          {
            "apiKey": [
              "crm:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "savedViewId",
            "in": "path",
            "required": true,
            "description": "The saved view’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "objectType",
            "in": "query",
            "required": false,
            "description": "The records the view is over: `contact` (the default) or `company`. A view of the other type is not found.",
            "schema": {
              "default": "contact",
              "type": "string",
              "enum": [
                "contact",
                "company"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A named set of filters, sort and columns over contacts or companies.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedView"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000a001",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "objectType": "contact",
                  "name": "Engineers in Vienna",
                  "query": {
                    "filters": [
                      {
                        "field": "jobTitle",
                        "operator": "contains",
                        "value": "Engineer"
                      },
                      {
                        "field": "customFields.city",
                        "operator": "eq",
                        "value": "Vienna"
                      }
                    ],
                    "sort": [
                      {
                        "field": "lastName",
                        "direction": "asc"
                      }
                    ],
                    "columns": [
                      "firstName",
                      "lastName",
                      "email",
                      "jobTitle"
                    ]
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-29T08:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "savedViews.update",
        "summary": "Update a saved view",
        "description": "Renames a saved view, replaces its query, or both, and keeps the rest. Send an `Idempotency-Key`: a retry with the same key and body answers the view the first request saved, which also needs `crm:read`; the same key with another body is refused with 409 `idempotency_key_reused`. Send the `updatedAt` you read as `expectedUpdatedAt` to be refused with 409 `stale_version` if the view changed since. Name the object type of a company view (`objectType=company`); a view of another object type is not found.",
        "tags": [
          "savedViews"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "savedViewId",
            "in": "path",
            "required": true,
            "description": "The saved view’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "objectType",
            "in": "query",
            "required": false,
            "description": "The records the view is over: `contact` (the default) or `company`. A view of the other type is not found.",
            "schema": {
              "default": "contact",
              "type": "string",
              "enum": [
                "contact",
                "company"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedViewUpdateRequestInput"
              },
              "example": {
                "name": "Vienna engineers",
                "expectedUpdatedAt": "2026-09-29T08:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A named set of filters, sort and columns over contacts or companies.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SavedView"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000a001",
                  "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                  "objectType": "contact",
                  "name": "Vienna engineers",
                  "query": {
                    "filters": [
                      {
                        "field": "jobTitle",
                        "operator": "contains",
                        "value": "Engineer"
                      },
                      {
                        "field": "customFields.city",
                        "operator": "eq",
                        "value": "Vienna"
                      }
                    ],
                    "sort": [
                      {
                        "field": "lastName",
                        "direction": "asc"
                      }
                    ],
                    "columns": [
                      "firstName",
                      "lastName",
                      "email",
                      "jobTitle"
                    ]
                  },
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-29T08:00:00.000Z",
                  "updatedAt": "2026-09-30T09:30:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      },
      "delete": {
        "operationId": "savedViews.delete",
        "summary": "Delete a saved view",
        "description": "Deletes a saved view. Send an `Idempotency-Key`: a retry with the same key answers the first delete from its receipt. Deleting one that is already deleted also answers `ok`; an id that never existed is not found. Name the object type of a company view (`objectType=company`); a view of another object type is not found.",
        "tags": [
          "savedViews"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "savedViewId",
            "in": "path",
            "required": true,
            "description": "The saved view’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "objectType",
            "in": "query",
            "required": false,
            "description": "The records the view is over: `contact` (the default) or `company`. A view of the other type is not found.",
            "schema": {
              "default": "contact",
              "type": "string",
              "enum": [
                "contact",
                "company"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Done: the operation succeeded and has nothing to return.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/signal-definitions": {
      "get": {
        "operationId": "signalDefinitions.list",
        "summary": "List signal definitions",
        "description": "Pages through the workspace’s signal definitions, newest first. Filter by `lifecycle`; pass `pageInfo.endCursor` as `cursor` to fetch the next page. An unknown parameter is refused.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "lifecycle",
            "in": "query",
            "required": false,
            "description": "Only definitions in this lifecycle.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of signal definitions, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinitionList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000f201",
                      "name": "Exhibits at a trade fair",
                      "description": "The company exhibits at a trade fair in its industry.",
                      "lifecycle": "active",
                      "currentDraftVersionId": null,
                      "currentPublishedVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                      "revision": 4,
                      "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                      "createdAt": "2026-09-10T08:00:00.000Z",
                      "updatedAt": "2026-09-12T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "signalDefinitions.create",
        "summary": "Create a signal definition",
        "description": "Creates a definition and its first draft version, while signal definitions are switched on (503 otherwise). Both commit only after this answer is checked. A retry with the same Idempotency-Key and body replays the same answer for 24 hours instead of creating a second definition; a name already in use answers 409. The draft is not published: publishing stays with a person in the app.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalDefinitionCreateRequest"
              },
              "example": {
                "name": "Exhibits at a trade fair",
                "description": "The company exhibits at a trade fair in its industry.",
                "body": {
                  "name": "Exhibits at a trade fair",
                  "description": "The company exhibits at a trade fair in its industry.",
                  "humanExplanation": "An exhibitor is investing in finding new customers this year.",
                  "observableCondition": "The company is on the fair’s published exhibitor list.",
                  "examples": [
                    "Listed as an exhibitor at the fair this year"
                  ],
                  "counterexamples": [
                    "Only a visitor badge was mentioned"
                  ],
                  "evidenceRequirements": {
                    "permittedSourceKinds": [
                      "controlled_directory"
                    ],
                    "requireLocatedSupport": true,
                    "requireEntityAttribution": true,
                    "claimSupport": {
                      "requiredAssertion": "affirmed",
                      "permittedModalities": [
                        "factual"
                      ]
                    },
                    "temporal": {
                      "semantics": "condition_observed",
                      "minimumPrecision": "year",
                      "windowDays": 365,
                      "allowPlannedFuture": true
                    },
                    "coverage": {
                      "negativeEvidence": "requires_certified_complete_scope"
                    }
                  },
                  "detector": {
                    "kind": "directory_listing",
                    "config": {
                      "sourceRole": "exhibitor_list",
                      "editionLabel": "2026"
                    }
                  },
                  "subjectType": "company",
                  "temporalRule": {
                    "semantics": "condition_observed",
                    "windowDays": 365,
                    "minimumPrecision": "year",
                    "allowPlannedFuture": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A new signal definition together with its first draft version.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinitionCreated"
                },
                "example": {
                  "definition": {
                    "id": "0199a1b2-0000-7000-8000-00000000f201",
                    "name": "Exhibits at a trade fair",
                    "description": "The company exhibits at a trade fair in its industry.",
                    "lifecycle": "active",
                    "currentDraftVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                    "currentPublishedVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                    "revision": 1,
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-10T08:00:00.000Z",
                    "updatedAt": "2026-09-12T08:00:00.000Z"
                  },
                  "version": {
                    "id": "0199a1b2-0000-7000-8000-00000000f211",
                    "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                    "versionNumber": 1,
                    "body": {
                      "name": "Exhibits at a trade fair",
                      "description": "The company exhibits at a trade fair in its industry.",
                      "humanExplanation": "An exhibitor is investing in finding new customers this year.",
                      "observableCondition": "The company is on the fair’s published exhibitor list.",
                      "examples": [
                        "Listed as an exhibitor at the fair this year"
                      ],
                      "counterexamples": [
                        "Only a visitor badge was mentioned"
                      ],
                      "evidenceRequirements": {
                        "permittedSourceKinds": [
                          "controlled_directory"
                        ],
                        "requireLocatedSupport": true,
                        "requireEntityAttribution": true,
                        "claimSupport": {
                          "requiredAssertion": "affirmed",
                          "permittedModalities": [
                            "factual"
                          ]
                        },
                        "temporal": {
                          "semantics": "condition_observed",
                          "minimumPrecision": "year",
                          "windowDays": 365,
                          "allowPlannedFuture": true
                        },
                        "coverage": {
                          "negativeEvidence": "requires_certified_complete_scope"
                        }
                      },
                      "detector": {
                        "kind": "directory_listing",
                        "config": {
                          "sourceRole": "exhibitor_list",
                          "editionLabel": "2026"
                        }
                      },
                      "subjectType": "company",
                      "temporalRule": {
                        "semantics": "condition_observed",
                        "windowDays": 365,
                        "minimumPrecision": "year",
                        "allowPlannedFuture": true
                      }
                    },
                    "detectorKind": "directory_listing",
                    "schemaVersion": 1,
                    "detectorContractVersion": 1,
                    "contentFingerprint": "sha256:4e1a9c07",
                    "publicationStatus": "draft",
                    "firstPublishedAt": null,
                    "publishedAt": null,
                    "retiredAt": null,
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-10T08:00:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/signal-definitions/{signalDefinitionId}": {
      "get": {
        "operationId": "signalDefinitions.get",
        "summary": "Get a signal definition",
        "description": "One signal definition, by id. What it says is in its versions.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "signalDefinitionId",
            "in": "path",
            "required": true,
            "description": "The signal definition’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A signal the workspace looks for in companies. What it says lives in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinition"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f201",
                  "name": "Exhibits at a trade fair",
                  "description": "The company exhibits at a trade fair in its industry.",
                  "lifecycle": "active",
                  "currentDraftVersionId": null,
                  "currentPublishedVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                  "revision": 4,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-10T08:00:00.000Z",
                  "updatedAt": "2026-09-12T08:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "signalDefinitions.update",
        "summary": "Update a signal definition",
        "description": "Changes the name or description, never the content (a content change is a new version). Name the revision you were shown: a stale one is 409 `stale_version` and writes nothing. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "signalDefinitionId",
            "in": "path",
            "required": true,
            "description": "The signal definition’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalDefinitionUpdateRequest"
              },
              "example": {
                "name": "Exhibits at a trade fair",
                "expectedRevision": 4
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A signal the workspace looks for in companies. What it says lives in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinition"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f201",
                  "name": "Exhibits at a trade fair",
                  "description": "The company exhibits at a trade fair in its industry.",
                  "lifecycle": "active",
                  "currentDraftVersionId": null,
                  "currentPublishedVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                  "revision": 5,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-10T08:00:00.000Z",
                  "updatedAt": "2026-09-12T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/signal-definitions/{signalDefinitionId}/archive": {
      "post": {
        "operationId": "signalDefinitions.archive",
        "summary": "Archive a signal definition",
        "description": "Moves the definition to `archived`, which stops new publication. Name the revision you were shown: a stale one is 409 `stale_version` and writes nothing. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "signalDefinitionId",
            "in": "path",
            "required": true,
            "description": "The signal definition’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalDefinitionLifecycleRequest"
              },
              "example": {
                "expectedRevision": 4
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A signal the workspace looks for in companies. What it says lives in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinition"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f201",
                  "name": "Exhibits at a trade fair",
                  "description": "The company exhibits at a trade fair in its industry.",
                  "lifecycle": "archived",
                  "currentDraftVersionId": null,
                  "currentPublishedVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                  "revision": 5,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-10T08:00:00.000Z",
                  "updatedAt": "2026-09-12T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/signal-definitions/{signalDefinitionId}/restore": {
      "post": {
        "operationId": "signalDefinitions.restore",
        "summary": "Restore a signal definition",
        "description": "Moves an archived definition back to `active`. Name the revision you were shown: a stale one is 409 `stale_version` and writes nothing. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "signalDefinitionId",
            "in": "path",
            "required": true,
            "description": "The signal definition’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalDefinitionLifecycleRequest"
              },
              "example": {
                "expectedRevision": 4
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A signal the workspace looks for in companies. What it says lives in its versions.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinition"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f201",
                  "name": "Exhibits at a trade fair",
                  "description": "The company exhibits at a trade fair in its industry.",
                  "lifecycle": "active",
                  "currentDraftVersionId": null,
                  "currentPublishedVersionId": "0199a1b2-0000-7000-8000-00000000f211",
                  "revision": 5,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "updatedBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-10T08:00:00.000Z",
                  "updatedAt": "2026-09-12T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/signal-definitions/{signalDefinitionId}/versions": {
      "get": {
        "operationId": "signalDefinitions.listVersions",
        "summary": "List a signal definition’s versions",
        "description": "Every version of one signal definition, the highest version number first.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "signalDefinitionId",
            "in": "path",
            "required": true,
            "description": "The signal definition’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SignalDefinitionVersion"
                  }
                },
                "example": [
                  {
                    "id": "0199a1b2-0000-7000-8000-00000000f211",
                    "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                    "versionNumber": 1,
                    "body": {
                      "name": "Exhibits at a trade fair",
                      "description": "The company exhibits at a trade fair in its industry.",
                      "humanExplanation": "An exhibitor is investing in finding new customers this year.",
                      "observableCondition": "The company is on the fair’s published exhibitor list.",
                      "examples": [
                        "Listed as an exhibitor at the fair this year"
                      ],
                      "counterexamples": [
                        "Only a visitor badge was mentioned"
                      ],
                      "evidenceRequirements": {
                        "permittedSourceKinds": [
                          "controlled_directory"
                        ],
                        "requireLocatedSupport": true,
                        "requireEntityAttribution": true,
                        "claimSupport": {
                          "requiredAssertion": "affirmed",
                          "permittedModalities": [
                            "factual"
                          ]
                        },
                        "temporal": {
                          "semantics": "condition_observed",
                          "minimumPrecision": "year",
                          "windowDays": 365,
                          "allowPlannedFuture": true
                        },
                        "coverage": {
                          "negativeEvidence": "requires_certified_complete_scope"
                        }
                      },
                      "detector": {
                        "kind": "directory_listing",
                        "config": {
                          "sourceRole": "exhibitor_list",
                          "editionLabel": "2026"
                        }
                      },
                      "subjectType": "company",
                      "temporalRule": {
                        "semantics": "condition_observed",
                        "windowDays": 365,
                        "minimumPrecision": "year",
                        "allowPlannedFuture": true
                      }
                    },
                    "detectorKind": "directory_listing",
                    "schemaVersion": 1,
                    "detectorContractVersion": 1,
                    "contentFingerprint": "sha256:4e1a9c07",
                    "publicationStatus": "published",
                    "firstPublishedAt": "2026-09-12T08:00:00.000Z",
                    "publishedAt": "2026-09-12T08:00:00.000Z",
                    "retiredAt": null,
                    "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                    "createdAt": "2026-09-10T08:00:00.000Z"
                  }
                ]
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "signalDefinitions.appendVersion",
        "summary": "Add a signal definition version",
        "description": "Appends an immutable draft version and answers it with the definition’s new revision. It is not published. Name the revision you were shown: a stale one is 409 `stale_version` and writes nothing. The change commits only after this answer is checked; a retry with the same Idempotency-Key replays it.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "signalDefinitionId",
            "in": "path",
            "required": true,
            "description": "The signal definition’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignalDefinitionVersionAppendRequest"
              },
              "example": {
                "body": {
                  "name": "Exhibits at a trade fair",
                  "description": "The company exhibits at a trade fair in its industry.",
                  "humanExplanation": "An exhibitor is investing in finding new customers this year.",
                  "observableCondition": "The company is on the fair’s published exhibitor list.",
                  "examples": [
                    "Listed as an exhibitor at the fair this year"
                  ],
                  "counterexamples": [
                    "Only a visitor badge was mentioned"
                  ],
                  "evidenceRequirements": {
                    "permittedSourceKinds": [
                      "controlled_directory"
                    ],
                    "requireLocatedSupport": true,
                    "requireEntityAttribution": true,
                    "claimSupport": {
                      "requiredAssertion": "affirmed",
                      "permittedModalities": [
                        "factual"
                      ]
                    },
                    "temporal": {
                      "semantics": "condition_observed",
                      "minimumPrecision": "year",
                      "windowDays": 365,
                      "allowPlannedFuture": true
                    },
                    "coverage": {
                      "negativeEvidence": "requires_certified_complete_scope"
                    }
                  },
                  "detector": {
                    "kind": "directory_listing",
                    "config": {
                      "sourceRole": "exhibitor_list",
                      "editionLabel": "2026"
                    }
                  },
                  "subjectType": "company",
                  "temporalRule": {
                    "semantics": "condition_observed",
                    "windowDays": 365,
                    "minimumPrecision": "year",
                    "allowPlannedFuture": true
                  }
                },
                "expectedRevision": 4
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A newly appended signal definition version and the definition’s new revision.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinitionVersionAppended"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f211",
                  "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                  "versionNumber": 2,
                  "body": {
                    "name": "Exhibits at a trade fair",
                    "description": "The company exhibits at a trade fair in its industry.",
                    "humanExplanation": "An exhibitor is investing in finding new customers this year.",
                    "observableCondition": "The company is on the fair’s published exhibitor list.",
                    "examples": [
                      "Listed as an exhibitor at the fair this year"
                    ],
                    "counterexamples": [
                      "Only a visitor badge was mentioned"
                    ],
                    "evidenceRequirements": {
                      "permittedSourceKinds": [
                        "controlled_directory"
                      ],
                      "requireLocatedSupport": true,
                      "requireEntityAttribution": true,
                      "claimSupport": {
                        "requiredAssertion": "affirmed",
                        "permittedModalities": [
                          "factual"
                        ]
                      },
                      "temporal": {
                        "semantics": "condition_observed",
                        "minimumPrecision": "year",
                        "windowDays": 365,
                        "allowPlannedFuture": true
                      },
                      "coverage": {
                        "negativeEvidence": "requires_certified_complete_scope"
                      }
                    },
                    "detector": {
                      "kind": "directory_listing",
                      "config": {
                        "sourceRole": "exhibitor_list",
                        "editionLabel": "2026"
                      }
                    },
                    "subjectType": "company",
                    "temporalRule": {
                      "semantics": "condition_observed",
                      "windowDays": 365,
                      "minimumPrecision": "year",
                      "allowPlannedFuture": true
                    }
                  },
                  "detectorKind": "directory_listing",
                  "schemaVersion": 1,
                  "detectorContractVersion": 1,
                  "contentFingerprint": "sha256:4e1a9c07",
                  "publicationStatus": "draft",
                  "firstPublishedAt": null,
                  "publishedAt": null,
                  "retiredAt": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-10T08:00:00.000Z",
                  "revision": 5
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/signal-definitions/{signalDefinitionId}/versions/{versionId}": {
      "get": {
        "operationId": "signalDefinitions.getVersion",
        "summary": "Get a signal definition version",
        "description": "One exact version of one signal definition: the snapshot a pin or a check refers to. A version of another definition is not found.",
        "tags": [
          "signalDefinitions"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "signalDefinitionId",
            "in": "path",
            "required": true,
            "description": "The signal definition’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "versionId",
            "in": "path",
            "required": true,
            "description": "The version’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "One immutable version of a signal definition.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDefinitionVersion"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-00000000f211",
                  "signalDefinitionId": "0199a1b2-0000-7000-8000-00000000f201",
                  "versionNumber": 1,
                  "body": {
                    "name": "Exhibits at a trade fair",
                    "description": "The company exhibits at a trade fair in its industry.",
                    "humanExplanation": "An exhibitor is investing in finding new customers this year.",
                    "observableCondition": "The company is on the fair’s published exhibitor list.",
                    "examples": [
                      "Listed as an exhibitor at the fair this year"
                    ],
                    "counterexamples": [
                      "Only a visitor badge was mentioned"
                    ],
                    "evidenceRequirements": {
                      "permittedSourceKinds": [
                        "controlled_directory"
                      ],
                      "requireLocatedSupport": true,
                      "requireEntityAttribution": true,
                      "claimSupport": {
                        "requiredAssertion": "affirmed",
                        "permittedModalities": [
                          "factual"
                        ]
                      },
                      "temporal": {
                        "semantics": "condition_observed",
                        "minimumPrecision": "year",
                        "windowDays": 365,
                        "allowPlannedFuture": true
                      },
                      "coverage": {
                        "negativeEvidence": "requires_certified_complete_scope"
                      }
                    },
                    "detector": {
                      "kind": "directory_listing",
                      "config": {
                        "sourceRole": "exhibitor_list",
                        "editionLabel": "2026"
                      }
                    },
                    "subjectType": "company",
                    "temporalRule": {
                      "semantics": "condition_observed",
                      "windowDays": 365,
                      "minimumPrecision": "year",
                      "allowPlannedFuture": true
                    }
                  },
                  "detectorKind": "directory_listing",
                  "schemaVersion": 1,
                  "detectorContractVersion": 1,
                  "contentFingerprint": "sha256:4e1a9c07",
                  "publicationStatus": "published",
                  "firstPublishedAt": "2026-09-12T08:00:00.000Z",
                  "publishedAt": "2026-09-12T08:00:00.000Z",
                  "retiredAt": null,
                  "createdBy": "0199a1b2-0000-7000-8000-00000000c001",
                  "createdAt": "2026-09-10T08:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/signal-detectors": {
      "get": {
        "operationId": "signalDetectors.getCatalogue",
        "summary": "Get the signal detector catalogue",
        "description": "Every kind of detector a signal definition can use, and, for one that cannot run, why. Reading it starts nothing.",
        "tags": [
          "signalDetectors"
        ],
        "security": [
          {
            "apiKey": [
              "discovery:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "The detectors a signal definition can use, and why any of them cannot run.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalDetectorCatalogue"
                },
                "example": {
                  "signalDefinitionsEnabled": true,
                  "data": [
                    {
                      "kind": "directory_listing",
                      "detectorContractVersion": 1,
                      "supportedSubjectTypes": [
                        "company"
                      ],
                      "supportedTemporalSemantics": [
                        "condition_observed",
                        "event_occurred"
                      ],
                      "allowedSourceBindingKinds": [
                        "controlled_directory"
                      ],
                      "supportsManualPreview": false,
                      "supportsRecurringAcquisition": false,
                      "negativeEvidence": "requires_certified_complete_scope",
                      "publishable": true,
                      "availability": "unavailable",
                      "availabilityReasons": [
                        "not_certified_in_this_phase"
                      ],
                      "costUnits": null,
                      "limits": {
                        "maxCompaniesPerCheck": null
                      }
                    }
                  ]
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-event-deliveries": {
      "get": {
        "operationId": "webhookEventDeliveries.list",
        "summary": "List event deliveries of a subscription",
        "description": "Pages through one subscription’s deliveries, newest first, optionally in one state. A foreign subscription reads as an empty list. Pass `pageInfo.endCursor` as `cursor`, with the same `subscriptionId` and `state`, to fetch the next page.",
        "tags": [
          "webhookEventDeliveries"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "query",
            "required": true,
            "description": "The subscription whose deliveries to list.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Only deliveries in this state.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "delivering",
                "delivered",
                "failed",
                "canceled",
                "expired"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of one subscription’s deliveries, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDeliveryList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-000000000538",
                      "subscriptionId": "0199a1b2-0000-7000-8000-000000000538",
                      "eventId": "0199a1b2-0000-7000-8000-00000000a538",
                      "eventType": "companyDiscoveryJob.terminal",
                      "state": "delivered",
                      "attemptCount": 1,
                      "nextAttemptAt": null,
                      "expiresAt": "2026-10-10T08:00:00.000Z",
                      "lastAttemptAt": "2026-10-07T08:00:00.000Z",
                      "lastResponseStatus": 204,
                      "lastErrorCode": null,
                      "deliveredAt": "2026-10-07T08:00:00.000Z",
                      "createdAt": "2026-10-07T08:00:00.000Z",
                      "updatedAt": "2026-10-07T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-event-deliveries/{id}": {
      "get": {
        "operationId": "webhookEventDeliveries.get",
        "summary": "Get an event delivery",
        "description": "One delivery with its attempts (status code or error and duration; never a request or response body). Foreign or absent ids are a neutral 404.",
        "tags": [
          "webhookEventDeliveries"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event delivery’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "One delivery with its attempts, oldest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDeliveryDetail"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "subscriptionId": "0199a1b2-0000-7000-8000-000000000538",
                  "eventId": "0199a1b2-0000-7000-8000-00000000a538",
                  "eventType": "companyDiscoveryJob.terminal",
                  "state": "delivered",
                  "attemptCount": 1,
                  "nextAttemptAt": null,
                  "expiresAt": "2026-10-10T08:00:00.000Z",
                  "lastAttemptAt": "2026-10-07T08:00:00.000Z",
                  "lastResponseStatus": 204,
                  "lastErrorCode": null,
                  "deliveredAt": "2026-10-07T08:00:00.000Z",
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z",
                  "attempts": [
                    {
                      "attempt": 1,
                      "startedAt": "2026-10-07T08:00:00.000Z",
                      "durationMs": 120,
                      "responseStatus": 204,
                      "errorCode": null
                    }
                  ]
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-event-deliveries/{id}/redeliver": {
      "post": {
        "operationId": "webhookEventDeliveries.redeliver",
        "summary": "Redeliver an event",
        "description": "Owners and admins only. Sends the same event id and body again with a fresh retry budget and a 72-hour window. Refused with 409 while the delivery is pending or in flight, when the subscription or destination is not active, or when the event is 27 days old or older. Validated before commit. The required Idempotency-Key answers a retry with the first answer for 24 hours instead of sending the event again.",
        "tags": [
          "webhookEventDeliveries"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event delivery’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "One event on its way to one subscription: state and last outcome, never a body.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventDelivery"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "subscriptionId": "0199a1b2-0000-7000-8000-000000000538",
                  "eventId": "0199a1b2-0000-7000-8000-00000000a538",
                  "eventType": "companyDiscoveryJob.terminal",
                  "state": "pending",
                  "attemptCount": 1,
                  "nextAttemptAt": "2026-10-07T08:00:00.000Z",
                  "expiresAt": "2026-10-10T08:00:00.000Z",
                  "lastAttemptAt": "2026-10-07T08:00:00.000Z",
                  "lastResponseStatus": 204,
                  "lastErrorCode": null,
                  "deliveredAt": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-event-types": {
      "get": {
        "operationId": "webhookEventTypes.list",
        "summary": "List event types",
        "description": "Pages through every event type a subscription can name, in catalogue order: its version and stability, the permission the subscription’s creator must hold, and the read operation and key scope a receiver uses to fetch what an event names. Pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "webhookEventTypes"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the event types, in catalogue order.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventTypeList"
                },
                "example": {
                  "data": [
                    {
                      "type": "companyDiscoveryJob.terminal",
                      "version": 1,
                      "stability": "beta",
                      "description": "A discovery job reached its outcome",
                      "permission": "company_discovery_jobs:read",
                      "readOperation": "companyDiscoveryJobs.get",
                      "readScope": "discovery:read"
                    },
                    {
                      "type": "company.created",
                      "version": 1,
                      "stability": "beta",
                      "description": "A company was created",
                      "permission": "companies:read",
                      "readOperation": "companies.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "company.updated",
                      "version": 1,
                      "stability": "beta",
                      "description": "A company changed",
                      "permission": "companies:read",
                      "readOperation": "companies.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "company.deleted",
                      "version": 1,
                      "stability": "beta",
                      "description": "A company was deleted",
                      "permission": "companies:read",
                      "readOperation": "companies.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "company.restored",
                      "version": 1,
                      "stability": "beta",
                      "description": "A company was restored",
                      "permission": "companies:read",
                      "readOperation": "companies.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "contact.created",
                      "version": 1,
                      "stability": "beta",
                      "description": "A contact was created",
                      "permission": "contacts:read",
                      "readOperation": "contacts.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "contact.updated",
                      "version": 1,
                      "stability": "beta",
                      "description": "A contact changed",
                      "permission": "contacts:read",
                      "readOperation": "contacts.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "contact.deleted",
                      "version": 1,
                      "stability": "beta",
                      "description": "A contact was deleted",
                      "permission": "contacts:read",
                      "readOperation": "contacts.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "contact.restored",
                      "version": 1,
                      "stability": "beta",
                      "description": "A contact was restored",
                      "permission": "contacts:read",
                      "readOperation": "contacts.get",
                      "readScope": "crm:read"
                    },
                    {
                      "type": "companySignal.created",
                      "version": 1,
                      "stability": "beta",
                      "description": "A signal was applied to a company",
                      "permission": "company_signals:read",
                      "readOperation": "companySignals.get",
                      "readScope": "crm:read"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-subscriptions": {
      "get": {
        "operationId": "webhookSubscriptions.list",
        "summary": "List event subscriptions",
        "description": "Pages through the workspace’s subscriptions, archived ones included, newest first. Pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the subscriptions, archived ones included, newest first.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-000000000538",
                      "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                      "url": "https://hooks.example.test/enrik",
                      "description": "Order sync",
                      "eventTypes": [
                        "companyDiscoveryJob.terminal"
                      ],
                      "eventVersion": 1,
                      "status": "active",
                      "disabledReason": null,
                      "consecutiveFailures": 0,
                      "lastSuccessAt": null,
                      "lastFailureAt": null,
                      "createdBy": null,
                      "createdAt": "2026-10-07T08:00:00.000Z",
                      "updatedAt": "2026-10-07T08:00:00.000Z"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "post": {
        "operationId": "webhookSubscriptions.create",
        "summary": "Create an event subscription",
        "description": "Subscribes a receiver to event types. Owners and admins only (webhook_subscriptions:manage, which `webhooks:write` carries); the creator must also be allowed to read what each event type names. Name either a receiver `url` or an existing destination. A `url` creates a dedicated destination with its own signing secret in the same transaction (under the `webhooks` plan entitlement, as a destination create), and the answer carries that secret once. An existing destination must be active and have a signing secret, and has at most one live subscription (409 otherwise); its answer carries a null secret. Validated before commit. The required Idempotency-Key recovers the answer, with its secret, for 24 hours; recovery answers 409 idempotency_receipt_superseded once the secret was rotated since, and the same key with another body is 409 idempotency_key_reused.",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionCreateRequest"
              },
              "example": {
                "url": "https://hooks.example.test/enrik",
                "description": "Order sync",
                "eventTypes": [
                  "companyDiscoveryJob.terminal"
                ],
                "eventVersion": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A subscription and, after a create with a url or a rotation, its signing secret, delivered once.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionWithSecret"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                  "url": "https://hooks.example.test/enrik",
                  "description": "Order sync",
                  "eventTypes": [
                    "companyDiscoveryJob.terminal"
                  ],
                  "eventVersion": 1,
                  "status": "active",
                  "disabledReason": null,
                  "consecutiveFailures": 0,
                  "lastSuccessAt": null,
                  "lastFailureAt": null,
                  "createdBy": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z",
                  "signingSecret": "synthetic-secret"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-subscriptions/{id}": {
      "get": {
        "operationId": "webhookSubscriptions.get",
        "summary": "Get an event subscription",
        "description": "One subscription; foreign, absent or deleted ids are a neutral 404.",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event subscription’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "Which events a destination receives, and how its deliveries are going.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                  "url": "https://hooks.example.test/enrik",
                  "description": "Order sync",
                  "eventTypes": [
                    "companyDiscoveryJob.terminal"
                  ],
                  "eventVersion": 1,
                  "status": "active",
                  "disabledReason": null,
                  "consecutiveFailures": 0,
                  "lastSuccessAt": null,
                  "lastFailureAt": null,
                  "createdBy": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z"
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      },
      "patch": {
        "operationId": "webhookSubscriptions.update",
        "summary": "Update an event subscription",
        "description": "Changes the event types the subscription receives, its receiver `url` or its `description`. Each event type needs the same read permission as on create. A `url` or `description` change updates the subscription’s destination, so an export sending there follows it; the signing secret stays. Deliveries already on their way keep their event type and go to the new URL. A destination that sends a bearer token (one set up in the app under Exports → Destinations) keeps its URL here: a new `url` for it is 422 `validation_error` at `secret`, because the token would follow the URL; change it with its token in the app. A repeat changes nothing more; an archived subscription is a neutral 404.",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event subscription’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookSubscriptionUpdateRequest"
              },
              "example": {
                "eventTypes": [
                  "companyDiscoveryJob.terminal",
                  "company.updated"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Which events a destination receives, and how its deliveries are going.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                  "url": "https://hooks.example.test/enrik",
                  "description": "Order sync",
                  "eventTypes": [
                    "companyDiscoveryJob.terminal",
                    "company.updated"
                  ],
                  "eventVersion": 1,
                  "status": "active",
                  "disabledReason": null,
                  "consecutiveFailures": 0,
                  "lastSuccessAt": null,
                  "lastFailureAt": null,
                  "createdBy": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-subscriptions/{id}/archive": {
      "post": {
        "operationId": "webhookSubscriptions.archive",
        "summary": "Archive an event subscription",
        "description": "Ends the subscription for good and cancels its pending deliveries, with one audit entry. The destination a create made for its inline `url` is archived with it; a destination named by `destinationId` stays. Requires Idempotency-Key: a retry with the same key answers the first archive from its receipt (replay requires webhook_subscriptions:read); with a new key an archived subscription is a neutral 404.",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event subscription’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Which events a destination receives, and how its deliveries are going.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                  "url": "https://hooks.example.test/enrik",
                  "description": "Order sync",
                  "eventTypes": [
                    "companyDiscoveryJob.terminal"
                  ],
                  "eventVersion": 1,
                  "status": "archived",
                  "disabledReason": null,
                  "consecutiveFailures": 0,
                  "lastSuccessAt": null,
                  "lastFailureAt": null,
                  "createdBy": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-subscriptions/{id}/disable": {
      "post": {
        "operationId": "webhookSubscriptions.disable",
        "summary": "Disable an event subscription",
        "description": "Pauses the subscription: stops new deliveries and cancels pending ones. Disabling a disabled one answers it unchanged; an archived one is a neutral 404. Requires Idempotency-Key: a retry with the same key answers the first answer from its receipt (replay requires webhook_subscriptions:read).",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event subscription’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Which events a destination receives, and how its deliveries are going.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                  "url": "https://hooks.example.test/enrik",
                  "description": "Order sync",
                  "eventTypes": [
                    "companyDiscoveryJob.terminal"
                  ],
                  "eventVersion": 1,
                  "status": "disabled",
                  "disabledReason": "manual",
                  "consecutiveFailures": 0,
                  "lastSuccessAt": null,
                  "lastFailureAt": null,
                  "createdBy": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-subscriptions/{id}/enable": {
      "post": {
        "operationId": "webhookSubscriptions.enable",
        "summary": "Enable an event subscription",
        "description": "Resumes a paused subscription and resets its failure count; deliveries canceled while it was paused stay canceled. Enabling an active one answers it unchanged; an archived one is a neutral 404. Requires Idempotency-Key: a retry with the same key answers the first answer from its receipt (replay requires webhook_subscriptions:read).",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event subscription’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Which events a destination receives, and how its deliveries are going.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscription"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                  "url": "https://hooks.example.test/enrik",
                  "description": "Order sync",
                  "eventTypes": [
                    "companyDiscoveryJob.terminal"
                  ],
                  "eventVersion": 1,
                  "status": "active",
                  "disabledReason": null,
                  "consecutiveFailures": 0,
                  "lastSuccessAt": null,
                  "lastFailureAt": null,
                  "createdBy": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-subscriptions/{id}/rotate-secret": {
      "post": {
        "operationId": "webhookSubscriptions.rotateSecret",
        "summary": "Rotate the signing secret",
        "description": "Replaces the signing secret of the subscription’s destination and answers the new one once; the old one stops verifying at once, for every subscription and export that sends there. Validated before commit. The required Idempotency-Key recovers the answer, with its secret, for 24 hours; recovery answers 409 idempotency_receipt_superseded once the secret was rotated again, and a new key rotates afresh. An archived subscription is a neutral 404.",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event subscription’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "A subscription and, after a create with a url or a rotation, its signing secret, delivered once.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionWithSecret"
                },
                "example": {
                  "id": "0199a1b2-0000-7000-8000-000000000538",
                  "destinationId": "0199a1b2-0000-7000-8000-000000000001",
                  "url": "https://hooks.example.test/enrik",
                  "description": "Order sync",
                  "eventTypes": [
                    "companyDiscoveryJob.terminal"
                  ],
                  "eventVersion": 1,
                  "status": "active",
                  "disabledReason": null,
                  "consecutiveFailures": 0,
                  "lastSuccessAt": null,
                  "lastFailureAt": null,
                  "createdBy": null,
                  "createdAt": "2026-10-07T08:00:00.000Z",
                  "updatedAt": "2026-10-07T08:00:00.000Z",
                  "signingSecret": "synthetic-secret"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "validate-before-commit",
        "x-stability-level": "beta"
      }
    },
    "/v1/webhook-subscriptions/{id}/test": {
      "post": {
        "operationId": "webhookSubscriptions.test",
        "summary": "Test an event subscription",
        "description": "Sends one signed `webhook.ping` to the receiver now, paused or not, and answers its status and how long it took. One attempt, no retry, within the 10-second event timeout. Nothing is stored: the ping is not an event and does not appear in the delivery log. A repeat sends another ping; an archived subscription is a neutral 404.",
        "tags": [
          "webhookSubscriptions"
        ],
        "security": [
          {
            "apiKey": [
              "webhooks:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The event subscription’s id.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "What the receiver did with one signed `webhook.ping`; never the response body.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionTestResult"
                },
                "example": {
                  "responseStatus": 200,
                  "durationMs": 182,
                  "errorCode": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-mutation-class": "idempotent-by-nature",
        "x-stability-level": "beta"
      }
    },
    "/v1/workspace-members": {
      "get": {
        "operationId": "workspaceMembers.list",
        "summary": "List workspace members",
        "description": "Pages through the workspace’s active members, ordered by user id, with the id and name of each. A member’s `id` is the value `ownerUserId` takes on contacts and companies; an `ownerUserId` that is not an active member is refused. It needs `crm:write`, as setting an owner does. Pass `pageInfo.endCursor` as `cursor` to fetch the next page.",
        "tags": [
          "workspaceMembers"
        ],
        "security": [
          {
            "apiKey": [
              "crm:write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/IfNoneMatch"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the workspace’s active members, by user id.",
            "headers": {
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/CacheControl"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceMemberList"
                },
                "example": {
                  "data": [
                    {
                      "id": "0199a1b2-0000-7000-8000-00000000c001",
                      "name": "Ada Lovelace"
                    }
                  ],
                  "pageInfo": {
                    "hasNextPage": false,
                    "endCursor": null,
                    "limit": 50
                  }
                }
              }
            }
          },
          "304": {
            "$ref": "#/components/responses/NotModified"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableContent"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-stability-level": "beta"
      }
    }
  },
  "webhooks": {
    "company-discovery-job.terminal": {
      "post": {
        "operationId": "companyDiscoveryJobs.terminal",
        "tags": [
          "companyDiscoveryJobs"
        ],
        "summary": "A discovery job reached its outcome",
        "description": "Sent to each active subscription for `companyDiscoveryJob.terminal` once a company discovery job completes, completes with errors, fails or is canceled. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "companyDiscoveryJob.terminal",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyDiscoveryJobTerminalEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000a538",
                "type": "companyDiscoveryJob.terminal",
                "version": 1,
                "occurredAt": "2026-10-07T08:00:09.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "jobId": "0199a1b2-0000-7000-8000-00000000d001",
                  "status": "completed"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "company-signal.created": {
      "post": {
        "operationId": "companySignals.created",
        "tags": [
          "companySignals"
        ],
        "summary": "A signal was applied to a company",
        "description": "Sent to each active subscription for `companySignal.created` once a new signal is applied to a company. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "companySignal.created",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySignalCreatedEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e109",
                "type": "companySignal.created",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "signalId": "0199a1b2-0000-7000-8000-00000000d201",
                  "companyId": "0199a1b2-0000-7000-8000-00000000c001"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "company.created": {
      "post": {
        "operationId": "companies.created",
        "tags": [
          "companies"
        ],
        "summary": "A company was created",
        "description": "Sent to each active subscription for `company.created` once a company is created, whoever created it; `changeSource` says who. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "company.created",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCreatedEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e101",
                "type": "company.created",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "companyId": "0199a1b2-0000-7000-8000-00000000c001",
                  "changeSource": "import"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "company.deleted": {
      "post": {
        "operationId": "companies.deleted",
        "tags": [
          "companies"
        ],
        "summary": "A company was deleted",
        "description": "Sent to each active subscription for `company.deleted` once a company is moved to the trash. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "company.deleted",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyDeletedEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e103",
                "type": "company.deleted",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "companyId": "0199a1b2-0000-7000-8000-00000000c001",
                  "changeSource": "app"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "company.restored": {
      "post": {
        "operationId": "companies.restored",
        "tags": [
          "companies"
        ],
        "summary": "A company was restored",
        "description": "Sent to each active subscription for `company.restored` once a company is restored from the trash. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "company.restored",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyRestoredEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e104",
                "type": "company.restored",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "companyId": "0199a1b2-0000-7000-8000-00000000c001",
                  "changeSource": "app"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "company.updated": {
      "post": {
        "operationId": "companies.updated",
        "tags": [
          "companies"
        ],
        "summary": "A company changed",
        "description": "Sent to each active subscription for `company.updated` once a company’s fields change; `changedFields` names them and `changeSource` says who changed them (with `apiKeyId` when it was a key). The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "company.updated",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdatedEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e102",
                "type": "company.updated",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "companyId": "0199a1b2-0000-7000-8000-00000000c001",
                  "changedFields": [
                    "industry",
                    "ownerUserId"
                  ],
                  "changeSource": "api",
                  "apiKeyId": "0199a1b2-0000-7000-8000-00000000a0a1"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "contact.created": {
      "post": {
        "operationId": "contacts.created",
        "tags": [
          "contacts"
        ],
        "summary": "A contact was created",
        "description": "Sent to each active subscription for `contact.created` once a contact is created, whoever created it; `changeSource` says who. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "contact.created",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreatedEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e105",
                "type": "contact.created",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "contactId": "0199a1b2-0000-7000-8000-00000000c002",
                  "changeSource": "app"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "contact.deleted": {
      "post": {
        "operationId": "contacts.deleted",
        "tags": [
          "contacts"
        ],
        "summary": "A contact was deleted",
        "description": "Sent to each active subscription for `contact.deleted` once a contact is moved to the trash. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "contact.deleted",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactDeletedEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e107",
                "type": "contact.deleted",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "contactId": "0199a1b2-0000-7000-8000-00000000c002",
                  "changeSource": "assistant"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "contact.restored": {
      "post": {
        "operationId": "contacts.restored",
        "tags": [
          "contacts"
        ],
        "summary": "A contact was restored",
        "description": "Sent to each active subscription for `contact.restored` once a contact is restored from the trash. The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "contact.restored",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRestoredEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e108",
                "type": "contact.restored",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "contactId": "0199a1b2-0000-7000-8000-00000000c002",
                  "changeSource": "app"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "contact.updated": {
      "post": {
        "operationId": "contacts.updated",
        "tags": [
          "contacts"
        ],
        "summary": "A contact changed",
        "description": "Sent to each active subscription for `contact.updated` once a contact’s fields change; `changedFields` names them and `changeSource` says who changed them (with `apiKeyId` when it was a key). The POST is signed with `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret, with a fresh `t` on every attempt. Answer 2xx within 10 seconds. Delivery is at least once and unordered: deduplicate by `id`, and read the record for its current state. Up to 8 attempts over about 45 hours, within a 72-hour window.",
        "security": [],
        "x-event-type": "contact.updated",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactUpdatedEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000e106",
                "type": "contact.updated",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "contactId": "0199a1b2-0000-7000-8000-00000000c002",
                  "changedFields": [
                    "jobTitle"
                  ],
                  "changeSource": "automation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    },
    "webhook.ping": {
      "post": {
        "operationId": "webhookSubscriptions.ping",
        "tags": [
          "webhookSubscriptions"
        ],
        "summary": "A subscription was tested",
        "description": "Sent once to the subscription’s URL by `POST /v1/webhook-subscriptions/{id}/test`, with the headers and the signature of every event: `X-Enrik-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">` under the destination’s signing secret. One attempt, no retry: the test answers the receiver’s status and how long it took. Answer 2xx within 10 seconds. A subscription never receives it otherwise, and nothing about it is stored.",
        "security": [],
        "x-event-type": "webhook.ping",
        "x-stability-level": "beta",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPingEvent"
              },
              "example": {
                "id": "0199a1b2-0000-7000-8000-00000000f538",
                "type": "webhook.ping",
                "version": 1,
                "occurredAt": "2026-10-09T08:00:00.000Z",
                "workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
                "data": {
                  "subscriptionId": "0199a1b2-0000-7000-8000-000000000538"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer any 2xx within 10 seconds to acknowledge the event. Anything else, a timeout or a redirect is a failed attempt."
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "BulkRateLimit": {
        "description": "What the API key has left under each rate-limit policy that counted this request: a Structured Field list with one `\"<policy>\";r=<remaining>;t=<seconds>` item per policy. Read it as a list and honour every item, not only the smallest: continued traffic must satisfy each policy. `t` is the effective window in seconds (IETF RateLimit header fields, draft 11): quota is not guaranteed to be fully restored when it ends. When the answer also carries `Retry-After`, that takes priority. This operation writes many records in one request, so two policies count it: `api-key`, every request the key makes, and `api-key-bulk`, every request to a bulk operation.",
        "schema": {
          "type": "string"
        },
        "example": "\"api-key\";r=599;t=60, \"api-key-bulk\";r=29;t=60"
      },
      "BulkRateLimitPolicy": {
        "description": "The rate-limit policies that counted this request: a Structured Field list with one `\"<policy>\";q=<requests>;w=<window in seconds>` item per policy. The limits belong to the key, not to the address it calls from. This operation writes many records in one request, so two policies count it: `api-key`, every request the key makes, and `api-key-bulk`, every request to a bulk operation.",
        "schema": {
          "type": "string"
        },
        "example": "\"api-key\";q=600;w=60, \"api-key-bulk\";q=30;w=60"
      },
      "CacheControl": {
        "description": "`private, no-cache`: a cache may keep the answer for this caller only, and must check it with `If-None-Match` before using it again.",
        "schema": {
          "type": "string"
        },
        "example": "private, no-cache"
      },
      "ETag": {
        "description": "The answer’s entity tag: the base64url SHA-256 of the JSON body as sent, quoted. It changes whenever the body does. Send it as `If-None-Match` to be answered `304 Not Modified` while the answer is the same. It is taken over your answer only, after your scopes and fields are applied.",
        "schema": {
          "type": "string"
        },
        "example": "\"heLt3E-oE86d1oB1ENqD3g27HyZvOWn-1MuHraYky2Y\""
      },
      "RateLimit": {
        "description": "What the API key has left under each rate-limit policy that counted this request: a Structured Field list with one `\"<policy>\";r=<remaining>;t=<seconds>` item per policy. Read it as a list and honour every item, not only the smallest: continued traffic must satisfy each policy. `t` is the effective window in seconds (IETF RateLimit header fields, draft 11): quota is not guaranteed to be fully restored when it ends. When the answer also carries `Retry-After`, that takes priority. One policy counts this operation: `api-key`, every request the key makes.",
        "schema": {
          "type": "string"
        },
        "example": "\"api-key\";r=599;t=60"
      },
      "RateLimitPolicy": {
        "description": "The rate-limit policies that counted this request: a Structured Field list with one `\"<policy>\";q=<requests>;w=<window in seconds>` item per policy. The limits belong to the key, not to the address it calls from. One policy counts this operation: `api-key`, every request the key makes.",
        "schema": {
          "type": "string"
        },
        "example": "\"api-key\";q=600;w=60"
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying. It takes priority over the `t` of every `RateLimit` item.",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 60
      },
      "RunRateLimit": {
        "description": "What the API key has left under each rate-limit policy that counted this request: a Structured Field list with one `\"<policy>\";r=<remaining>;t=<seconds>` item per policy. Read it as a list and honour every item, not only the smallest: continued traffic must satisfy each policy. `t` is the effective window in seconds (IETF RateLimit header fields, draft 11): quota is not guaranteed to be fully restored when it ends. When the answer also carries `Retry-After`, that takes priority. This operation needs a `run` scope, so two policies count it: `api-key`, every request the key makes, and `api-key-run`, every request to an operation that needs a `run` scope.",
        "schema": {
          "type": "string"
        },
        "example": "\"api-key\";r=599;t=60, \"api-key-run\";r=59;t=60"
      },
      "RunRateLimitPolicy": {
        "description": "The rate-limit policies that counted this request: a Structured Field list with one `\"<policy>\";q=<requests>;w=<window in seconds>` item per policy. The limits belong to the key, not to the address it calls from. This operation needs a `run` scope, so two policies count it: `api-key`, every request the key makes, and `api-key-run`, every request to an operation that needs a `run` scope.",
        "schema": {
          "type": "string"
        },
        "example": "\"api-key\";q=600;w=60, \"api-key-run\";q=60;w=60"
      }
    },
    "parameters": {
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "description": "Where to resume a list: the previous page’s `pageInfo.endCursor`. Opaque.",
        "schema": {
          "type": "string",
          "minLength": 1
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "A key you choose for this request, such as a UUID. Retrying with the same key returns the first result instead of doing the work twice.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "IfNoneMatch": {
        "name": "If-None-Match",
        "in": "header",
        "required": false,
        "description": "The `ETag` of an answer you kept. While the answer is still the same, the API answers `304 Not Modified` with no body. Several tags, separated by commas, a weak tag (`W/\"…\"`) and `*` are accepted.",
        "schema": {
          "type": "string"
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "How many items to return: 1 to 200, 50 when absent.",
        "schema": {
          "default": 50,
          "type": "integer",
          "minimum": 1,
          "maximum": 200
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request could not be read. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `malformed_json`: The body is not valid JSON, or is empty while `Content-Type` is `application/json`. Send valid JSON; omit `Content-Type` when there is no body.\n- `invalid_sort`: A sort names a field or direction the list does not support. Sort only by the fields the operation lists.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "malformed_json",
                "message": "Bad Request",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "BulkRateLimited": {
        "description": "Too many requests (`error.code` is `rate_limited`): the API key spent a rate-limit policy, or the network it calls from presented too many invalid keys. Wait `Retry-After` seconds before retrying; it takes priority over `RateLimit`.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit": {
            "$ref": "#/components/headers/BulkRateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/BulkRateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "rate_limited",
                "message": "Too many requests",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "The request conflicts with the current state. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `conflict`: The request clashes with the current state, such as a duplicate domain or e-mail, a changed setup or a ranked list that changed. `details.code` names the case where there is one. Read fresh state, then decide.\n- `stale_version`: The record changed since the `expectedUpdatedAt` you sent. `details.currentUpdatedAt` is its current version. Read the record again and reapply your change.\n- `idempotency_key_reused`: The `Idempotency-Key` was used for a different command or body. Use a new key for a new command.\n- `request_in_flight`: The first request with this `Idempotency-Key` is still running. Retry shortly with the same key.\n- `company_profile_domain_conflict`: `websiteOnboarding.confirmProfile`: the website does not match the workspace’s company profile. Read fresh setup state, then confirm the profile with its own website.\n- `concurrent_run_limit`: `companyDiscoveryJobs.start` by an API key: the workspace already has as many discovery jobs queued or running as a key may start beside. `details.code` names the cap. Wait for a job to finish, or cancel one, then start again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "conflict",
                "message": "Conflict",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "Error": {
        "description": "The request failed. Branch on `error.code`; quote `error.requestId` to support.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "Not found",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "The caller may not do this. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `insufficient_scope`: The key lacks a scope the operation, or a parameter such as `include` or `rankingMode`, needs. `details.missingScopes` names it; `WWW-Authenticate` lists every scope the request needs. Create a key with the missing scope.\n- `permission_denied`: The key’s scopes admit the operation, but its permissions do not cover this request: replaying a create needs `crm:read`, and a key keeps the permissions its scopes had when it was created. The message names the scope. Create a new key with the scope the message names.\n- `beta_access_required`: The workspace is not admitted to the beta, which every write except `feedback.submit` needs. Contact support.\n- `not_a_member`: `websiteOnboarding.getAccess`: the key’s workspace has been deleted. Use a key of a live workspace.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "insufficient_scope",
                "message": "Forbidden",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "The request failed on the server. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `internal_error`: Something failed on our side. Retry later; reuse a command’s idempotency key.\n- `response_contract_violation`: Our answer broke its own schema, so it was withheld. `details.committed` says whether a change was saved. If `committed` is true, read the state instead of resending. Quote the request id.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "internal_error",
                "message": "Internal Server Error",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Nothing was found. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `not_found`: No such record in your workspace. A path that is not part of the public API also answers `404`. Check the id and the path.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "Not Found",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "NotModified": {
        "description": "Not modified: the answer is still the one whose `ETag` the request sent in `If-None-Match`. There is no body; use the copy you kept.",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/ETag"
          },
          "Cache-Control": {
            "$ref": "#/components/headers/CacheControl"
          }
        }
      },
      "PayloadTooLarge": {
        "description": "The body is over the size limit. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `payload_too_large`: The body is over the size limit, currently 1 MiB. Send a smaller body.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "payload_too_large",
                "message": "Payload Too Large",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests (`error.code` is `rate_limited`): the API key spent a rate-limit policy, or the network it calls from presented too many invalid keys. Wait `Retry-After` seconds before retrying; it takes priority over `RateLimit`.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "rate_limited",
                "message": "Too many requests",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "RunRateLimited": {
        "description": "Too many requests (`error.code` is `rate_limited`): the API key spent a rate-limit policy, or the network it calls from presented too many invalid keys. Wait `Retry-After` seconds before retrying; it takes priority over `RateLimit`.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RunRateLimit"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RunRateLimitPolicy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "rate_limited",
                "message": "Too many requests",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The service is briefly unavailable. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `service_unavailable`: A create ran out of time, or the service is briefly unavailable. Retry later with the same idempotency key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "service_unavailable",
                "message": "Service Unavailable",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The request is not authenticated. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `unauthenticated`: The key is missing, invalid, expired or revoked. Send a valid, unexpired key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "unauthenticated",
                "message": "Unauthorized",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "UnprocessableContent": {
        "description": "The request cannot be used as sent. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `validation_error`: The request does not match the operation’s schema, a field names something that does not exist, or a value cannot be used, such as an id that is not a UUID, a date outside the years 0001–9999 in a filter, or an edited cursor. See `details`. Fix the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "validation_error",
                "message": "Unprocessable Entity",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "The body’s media type cannot be read. Branch on `error.code`; quote `error.requestId` to support.\n\nThe codes a public operation answers with it:\n\n- `unsupported_media_type`: The `Content-Type` header is not a media type. Send `Content-Type: application/json`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": "unsupported_media_type",
                "message": "Unsupported Media Type",
                "requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
              }
            }
          }
        }
      }
    },
    "schemas": {
      "AgentColumnCell": {
        "type": "object",
        "properties": {
          "definitionId": {
            "type": "string",
            "description": "The column’s id."
          },
          "fieldId": {
            "type": "string",
            "description": "The custom field the column writes its value into."
          },
          "status": {
            "type": "string",
            "enum": [
              "empty",
              "queued",
              "running",
              "succeeded",
              "failed",
              "skipped",
              "stale"
            ],
            "description": "Where the cell stands: `empty`, `queued`, `running`, `succeeded`, `failed`, `skipped` or `stale`."
          },
          "lastErrorCode": {
            "description": "Why the last attempt failed, as a stable code; `null` when it did not.",
            "type": [
              "string",
              "null"
            ]
          },
          "lastAppliedAt": {
            "description": "When a value was last written into the field, as an ISO 8601 instant.",
            "type": [
              "string",
              "null"
            ]
          },
          "latestRunId": {
            "description": "The run that last worked on this cell; `null` when none has.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "definitionId",
          "fieldId",
          "status",
          "lastErrorCode",
          "lastAppliedAt",
          "latestRunId"
        ],
        "additionalProperties": true,
        "description": "The state of one agent column for one record. The value is in its field."
      },
      "BulkCandidateActionRequest": {
        "type": "object",
        "properties": {
          "candidateIds": {
            "description": "The candidates to act on, 1 to 200. A repeated id is acted on once.",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
            }
          }
        },
        "required": [
          "candidateIds"
        ],
        "additionalProperties": false,
        "description": "The candidates a bulk action acts on."
      },
      "BulkCandidateItemFailed": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "ok": {
            "type": "boolean",
            "const": false,
            "description": "The action was not done; nothing changed for this item."
          },
          "code": {
            "type": "string",
            "description": "Why it failed, for example `invalid_status` or `company_candidate_not_found`; more may come."
          },
          "message": {
            "type": "string",
            "description": "A readable reason."
          }
        },
        "required": [
          "id",
          "ok",
          "code",
          "message"
        ],
        "additionalProperties": true,
        "description": "A bulk item that failed on its own."
      },
      "BulkCandidateItemSucceeded": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "ok": {
            "type": "boolean",
            "const": true,
            "description": "The action was done."
          }
        },
        "required": [
          "id",
          "ok"
        ],
        "additionalProperties": true,
        "description": "A bulk item that was done."
      },
      "BulkCandidateResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BulkCandidateItemSucceeded"
                },
                {
                  "$ref": "#/components/schemas/BulkCandidateItemFailed"
                }
              ]
            },
            "description": "One result per distinct candidate, in request order."
          },
          "succeeded": {
            "type": "number",
            "description": "How many items were done."
          },
          "failed": {
            "type": "number",
            "description": "How many items failed."
          }
        },
        "required": [
          "results",
          "succeeded",
          "failed"
        ],
        "additionalProperties": true,
        "description": "The per-item result of a bulk action."
      },
      "BulkItemFailed": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The item’s position in `items`, from 0."
          },
          "outcome": {
            "type": "string",
            "const": "failed",
            "description": "The item was not written; nothing changed for it."
          },
          "error": {
            "description": "Why, as the error envelope says it: the `code`, `message` and `details` the single call would have answered for this item, and the request’s `requestId`.",
            "$ref": "#/components/schemas/ErrorInfo"
          }
        },
        "required": [
          "index",
          "outcome",
          "error"
        ],
        "additionalProperties": true,
        "description": "A bulk item that failed on its own."
      },
      "BulkPromoteCollision": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Why the promotion stopped: `domain_collision` or `canonical_conflict` today; more may come."
          },
          "candidates": {
            "description": "For `domain_collision`: the workspace companies with the same domain. Promote the candidate alone with `targetCompanyId` to link it to one of them.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkPromoteCollisionCompany"
            }
          },
          "companyId": {
            "description": "For `canonical_conflict`: the workspace company, already linked elsewhere.",
            "type": "string"
          },
          "linkedCanonicalCompanyId": {
            "description": "For `canonical_conflict`: the other Enrik company it is linked to.",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "additionalProperties": true,
        "description": "Why a candidate could not be promoted without a choice, and the choices."
      },
      "BulkPromoteCollisionCompany": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "A workspace company with the same domain."
          },
          "name": {
            "type": "string",
            "description": "Its name."
          },
          "canonicalCompanyId": {
            "description": "The Enrik company it is already linked to; `null` when it is linked to none.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "companyId",
          "name",
          "canonicalCompanyId"
        ],
        "additionalProperties": true,
        "description": "A workspace company the candidate collides with."
      },
      "BulkPromoteCounts": {
        "type": "object",
        "properties": {
          "promoted": {
            "type": "number",
            "description": "Items promoted to a new company."
          },
          "already_in_workspace": {
            "type": "number",
            "description": "Items whose company the workspace already had."
          },
          "linked_existing": {
            "type": "number",
            "description": "Items linked to a chosen company; 0 in bulk."
          },
          "needs_collision_resolution": {
            "type": "number",
            "description": "Items that need a choice."
          },
          "failed": {
            "type": "number",
            "description": "Items that failed."
          },
          "skipped": {
            "type": "number",
            "description": "Items promoted before."
          }
        },
        "required": [
          "promoted",
          "already_in_workspace",
          "linked_existing",
          "needs_collision_resolution",
          "failed",
          "skipped"
        ],
        "additionalProperties": true,
        "description": "How many items ended in each outcome."
      },
      "BulkPromoteItemAlreadyInWorkspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "outcome": {
            "type": "string",
            "const": "already_in_workspace",
            "description": "The workspace already had this company; the candidate was linked to it."
          },
          "workspaceCompanyId": {
            "type": "string",
            "description": "The workspace company the candidate now points at."
          }
        },
        "required": [
          "id",
          "outcome",
          "workspaceCompanyId"
        ],
        "additionalProperties": true,
        "description": "A candidate whose company the workspace already had."
      },
      "BulkPromoteItemFailed": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "outcome": {
            "type": "string",
            "const": "failed",
            "description": "The promotion failed; nothing was created."
          },
          "code": {
            "type": "string",
            "description": "Why it failed, for example `invalid_status` or `company_candidate_not_found`; more may come."
          },
          "message": {
            "type": "string",
            "description": "A readable reason."
          }
        },
        "required": [
          "id",
          "outcome",
          "code",
          "message"
        ],
        "additionalProperties": true,
        "description": "A candidate whose promotion failed."
      },
      "BulkPromoteItemLinkedExisting": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "outcome": {
            "type": "string",
            "const": "linked_existing",
            "description": "The candidate was linked to a chosen company. Single promote only."
          },
          "workspaceCompanyId": {
            "type": "string",
            "description": "The workspace company the candidate now points at."
          }
        },
        "required": [
          "id",
          "outcome",
          "workspaceCompanyId"
        ],
        "additionalProperties": true,
        "description": "A candidate linked to a chosen company."
      },
      "BulkPromoteItemNeedsCollisionResolution": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "outcome": {
            "type": "string",
            "const": "needs_collision_resolution",
            "description": "The company collides with one in the workspace; nothing was created."
          },
          "collision": {
            "description": "The collision and the ways to resolve it.",
            "$ref": "#/components/schemas/BulkPromoteCollision"
          }
        },
        "required": [
          "id",
          "outcome",
          "collision"
        ],
        "additionalProperties": true,
        "description": "A candidate whose promotion needs a choice."
      },
      "BulkPromoteItemPromoted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "outcome": {
            "type": "string",
            "const": "promoted",
            "description": "A new workspace company was created."
          },
          "workspaceCompanyId": {
            "type": "string",
            "description": "The workspace company the candidate now points at."
          }
        },
        "required": [
          "id",
          "outcome",
          "workspaceCompanyId"
        ],
        "additionalProperties": true,
        "description": "A candidate promoted to a new company."
      },
      "BulkPromoteItemSkipped": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate, as the request named it."
          },
          "outcome": {
            "type": "string",
            "const": "skipped",
            "description": "The candidate was already promoted or linked; nothing was done."
          },
          "workspaceCompanyId": {
            "description": "The company the candidate already points at.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "outcome",
          "workspaceCompanyId"
        ],
        "additionalProperties": true,
        "description": "A candidate promoted before."
      },
      "BulkPromoteResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BulkPromoteItemPromoted"
                },
                {
                  "$ref": "#/components/schemas/BulkPromoteItemAlreadyInWorkspace"
                },
                {
                  "$ref": "#/components/schemas/BulkPromoteItemLinkedExisting"
                },
                {
                  "$ref": "#/components/schemas/BulkPromoteItemSkipped"
                },
                {
                  "$ref": "#/components/schemas/BulkPromoteItemNeedsCollisionResolution"
                },
                {
                  "$ref": "#/components/schemas/BulkPromoteItemFailed"
                }
              ]
            },
            "description": "One result per distinct candidate, in request order."
          },
          "counts": {
            "description": "The tallies, one per outcome.",
            "$ref": "#/components/schemas/BulkPromoteCounts"
          }
        },
        "required": [
          "results",
          "counts"
        ],
        "additionalProperties": true,
        "description": "The per-item result of a bulk promotion."
      },
      "CandidateContextualRanking": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether a ranked list (`rankingMode`) can be asked for in this workspace."
          }
        },
        "required": [
          "available"
        ],
        "additionalProperties": true,
        "description": "Whether the candidate list can be ranked against an ICP profile or a brief."
      },
      "CandidateQualitySummary": {
        "type": "object",
        "properties": {
          "discoveryJobId": {
            "type": "string",
            "description": "The discovery job summarised."
          },
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many candidates the job has."
          },
          "tierCounts": {
            "description": "The candidates in each review-priority band.",
            "$ref": "#/components/schemas/CandidateTierCounts"
          },
          "scoredCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many candidates are scored."
          },
          "verifiedDomainCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many candidates have a verified website."
          },
          "duplicateCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many candidates duplicate something already known."
          },
          "promotedCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many candidates were promoted to companies."
          },
          "promotableCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many candidates could still be promoted."
          },
          "averageReviewPriorityScore": {
            "description": "The average review priority of the scored candidates; `null` when none is.",
            "type": [
              "number",
              "null"
            ]
          },
          "averageIcpFitScore": {
            "description": "The average ICP fit of the scored candidates; `null` when none is.",
            "type": [
              "number",
              "null"
            ]
          },
          "averageEvidenceScore": {
            "description": "The average evidence score of the scored candidates; `null` when none is.",
            "type": [
              "number",
              "null"
            ]
          },
          "label": {
            "type": "string",
            "enum": [
              "excellent",
              "good",
              "mixed",
              "low_quality",
              "insufficient_data"
            ],
            "description": "A one-word verdict on the source’s quality."
          }
        },
        "required": [
          "discoveryJobId",
          "total",
          "tierCounts",
          "scoredCount",
          "verifiedDomainCount",
          "duplicateCount",
          "promotedCount",
          "promotableCount",
          "averageReviewPriorityScore",
          "averageIcpFitScore",
          "averageEvidenceScore",
          "label"
        ],
        "additionalProperties": true,
        "description": "How good a discovery job’s candidates are, computed when asked."
      },
      "CandidateRecommendation": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "current",
              "stale",
              "withheld",
              "missing"
            ],
            "description": "Whether the recommendation is `current`, `stale`, `missing` (never evaluated) or `withheld`."
          },
          "staleReasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "result_expired",
                "input_changed",
                "rights_withheld",
                "dismissed",
                "snoozed",
                "account_context_changed",
                "policy_incompatible",
                "brief_unavailable"
              ]
            },
            "description": "Why a stale recommendation is stale; empty otherwise."
          },
          "snapshotId": {
            "description": "The evaluation the recommendation comes from; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "qualified",
                  "review_needed",
                  "currently_unsatisfied",
                  "suppressed_excluded"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The eligibility tier; `null` when there is none."
          },
          "timingCategory": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "supported_event",
                  "condition_observed",
                  "outside_window",
                  "unknown",
                  "not_configured"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "What the timing evidence says; `null` when there is none."
          },
          "effectiveTimingGroup": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "supported_now",
                  "condition_observed",
                  "unknown",
                  "outside_window"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The timing group the list sorts by; `null` when there is none."
          },
          "fitScore": {
            "description": "The fit score, 0 to 100; `null` when there is none.",
            "type": [
              "number",
              "null"
            ]
          },
          "fitCoverage": {
            "description": "How much of the profile could be assessed, 0 to 1; `null` when there is none.",
            "type": [
              "number",
              "null"
            ]
          },
          "validUntil": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the recommendation expires; `null` when there is none."
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "icp_fit_satisfied",
                "signal_required_passed",
                "signal_boost_passed",
                "signal_boost_failed",
                "signal_boost_unknown",
                "signals_not_configured",
                "icp_required_uncertain",
                "icp_insufficient_coverage",
                "icp_required_partial",
                "signal_required_unknown",
                "signal_exclude_unknown",
                "icp_required_failed",
                "signal_required_failed",
                "icp_hard_exclusion_verified",
                "signal_exclude_passed",
                "commercial_dismissal",
                "icp_review_suppression",
                "snoozed"
              ]
            },
            "description": "Every reason behind the tier."
          }
        },
        "required": [
          "state",
          "staleReasons",
          "snapshotId",
          "tier",
          "timingCategory",
          "effectiveTimingGroup",
          "fitScore",
          "fitCoverage",
          "validUntil",
          "reasons"
        ],
        "additionalProperties": true,
        "description": "Where a candidate stands in a ranked list, and why."
      },
      "CandidateScoreBreakdown": {
        "type": "object",
        "properties": {
          "candidateQuality": {
            "description": "How complete and usable the record is.",
            "$ref": "#/components/schemas/CandidateScoreBreakdownEntry"
          },
          "icpFit": {
            "description": "How well the candidate fits the ICP profile.",
            "$ref": "#/components/schemas/CandidateScoreBreakdownEntry"
          },
          "evidence": {
            "description": "How well the fit is supported by evidence.",
            "$ref": "#/components/schemas/CandidateScoreBreakdownEntry"
          },
          "sourceConfidence": {
            "description": "How far the source can be trusted.",
            "$ref": "#/components/schemas/CandidateScoreBreakdownEntry"
          }
        },
        "required": [
          "candidateQuality",
          "icpFit",
          "evidence",
          "sourceConfidence"
        ],
        "additionalProperties": true,
        "description": "The four scored dimensions of a candidate."
      },
      "CandidateScoreBreakdownEntry": {
        "type": "object",
        "properties": {
          "score": {
            "description": "The score, 0 to 100; `null` when it could not be given.",
            "type": [
              "number",
              "null"
            ]
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Why the score is what it is, one reason per entry."
          }
        },
        "required": [
          "score",
          "reasons"
        ],
        "additionalProperties": true,
        "description": "One scored dimension of a candidate."
      },
      "CandidateScorePenalty": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "What the penalty is for."
          },
          "points": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many points it took off the review priority."
          }
        },
        "required": [
          "type",
          "points"
        ],
        "additionalProperties": true,
        "description": "A penalty applied while scoring a candidate."
      },
      "CandidateScoringMetadata": {
        "type": "object",
        "properties": {
          "scoringMode": {
            "type": "string",
            "const": "deterministic",
            "description": "How the candidate was scored."
          },
          "scoringVersion": {
            "type": "string",
            "description": "The version of the scoring algorithm."
          },
          "icpProfileId": {
            "description": "The ICP profile scored against; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileVersionId": {
            "description": "The ICP profile version scored against; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "discoveryBriefId": {
            "description": "The discovery brief scored against; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "inputs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The inputs the score was computed from."
          },
          "scoreBreakdown": {
            "description": "The score of each dimension, with reasons.",
            "$ref": "#/components/schemas/CandidateScoreBreakdown"
          },
          "penalties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CandidateScorePenalty"
            },
            "description": "The penalties that were applied."
          }
        },
        "required": [
          "scoringMode",
          "scoringVersion",
          "icpProfileId",
          "icpProfileVersionId",
          "discoveryBriefId",
          "inputs",
          "scoreBreakdown",
          "penalties"
        ],
        "additionalProperties": true,
        "description": "How a candidate’s scores were reached."
      },
      "CandidateTierCounts": {
        "type": "object",
        "properties": {
          "high_priority": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Candidates in the high-priority band."
          },
          "medium_priority": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Candidates in the medium-priority band."
          },
          "low_priority": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Candidates in the low-priority band."
          },
          "reject_likely": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Candidates likely to be rejected."
          },
          "insufficient_data": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Candidates with too little data to band."
          }
        },
        "required": [
          "high_priority",
          "medium_priority",
          "low_priority",
          "reject_likely",
          "insufficient_data"
        ],
        "additionalProperties": true,
        "description": "How many candidates are in each review band."
      },
      "CommercialFocus": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "const": "manual",
            "description": "Stated by a person."
          },
          "offering": {
            "type": "string",
            "description": "What is being sold."
          },
          "useCase": {
            "type": "string",
            "description": "What the buyer uses it for."
          },
          "objective": {
            "type": "string",
            "description": "What the buyer wants to achieve."
          },
          "materialConstraints": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Constraints that decide a fit."
          },
          "unresolvedAssumptions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Assumptions not yet confirmed."
          },
          "statedBy": {
            "type": "string",
            "description": "Who stated it."
          }
        },
        "required": [
          "source",
          "offering",
          "useCase",
          "objective",
          "materialConstraints",
          "unresolvedAssumptions",
          "statedBy"
        ],
        "additionalProperties": true,
        "description": "What a brief is selling, and to whom."
      },
      "CommercialFocusManualRequest": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "const": "manual",
            "description": "Stated by a person."
          },
          "offering": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "What is being sold."
          },
          "useCase": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "What the buyer uses it for."
          },
          "objective": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "What the buyer wants to achieve."
          },
          "materialConstraints": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Constraints that decide a fit."
          },
          "unresolvedAssumptions": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Assumptions not yet confirmed."
          },
          "statedBy": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "Who stated it."
          }
        },
        "required": [
          "source",
          "offering",
          "useCase",
          "objective",
          "materialConstraints",
          "unresolvedAssumptions",
          "statedBy"
        ],
        "additionalProperties": false,
        "description": "A commercial focus a person stated."
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The company’s id."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the company belongs to."
          },
          "name": {
            "type": "string",
            "description": "The company’s name."
          },
          "domain": {
            "description": "The company’s domain, such as `example.com`.",
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The website address.",
            "type": [
              "string",
              "null"
            ]
          },
          "industry": {
            "description": "The industry.",
            "type": [
              "string",
              "null"
            ]
          },
          "employeeCount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How many people the company employs."
          },
          "annualRevenue": {
            "description": "The annual revenue, in euros.",
            "type": [
              "number",
              "null"
            ]
          },
          "address": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "The postal address, as it was given."
          },
          "linkedinUrl": {
            "description": "The LinkedIn page address.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "The country.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "description": "A short description of the company.",
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "description": "The city the company is based in.",
            "type": [
              "string",
              "null"
            ]
          },
          "legalForm": {
            "description": "The legal form, such as `GmbH`.",
            "type": [
              "string",
              "null"
            ]
          },
          "registerNumber": {
            "description": "The commercial register number.",
            "type": [
              "string",
              "null"
            ]
          },
          "buildingEnergyTags": {
            "description": "Building-energy markets the company is known to work in. Read-only.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The member who owns the company, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": [
              "string",
              "null"
            ]
          },
          "customFields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Custom field values, by the custom field’s key."
          },
          "canonicalCompanyId": {
            "description": "The Enrik Data company this one is linked to; `null` when it is not. Read-only.",
            "type": [
              "string",
              "null"
            ]
          },
          "enrikUpdateAvailable": {
            "description": "Whether Enrik Data has newer facts about the company than this workspace applied.",
            "type": "boolean"
          },
          "enrikSnapshotVersion": {
            "description": "The Enrik Data version the company’s facts were last taken from.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who created the company; `null` when an API key did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who changed the company last.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company last changed. Send it back as `expectedUpdatedAt` to update safely."
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the company was deleted; `null` while it is live."
          },
          "signalSummary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanySignalSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company’s active signals add up to: set on a list page, `null` elsewhere and for a company with no signals."
          },
          "enrichmentCells": {
            "description": "With `include=enrichmentCells`: each enrichment column’s state for this record, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/EnrichmentColumnCell"
            }
          },
          "formulaCells": {
            "description": "With `include=formulaCells`: each formula column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/FormulaColumnCell"
            }
          },
          "customApiCells": {
            "description": "With `include=customApiCells`: each custom-API column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/CustomApiColumnCell"
            }
          },
          "agentCells": {
            "description": "With `include=agentCells`: each agent column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/AgentColumnCell"
            }
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "domain",
          "website",
          "industry",
          "employeeCount",
          "annualRevenue",
          "address",
          "linkedinUrl",
          "country",
          "ownerUserId",
          "customFields",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "signalSummary"
        ],
        "additionalProperties": true,
        "description": "An organisation in your workspace."
      },
      "CompanyAttribution": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "enrik_crawler",
              "vies",
              "gleif",
              "zefix",
              "zefix_lindas",
              "theirstack",
              "creditsafe",
              "infobelpro",
              "hithorizons",
              "ipinfo_lite",
              "ipinfo"
            ],
            "description": "The source to credit."
          },
          "text": {
            "type": "string",
            "description": "The credit line, to be shown as it is."
          }
        },
        "required": [
          "provider",
          "text"
        ],
        "additionalProperties": true,
        "description": "A credit line a source requires wherever its facts are shown."
      },
      "CompanyBulkCreateRequest": {
        "type": "object",
        "properties": {
          "items": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyCreateRequest"
            },
            "description": "The companies, each as `companies.create` takes it, 1 to 100. The whole body is checked first: one malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written."
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "description": "Up to 100 companies to create."
      },
      "CompanyBulkItemWritten": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The item’s position in `items`, from 0."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ],
            "description": "`created` when the item created the company; `updated` when the fields sent were written to an existing one. A bulk upsert creates when no live company had the domain; a bulk create only creates and a bulk update only updates."
          },
          "company": {
            "description": "The company as it is now.",
            "$ref": "#/components/schemas/Company"
          }
        },
        "required": [
          "index",
          "outcome",
          "company"
        ],
        "additionalProperties": true,
        "description": "A company a bulk write created or updated."
      },
      "CompanyBulkUpdateItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The id of the company to change."
          },
          "name": {
            "description": "The new name, 1 to 120 characters. It cannot be cleared.",
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "domain": {
            "description": "The company’s domain, such as `example.com`; a URL is reduced to its host. Unique among the workspace’s live companies that are not linked to an Enrik company (`canonicalCompanyId` is `null`). A linked company is exempt: several linked companies may share a domain, also with one unlinked company. `null` clears it.",
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The website address; `null` clears it. `domain` is not derived from it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "industry": {
            "description": "The industry; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "employeeCount": {
            "description": "How many people the company employs; `null` clears it.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "annualRevenue": {
            "description": "The annual revenue in euros, with at most two decimals; `null` clears it.",
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 999999999999.99
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "description": "The postal address; it replaces the whole address. It is not read for `city` or `country`, which have their own fields.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "linkedinUrl": {
            "description": "The LinkedIn page address; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "description": "The country; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "description": "The description; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "description": "The city; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "legalForm": {
            "description": "The legal form; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "registerNumber": {
            "description": "The commercial register number; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The owning member, by user id; `null` clears it. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "customFields": {
            "description": "Custom field values to set, by key; the keys left out keep their values.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "expectedUpdatedAt": {
            "description": "The company’s `updatedAt` as you read it. When the company has changed since, the update is refused with 409 `stale_version` and nothing is written. Leave it out to apply the fields you send whatever changed meanwhile.",
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false,
        "description": "One company to change: its `id` and the fields `companies.update` takes. A field left out keeps its value."
      },
      "CompanyBulkUpdateRequest": {
        "type": "object",
        "properties": {
          "items": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyBulkUpdateItem"
            },
            "description": "The companies to change, each by its `id`, 1 to 100. The whole body is checked first: one malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written."
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "description": "Up to 100 companies to change."
      },
      "CompanyBulkUpsertRequest": {
        "type": "object",
        "properties": {
          "items": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyUpsertRequest"
            },
            "description": "The companies, each as `companies.upsert` takes it, 1 to 100. The whole body is checked first: one malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written."
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "description": "Up to 100 companies to create or update by domain."
      },
      "CompanyBulkWriteResult": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CompanyBulkItemWritten"
                },
                {
                  "$ref": "#/components/schemas/BulkItemFailed"
                }
              ]
            },
            "description": "One result per item, in the order of `items`."
          },
          "created": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many items created a record."
          },
          "updated": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many items updated a record."
          },
          "failed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many items failed."
          }
        },
        "required": [
          "results",
          "created",
          "updated",
          "failed"
        ],
        "additionalProperties": true,
        "description": "What a bulk write did, item by item."
      },
      "CompanyCandidate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate’s id."
          },
          "discoveryJobId": {
            "description": "The discovery job that found the candidate; `null` for one added by hand.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileId": {
            "description": "The ICP profile the candidate was found for; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileVersionId": {
            "description": "The exact version of that ICP profile; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "discoveryBriefId": {
            "description": "The discovery brief the candidate was found for; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "description": "The company’s name."
          },
          "normalizedName": {
            "type": "string",
            "description": "The name normalised for matching."
          },
          "website": {
            "description": "The company’s website; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "description": "The website’s domain; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "normalizedDomain": {
            "description": "The domain normalised for matching; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "The company’s country; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "What the company does; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "pasted_list",
              "manual_candidate",
              "user_provided_source_page",
              "controlled_source",
              "csv_upload",
              "enrik_data",
              "infobel_firmographics",
              "website_visit"
            ],
            "description": "The kind of source the candidate came from."
          },
          "sourceLabel": {
            "description": "A label for the source; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceUrl": {
            "description": "The page the candidate was found on; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceRowIndex": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The candidate’s row in a pasted or uploaded list; `null` otherwise."
          },
          "sourcePayload": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "What the source said about the candidate. Its shape depends on `sourceType`."
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "needs_review",
              "accepted",
              "rejected",
              "archived",
              "promoted",
              "linked_existing",
              "failed"
            ],
            "description": "Where the candidate is in review: new, accepted, rejected, promoted and so on."
          },
          "dedupeStatus": {
            "type": "string",
            "enum": [
              "unchecked",
              "no_match",
              "possible_duplicate",
              "existing_company_match",
              "duplicate_candidate"
            ],
            "description": "Whether the candidate matches a company or candidate the workspace already has."
          },
          "domainVerificationStatus": {
            "type": "string",
            "enum": [
              "unchecked",
              "verified",
              "inferred",
              "failed",
              "not_available"
            ],
            "description": "Whether the website was checked to belong to the company."
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "How confident the source is about the candidate."
          },
          "matchedCompanyId": {
            "description": "The workspace company the candidate matches; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "promotedCompanyId": {
            "description": "The company the candidate was promoted to; `null` until it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who added the candidate; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who last changed the candidate; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the candidate was added."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the candidate last changed."
          },
          "candidateQualityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How complete and usable the record is, 0 to 100; `null` until scored."
          },
          "candidateIcpFitScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How well the candidate fits the ICP profile, 0 to 100; `null` until scored."
          },
          "candidateEvidenceScore": {
            "description": "How well the fit is supported by evidence, 0 to 100; `null` until scored.",
            "type": [
              "number",
              "null"
            ]
          },
          "sourceConfidenceScore": {
            "description": "How far the source can be trusted, 0 to 100; `null` until scored.",
            "type": [
              "number",
              "null"
            ]
          },
          "reviewPriorityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How urgently the candidate should be reviewed, 0 to 100; `null` until scored."
          },
          "reviewPriorityTier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "high_priority",
                  "medium_priority",
                  "low_priority",
                  "reject_likely",
                  "insufficient_data"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The review-priority band; `null` until scored."
          },
          "recommendedAction": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "promote_candidate",
                  "review_manually",
                  "verify_domain",
                  "possible_duplicate_review",
                  "reject_candidate",
                  "insufficient_data"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "What to do with the candidate next; `null` until scored."
          },
          "scoringStatus": {
            "type": "string",
            "enum": [
              "unscored",
              "scored",
              "failed",
              "stale"
            ],
            "description": "Whether the candidate is unscored, scored, failed to score, or stale."
          },
          "scoredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the candidate was scored; `null` until."
          },
          "scoringVersion": {
            "description": "The scoring algorithm’s version; `null` until scored.",
            "type": [
              "string",
              "null"
            ]
          },
          "scoringMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CandidateScoringMetadata"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the scores were reached; `null` until scored."
          },
          "canonicalCompanyId": {
            "description": "The company in Enrik’s company data the candidate is; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "entityCompanyId": {
            "description": "The registered entity behind the candidate; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceProfileStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "enriched",
                  "registry_only",
                  "profile_fetch_failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How complete the company profile from Enrik’s data is; `null` for other sources."
          },
          "workspaceMatchStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "already_linked"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`already_linked` when the workspace already has the company; `null` otherwise."
          },
          "workspaceCompanyId": {
            "description": "The workspace company already linked to it; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "enrikSnapshotVersion": {
            "description": "The version of Enrik’s data the candidate came from; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "profileFetchedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the company profile was fetched; `null` when it was not."
          },
          "retrievalQuery": {
            "description": "The search that found the candidate; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "retrievalReasons": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the search returned the candidate; `null` for other sources."
          }
        },
        "required": [
          "id",
          "discoveryJobId",
          "icpProfileId",
          "icpProfileVersionId",
          "discoveryBriefId",
          "name",
          "normalizedName",
          "website",
          "domain",
          "normalizedDomain",
          "country",
          "description",
          "sourceType",
          "sourceLabel",
          "sourceUrl",
          "sourceRowIndex",
          "sourcePayload",
          "status",
          "dedupeStatus",
          "domainVerificationStatus",
          "confidence",
          "matchedCompanyId",
          "promotedCompanyId",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt",
          "candidateQualityScore",
          "candidateIcpFitScore",
          "candidateEvidenceScore",
          "sourceConfidenceScore",
          "reviewPriorityScore",
          "reviewPriorityTier",
          "recommendedAction",
          "scoringStatus",
          "scoredAt",
          "scoringVersion",
          "scoringMetadata",
          "canonicalCompanyId",
          "entityCompanyId",
          "sourceProfileStatus",
          "workspaceMatchStatus",
          "workspaceCompanyId",
          "enrikSnapshotVersion",
          "profileFetchedAt",
          "retrievalQuery",
          "retrievalReasons"
        ],
        "additionalProperties": true,
        "description": "A company a discovery job found (or a user added), waiting for review."
      },
      "CompanyCandidateDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate’s id."
          },
          "discoveryJobId": {
            "description": "The discovery job that found the candidate; `null` for one added by hand.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileId": {
            "description": "The ICP profile the candidate was found for; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileVersionId": {
            "description": "The exact version of that ICP profile; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "discoveryBriefId": {
            "description": "The discovery brief the candidate was found for; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "description": "The company’s name."
          },
          "normalizedName": {
            "type": "string",
            "description": "The name normalised for matching."
          },
          "website": {
            "description": "The company’s website; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "description": "The website’s domain; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "normalizedDomain": {
            "description": "The domain normalised for matching; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "The company’s country; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "What the company does; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "pasted_list",
              "manual_candidate",
              "user_provided_source_page",
              "controlled_source",
              "csv_upload",
              "enrik_data",
              "infobel_firmographics",
              "website_visit"
            ],
            "description": "The kind of source the candidate came from."
          },
          "sourceLabel": {
            "description": "A label for the source; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceUrl": {
            "description": "The page the candidate was found on; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceRowIndex": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The candidate’s row in a pasted or uploaded list; `null` otherwise."
          },
          "sourcePayload": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "What the source said about the candidate. Its shape depends on `sourceType`."
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "needs_review",
              "accepted",
              "rejected",
              "archived",
              "promoted",
              "linked_existing",
              "failed"
            ],
            "description": "Where the candidate is in review: new, accepted, rejected, promoted and so on."
          },
          "dedupeStatus": {
            "type": "string",
            "enum": [
              "unchecked",
              "no_match",
              "possible_duplicate",
              "existing_company_match",
              "duplicate_candidate"
            ],
            "description": "Whether the candidate matches a company or candidate the workspace already has."
          },
          "domainVerificationStatus": {
            "type": "string",
            "enum": [
              "unchecked",
              "verified",
              "inferred",
              "failed",
              "not_available"
            ],
            "description": "Whether the website was checked to belong to the company."
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "How confident the source is about the candidate."
          },
          "matchedCompanyId": {
            "description": "The workspace company the candidate matches; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "promotedCompanyId": {
            "description": "The company the candidate was promoted to; `null` until it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who added the candidate; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who last changed the candidate; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the candidate was added."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the candidate last changed."
          },
          "candidateQualityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How complete and usable the record is, 0 to 100; `null` until scored."
          },
          "candidateIcpFitScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How well the candidate fits the ICP profile, 0 to 100; `null` until scored."
          },
          "candidateEvidenceScore": {
            "description": "How well the fit is supported by evidence, 0 to 100; `null` until scored.",
            "type": [
              "number",
              "null"
            ]
          },
          "sourceConfidenceScore": {
            "description": "How far the source can be trusted, 0 to 100; `null` until scored.",
            "type": [
              "number",
              "null"
            ]
          },
          "reviewPriorityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How urgently the candidate should be reviewed, 0 to 100; `null` until scored."
          },
          "reviewPriorityTier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "high_priority",
                  "medium_priority",
                  "low_priority",
                  "reject_likely",
                  "insufficient_data"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The review-priority band; `null` until scored."
          },
          "recommendedAction": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "promote_candidate",
                  "review_manually",
                  "verify_domain",
                  "possible_duplicate_review",
                  "reject_candidate",
                  "insufficient_data"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "What to do with the candidate next; `null` until scored."
          },
          "scoringStatus": {
            "type": "string",
            "enum": [
              "unscored",
              "scored",
              "failed",
              "stale"
            ],
            "description": "Whether the candidate is unscored, scored, failed to score, or stale."
          },
          "scoredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the candidate was scored; `null` until."
          },
          "scoringVersion": {
            "description": "The scoring algorithm’s version; `null` until scored.",
            "type": [
              "string",
              "null"
            ]
          },
          "scoringMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CandidateScoringMetadata"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the scores were reached; `null` until scored."
          },
          "canonicalCompanyId": {
            "description": "The company in Enrik’s company data the candidate is; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "entityCompanyId": {
            "description": "The registered entity behind the candidate; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceProfileStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "enriched",
                  "registry_only",
                  "profile_fetch_failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How complete the company profile from Enrik’s data is; `null` for other sources."
          },
          "workspaceMatchStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "already_linked"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`already_linked` when the workspace already has the company; `null` otherwise."
          },
          "workspaceCompanyId": {
            "description": "The workspace company already linked to it; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "enrikSnapshotVersion": {
            "description": "The version of Enrik’s data the candidate came from; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "profileFetchedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the company profile was fetched; `null` when it was not."
          },
          "retrievalQuery": {
            "description": "The search that found the candidate; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "retrievalReasons": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the search returned the candidate; `null` for other sources."
          },
          "reviewItemId": {
            "description": "The candidate’s review item, to open it in Review; `null` without one, or without `review_items:read`, which an API key never has.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "discoveryJobId",
          "icpProfileId",
          "icpProfileVersionId",
          "discoveryBriefId",
          "name",
          "normalizedName",
          "website",
          "domain",
          "normalizedDomain",
          "country",
          "description",
          "sourceType",
          "sourceLabel",
          "sourceUrl",
          "sourceRowIndex",
          "sourcePayload",
          "status",
          "dedupeStatus",
          "domainVerificationStatus",
          "confidence",
          "matchedCompanyId",
          "promotedCompanyId",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt",
          "candidateQualityScore",
          "candidateIcpFitScore",
          "candidateEvidenceScore",
          "sourceConfidenceScore",
          "reviewPriorityScore",
          "reviewPriorityTier",
          "recommendedAction",
          "scoringStatus",
          "scoredAt",
          "scoringVersion",
          "scoringMetadata",
          "canonicalCompanyId",
          "entityCompanyId",
          "sourceProfileStatus",
          "workspaceMatchStatus",
          "workspaceCompanyId",
          "enrikSnapshotVersion",
          "profileFetchedAt",
          "retrievalQuery",
          "retrievalReasons"
        ],
        "additionalProperties": true,
        "description": "A company candidate, with its review item."
      },
      "CompanyCandidateList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyCandidateListItem"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          },
          "contextualRanking": {
            "description": "Whether a ranked list can be asked for.",
            "$ref": "#/components/schemas/CandidateContextualRanking"
          }
        },
        "required": [
          "data",
          "pageInfo",
          "contextualRanking"
        ],
        "additionalProperties": true,
        "description": "A page of candidates: by review priority, by the `sort` asked for, or ranked (`rankingMode`)."
      },
      "CompanyCandidateListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The candidate’s id."
          },
          "discoveryJobId": {
            "description": "The discovery job that found the candidate; `null` for one added by hand.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileId": {
            "description": "The ICP profile the candidate was found for; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileVersionId": {
            "description": "The exact version of that ICP profile; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "discoveryBriefId": {
            "description": "The discovery brief the candidate was found for; `null` when there was none.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "description": "The company’s name."
          },
          "normalizedName": {
            "type": "string",
            "description": "The name normalised for matching."
          },
          "website": {
            "description": "The company’s website; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "description": "The website’s domain; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "normalizedDomain": {
            "description": "The domain normalised for matching; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "The company’s country; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "What the company does; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "pasted_list",
              "manual_candidate",
              "user_provided_source_page",
              "controlled_source",
              "csv_upload",
              "enrik_data",
              "infobel_firmographics",
              "website_visit"
            ],
            "description": "The kind of source the candidate came from."
          },
          "sourceLabel": {
            "description": "A label for the source; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceUrl": {
            "description": "The page the candidate was found on; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceRowIndex": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The candidate’s row in a pasted or uploaded list; `null` otherwise."
          },
          "sourcePayload": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "What the source said about the candidate. Its shape depends on `sourceType`."
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "needs_review",
              "accepted",
              "rejected",
              "archived",
              "promoted",
              "linked_existing",
              "failed"
            ],
            "description": "Where the candidate is in review: new, accepted, rejected, promoted and so on."
          },
          "dedupeStatus": {
            "type": "string",
            "enum": [
              "unchecked",
              "no_match",
              "possible_duplicate",
              "existing_company_match",
              "duplicate_candidate"
            ],
            "description": "Whether the candidate matches a company or candidate the workspace already has."
          },
          "domainVerificationStatus": {
            "type": "string",
            "enum": [
              "unchecked",
              "verified",
              "inferred",
              "failed",
              "not_available"
            ],
            "description": "Whether the website was checked to belong to the company."
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "How confident the source is about the candidate."
          },
          "matchedCompanyId": {
            "description": "The workspace company the candidate matches; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "promotedCompanyId": {
            "description": "The company the candidate was promoted to; `null` until it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who added the candidate; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who last changed the candidate; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the candidate was added."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the candidate last changed."
          },
          "candidateQualityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How complete and usable the record is, 0 to 100; `null` until scored."
          },
          "candidateIcpFitScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How well the candidate fits the ICP profile, 0 to 100; `null` until scored."
          },
          "candidateEvidenceScore": {
            "description": "How well the fit is supported by evidence, 0 to 100; `null` until scored.",
            "type": [
              "number",
              "null"
            ]
          },
          "sourceConfidenceScore": {
            "description": "How far the source can be trusted, 0 to 100; `null` until scored.",
            "type": [
              "number",
              "null"
            ]
          },
          "reviewPriorityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How urgently the candidate should be reviewed, 0 to 100; `null` until scored."
          },
          "reviewPriorityTier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "high_priority",
                  "medium_priority",
                  "low_priority",
                  "reject_likely",
                  "insufficient_data"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The review-priority band; `null` until scored."
          },
          "recommendedAction": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "promote_candidate",
                  "review_manually",
                  "verify_domain",
                  "possible_duplicate_review",
                  "reject_candidate",
                  "insufficient_data"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "What to do with the candidate next; `null` until scored."
          },
          "scoringStatus": {
            "type": "string",
            "enum": [
              "unscored",
              "scored",
              "failed",
              "stale"
            ],
            "description": "Whether the candidate is unscored, scored, failed to score, or stale."
          },
          "scoredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the candidate was scored; `null` until."
          },
          "scoringVersion": {
            "description": "The scoring algorithm’s version; `null` until scored.",
            "type": [
              "string",
              "null"
            ]
          },
          "scoringMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CandidateScoringMetadata"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the scores were reached; `null` until scored."
          },
          "canonicalCompanyId": {
            "description": "The company in Enrik’s company data the candidate is; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "entityCompanyId": {
            "description": "The registered entity behind the candidate; `null` when unknown.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceProfileStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "enriched",
                  "registry_only",
                  "profile_fetch_failed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How complete the company profile from Enrik’s data is; `null` for other sources."
          },
          "workspaceMatchStatus": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "already_linked"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`already_linked` when the workspace already has the company; `null` otherwise."
          },
          "workspaceCompanyId": {
            "description": "The workspace company already linked to it; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "enrikSnapshotVersion": {
            "description": "The version of Enrik’s data the candidate came from; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "profileFetchedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the company profile was fetched; `null` when it was not."
          },
          "retrievalQuery": {
            "description": "The search that found the candidate; `null` for other sources.",
            "type": [
              "string",
              "null"
            ]
          },
          "retrievalReasons": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the search returned the candidate; `null` for other sources."
          },
          "recommendation": {
            "description": "Where the candidate stands; present only in a ranked list (`rankingMode`).",
            "$ref": "#/components/schemas/CandidateRecommendation"
          },
          "customerStatus": {
            "description": "Whether the company is a customer; present only in a ranked list, `null` for a candidate.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "customer",
                  "not_customer"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "salesWorkState": {
            "description": "Whether sales work is under way; present only in a ranked list, `null` for a candidate.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_sales_work",
                  "not_in_sales_work"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "snoozeUntil": {
            "description": "Until when the candidate is snoozed; present only in a ranked list.",
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "discoveryJobId",
          "icpProfileId",
          "icpProfileVersionId",
          "discoveryBriefId",
          "name",
          "normalizedName",
          "website",
          "domain",
          "normalizedDomain",
          "country",
          "description",
          "sourceType",
          "sourceLabel",
          "sourceUrl",
          "sourceRowIndex",
          "sourcePayload",
          "status",
          "dedupeStatus",
          "domainVerificationStatus",
          "confidence",
          "matchedCompanyId",
          "promotedCompanyId",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt",
          "candidateQualityScore",
          "candidateIcpFitScore",
          "candidateEvidenceScore",
          "sourceConfidenceScore",
          "reviewPriorityScore",
          "reviewPriorityTier",
          "recommendedAction",
          "scoringStatus",
          "scoredAt",
          "scoringVersion",
          "scoringMetadata",
          "canonicalCompanyId",
          "entityCompanyId",
          "sourceProfileStatus",
          "workspaceMatchStatus",
          "workspaceCompanyId",
          "enrikSnapshotVersion",
          "profileFetchedAt",
          "retrievalQuery",
          "retrievalReasons"
        ],
        "additionalProperties": true,
        "description": "A candidate in the candidate list. In a ranked list it also says where it stands and why."
      },
      "CompanyCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The company’s name, 1 to 120 characters. Required."
          },
          "domain": {
            "description": "The company’s domain, such as `example.com`; a URL is reduced to its host. Unique among the workspace’s live companies that are not linked to an Enrik company (`canonicalCompanyId` is `null`). A linked company is exempt: several linked companies may share a domain, also with one unlinked company.",
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The website address; blank means none. `domain` is not derived from it.",
            "type": "string",
            "maxLength": 2048
          },
          "industry": {
            "description": "The industry, at most 255 characters.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "employeeCount": {
            "description": "How many people the company employs.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "annualRevenue": {
            "description": "The annual revenue in euros, with at most two decimals.",
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 999999999999.99
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "default": {},
            "description": "The postal address, as an object of your choosing. It is stored as given and is not read for `city` or `country`, which have their own fields.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "linkedinUrl": {
            "description": "The LinkedIn page address; blank means none.",
            "type": "string",
            "maxLength": 2048
          },
          "country": {
            "description": "The country, as free text; blank means none.",
            "type": "string",
            "maxLength": 120
          },
          "summary": {
            "description": "A short description of the company.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "description": "The city the company is based in.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "legalForm": {
            "description": "The legal form, such as `GmbH`.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "registerNumber": {
            "description": "The commercial register number.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The member who owns the company, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "customFields": {
            "default": {},
            "description": "Custom field values by key, checked against the workspace’s company custom fields.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false,
        "description": "A new company. Only `name` is required."
      },
      "CompanyCreatedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "company.created",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company was created, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/CompanyEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a company is created, in the app, through the API, by an import or an automation. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "CompanyDeletedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "company.deleted",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company was moved to the trash, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/CompanyEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a company is moved to the trash. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "CompanyDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The company’s id."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the company belongs to."
          },
          "name": {
            "type": "string",
            "description": "The company’s name."
          },
          "domain": {
            "description": "The company’s domain, such as `example.com`.",
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The website address.",
            "type": [
              "string",
              "null"
            ]
          },
          "industry": {
            "description": "The industry.",
            "type": [
              "string",
              "null"
            ]
          },
          "employeeCount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How many people the company employs."
          },
          "annualRevenue": {
            "description": "The annual revenue, in euros.",
            "type": [
              "number",
              "null"
            ]
          },
          "address": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "The postal address, as it was given."
          },
          "linkedinUrl": {
            "description": "The LinkedIn page address.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "The country.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "description": "A short description of the company.",
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "description": "The city the company is based in.",
            "type": [
              "string",
              "null"
            ]
          },
          "legalForm": {
            "description": "The legal form, such as `GmbH`.",
            "type": [
              "string",
              "null"
            ]
          },
          "registerNumber": {
            "description": "The commercial register number.",
            "type": [
              "string",
              "null"
            ]
          },
          "buildingEnergyTags": {
            "description": "Building-energy markets the company is known to work in. Read-only.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The member who owns the company, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": [
              "string",
              "null"
            ]
          },
          "customFields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Custom field values, by the custom field’s key."
          },
          "canonicalCompanyId": {
            "description": "The Enrik Data company this one is linked to; `null` when it is not. Read-only.",
            "type": [
              "string",
              "null"
            ]
          },
          "enrikUpdateAvailable": {
            "description": "Whether Enrik Data has newer facts about the company than this workspace applied.",
            "type": "boolean"
          },
          "enrikSnapshotVersion": {
            "description": "The Enrik Data version the company’s facts were last taken from.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who created the company; `null` when an API key did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who changed the company last.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company last changed. Send it back as `expectedUpdatedAt` to update safely."
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the company was deleted; `null` while it is live."
          },
          "signalSummary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanySignalSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company’s active signals add up to: set on a list page, `null` elsewhere and for a company with no signals."
          },
          "enrichmentCells": {
            "description": "With `include=enrichmentCells`: each enrichment column’s state for this record, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/EnrichmentColumnCell"
            }
          },
          "formulaCells": {
            "description": "With `include=formulaCells`: each formula column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/FormulaColumnCell"
            }
          },
          "customApiCells": {
            "description": "With `include=customApiCells`: each custom-API column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/CustomApiColumnCell"
            }
          },
          "agentCells": {
            "description": "With `include=agentCells`: each agent column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/AgentColumnCell"
            }
          },
          "review": {
            "description": "Its review item; `null` without one, or without `review_items:read`.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyReviewSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "domain",
          "website",
          "industry",
          "employeeCount",
          "annualRevenue",
          "address",
          "linkedinUrl",
          "country",
          "ownerUserId",
          "customFields",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "signalSummary"
        ],
        "additionalProperties": true,
        "description": "A company, with its review item."
      },
      "CompanyDiscoveryJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The discovery job’s id."
          },
          "icpProfileId": {
            "description": "The ICP profile the job searches for; `null` when it names none.",
            "type": [
              "string",
              "null"
            ]
          },
          "icpProfileVersionId": {
            "description": "The exact version of that ICP profile; `null` when the job names no profile.",
            "type": [
              "string",
              "null"
            ]
          },
          "discoveryBriefId": {
            "description": "The discovery brief the job follows; `null` when it follows none.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "pasted_list",
              "manual_candidate",
              "user_provided_source_page",
              "controlled_source",
              "csv_upload",
              "enrik_data",
              "infobel_firmographics"
            ],
            "description": "Where the job finds its candidates, such as a pasted list or a controlled source."
          },
          "sourceLabel": {
            "description": "A human-readable label for the source; `null` when none was given.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceConfig": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "The source’s configuration, as the job was created with it. Its shape depends on `sourceType`."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "queued",
              "running",
              "completed",
              "completed_with_errors",
              "failed",
              "canceled",
              "archived"
            ],
            "description": "Where the job is in its life: from `draft` through `running` to a finished state."
          },
          "stats": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Counters and diagnostics the job recorded while it ran. Its keys may grow."
          },
          "createdBy": {
            "description": "The user who created the job; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdByApiKeyId": {
            "description": "The API key that created the job, which runs with that key’s authority; `null` when a user did. For such a job `createdBy` is the user who minted the key.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who last changed the job; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the job started running; `null` until it has."
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the job finished; `null` until it has."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the job was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the job last changed."
          }
        },
        "required": [
          "id",
          "icpProfileId",
          "icpProfileVersionId",
          "discoveryBriefId",
          "sourceType",
          "sourceLabel",
          "sourceConfig",
          "status",
          "stats",
          "createdBy",
          "createdByApiKeyId",
          "updatedBy",
          "startedAt",
          "completedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "A company discovery job: one search for candidate companies from one source."
      },
      "CompanyDiscoveryJobCandidateList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyCandidate"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of one discovery job’s candidates."
      },
      "CompanyDiscoveryJobCreateRequest": {
        "type": "object",
        "properties": {
          "sourceType": {
            "type": "string",
            "enum": [
              "pasted_list",
              "manual_candidate",
              "user_provided_source_page",
              "controlled_source",
              "csv_upload",
              "enrik_data",
              "infobel_firmographics"
            ],
            "description": "Where the job finds its candidates, such as `pasted_list` or `controlled_source`. Not `manual_candidate`, which adds one candidate rather than running a job."
          },
          "sourceLabel": {
            "description": "A human-readable label for the source, 1 to 200 characters.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "sourceConfig": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "The source’s configuration. Its shape depends on `sourceType` and is checked against it: an invalid one answers 422 naming the field."
          },
          "icpProfileId": {
            "description": "The ICP profile the job searches for.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "icpProfileVersionId": {
            "description": "The exact version of that ICP profile to score candidates against.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "discoveryBriefId": {
            "description": "The discovery brief the job follows.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          }
        },
        "required": [
          "sourceType",
          "sourceConfig"
        ],
        "additionalProperties": false,
        "description": "A discovery job to create in `draft`: its source and what it searches for."
      },
      "CompanyDiscoveryJobList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyDiscoveryJob"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of discovery jobs, newest first."
      },
      "CompanyDiscoveryJobTerminalEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "companyDiscoveryJob.terminal",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the job reached its outcome (the job’s `completedAt`), in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the job belongs to."
          },
          "data": {
            "description": "The job and its outcome.",
            "$ref": "#/components/schemas/CompanyDiscoveryJobTerminalEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent once a company discovery job reaches a run outcome. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "CompanyDiscoveryJobTerminalEventData": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "description": "The discovery job that finished. Read it with `GET /v1/company-discovery-jobs/{jobId}` and a key that holds `discovery:read`; the read may already show a later state, such as `archived`."
          },
          "status": {
            "type": "string",
            "x-extensible-enum": [
              "completed",
              "completed_with_errors",
              "failed",
              "canceled"
            ],
            "description": "The run outcome the job reached, in the job’s own status vocabulary. Values may be added."
          }
        },
        "required": [
          "jobId",
          "status"
        ],
        "additionalProperties": true,
        "description": "What finished and how: identifiers and the outcome, never record data."
      },
      "CompanyDiscoveryJobUpdateRequest": {
        "type": "object",
        "properties": {
          "sourceLabel": {
            "description": "A new label for the source; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "icpProfileId": {
            "description": "The ICP profile to search for; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "icpProfileVersionId": {
            "description": "The exact version of that ICP profile; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "discoveryBriefId": {
            "description": "The discovery brief to follow; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The changes to a draft job: at least one of its label and its links."
      },
      "CompanyEventData": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "The company. Read it with `GET /v1/companies/{companyId}` and a key that holds `crm:read`; a deleted company reads as not found."
          },
          "changeSource": {
            "type": "string",
            "x-extensible-enum": [
              "app",
              "api",
              "import",
              "automation",
              "assistant",
              "system"
            ],
            "description": "Who made the change: `app` (a member in the Enrik app), `api` (an API key), `import` (a CSV import row), `automation` (enrichment, waterfalls, columns, workflows, discovery, Enrik data), `assistant` (the in-app assistant) or `system`. Values may be added."
          },
          "apiKeyId": {
            "description": "Present when `changeSource` is `api`: the key that made the change, so a receiver can ignore the echo of its own writes.",
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "changeSource"
        ],
        "additionalProperties": true,
        "description": "Which company, and who changed it."
      },
      "CompanyFieldProvenance": {
        "type": "object",
        "properties": {
          "fieldKey": {
            "type": "string",
            "description": "The company field this is about, such as `employeeCount`."
          },
          "sourceProvider": {
            "type": "string",
            "enum": [
              "enrik_crawler",
              "vies",
              "gleif",
              "zefix",
              "zefix_lindas",
              "theirstack",
              "creditsafe",
              "infobelpro",
              "hithorizons",
              "ipinfo_lite",
              "ipinfo"
            ],
            "description": "The source the value came from."
          },
          "method": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "official_filing",
                  "official_registry",
                  "company_reported",
                  "provider_reported",
                  "provider_estimated",
                  "web_detected",
                  "job_posting_inference",
                  "llm_extracted",
                  "llm_inferred",
                  "customer_reported",
                  "derived"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How the value was arrived at, if recorded."
          },
          "reliability": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "verified",
                  "reported",
                  "estimated",
                  "inferred"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How reliable that way of arriving at it is, if recorded."
          },
          "observedAt": {
            "description": "When the value was observed, if recorded.",
            "type": [
              "string",
              "null"
            ]
          },
          "freshness": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "fresh",
                  "stale"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the value is `fresh` or `stale` now; `null` when it was never observed."
          },
          "materializationState": {
            "type": "string",
            "const": "materialized",
            "description": "Always `materialized`: the value is on the company."
          },
          "competingClaimCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many other sources disagreed; above 0, one was chosen over the others."
          }
        },
        "required": [
          "fieldKey",
          "sourceProvider",
          "method",
          "reliability",
          "observedAt",
          "freshness",
          "materializationState",
          "competingClaimCount"
        ],
        "additionalProperties": true,
        "description": "Where one company field’s value came from."
      },
      "CompanyList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyListItem"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          },
          "contextualRanking": {
            "description": "Whether ranking by a discovery brief is available.",
            "$ref": "#/components/schemas/RankingAvailability"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of companies."
      },
      "CompanyListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The company’s id."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the company belongs to."
          },
          "name": {
            "type": "string",
            "description": "The company’s name."
          },
          "domain": {
            "description": "The company’s domain, such as `example.com`.",
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The website address.",
            "type": [
              "string",
              "null"
            ]
          },
          "industry": {
            "description": "The industry.",
            "type": [
              "string",
              "null"
            ]
          },
          "employeeCount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How many people the company employs."
          },
          "annualRevenue": {
            "description": "The annual revenue, in euros.",
            "type": [
              "number",
              "null"
            ]
          },
          "address": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "The postal address, as it was given."
          },
          "linkedinUrl": {
            "description": "The LinkedIn page address.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "The country.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "description": "A short description of the company.",
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "description": "The city the company is based in.",
            "type": [
              "string",
              "null"
            ]
          },
          "legalForm": {
            "description": "The legal form, such as `GmbH`.",
            "type": [
              "string",
              "null"
            ]
          },
          "registerNumber": {
            "description": "The commercial register number.",
            "type": [
              "string",
              "null"
            ]
          },
          "buildingEnergyTags": {
            "description": "Building-energy markets the company is known to work in. Read-only.",
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The member who owns the company, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": [
              "string",
              "null"
            ]
          },
          "customFields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Custom field values, by the custom field’s key."
          },
          "canonicalCompanyId": {
            "description": "The Enrik Data company this one is linked to; `null` when it is not. Read-only.",
            "type": [
              "string",
              "null"
            ]
          },
          "enrikUpdateAvailable": {
            "description": "Whether Enrik Data has newer facts about the company than this workspace applied.",
            "type": "boolean"
          },
          "enrikSnapshotVersion": {
            "description": "The Enrik Data version the company’s facts were last taken from.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who created the company; `null` when an API key did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who changed the company last.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company last changed. Send it back as `expectedUpdatedAt` to update safely."
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the company was deleted; `null` while it is live."
          },
          "signalSummary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanySignalSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the company’s active signals add up to: set on a list page, `null` elsewhere and for a company with no signals."
          },
          "enrichmentCells": {
            "description": "With `include=enrichmentCells`: each enrichment column’s state for this record, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/EnrichmentColumnCell"
            }
          },
          "formulaCells": {
            "description": "With `include=formulaCells`: each formula column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/FormulaColumnCell"
            }
          },
          "customApiCells": {
            "description": "With `include=customApiCells`: each custom-API column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/CustomApiColumnCell"
            }
          },
          "agentCells": {
            "description": "With `include=agentCells`: each agent column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/AgentColumnCell"
            }
          },
          "recommendation": {
            "description": "With `rankingMode`: the company’s recommendation.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/WithheldRecommendation"
              },
              {
                "$ref": "#/components/schemas/CompanyRecommendation"
              }
            ]
          },
          "customerStatus": {
            "description": "With `rankingMode`: `customer` or `not_customer`, as recorded; `null` for none.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "customer",
                  "not_customer"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "salesWorkState": {
            "description": "With `rankingMode`: `in_sales_work` or `not_in_sales_work`; `null` for none.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_sales_work",
                  "not_in_sales_work"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "snoozeUntil": {
            "description": "With `rankingMode`: until when the company is snoozed; `null` when it is not.",
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "review": {
            "description": "Its review item; `null` without one, or without `review_items:read`.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyReviewSummary"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "workspaceId",
          "name",
          "domain",
          "website",
          "industry",
          "employeeCount",
          "annualRevenue",
          "address",
          "linkedinUrl",
          "country",
          "ownerUserId",
          "customFields",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt",
          "deletedAt",
          "signalSummary"
        ],
        "additionalProperties": true,
        "description": "A company on a list page; with `rankingMode`, with its recommendation."
      },
      "CompanyProvenance": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "The company."
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyFieldProvenance"
            },
            "description": "Each field whose source can be shown, by `fieldKey`."
          },
          "attributions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanyAttribution"
            },
            "description": "The credit lines to show with those fields: all of them, whenever any is shown."
          }
        },
        "required": [
          "companyId",
          "fields",
          "attributions"
        ],
        "additionalProperties": true,
        "description": "Where a company’s fields came from."
      },
      "CompanyRecommendation": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "current",
              "stale",
              "missing"
            ],
            "description": "`current`, `stale` (see `staleReasons`) or `missing` (never evaluated)."
          },
          "staleReasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "result_expired",
                "input_changed",
                "rights_withheld",
                "dismissed",
                "snoozed",
                "account_context_changed",
                "policy_incompatible",
                "brief_unavailable"
              ]
            },
            "description": "Why a `stale` recommendation is no longer current."
          },
          "snapshotId": {
            "description": "The evaluation the recommendation comes from.",
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "qualified",
                  "review_needed",
                  "currently_unsatisfied",
                  "suppressed_excluded"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How eligible the company is: `qualified`, `review_needed`, `currently_unsatisfied` or `suppressed_excluded`."
          },
          "timingCategory": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "supported_event",
                  "condition_observed",
                  "outside_window",
                  "unknown",
                  "not_configured"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "What the timing rests on, such as `supported_event`."
          },
          "effectiveTimingGroup": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "supported_now",
                  "condition_observed",
                  "unknown",
                  "outside_window"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The timing group the company sorts in, such as `supported_now`."
          },
          "fitScore": {
            "description": "The fit to the profile, 0 to 100.",
            "type": [
              "number",
              "null"
            ]
          },
          "fitCoverage": {
            "description": "How much of the profile could be judged, 0 to 1.",
            "type": [
              "number",
              "null"
            ]
          },
          "validUntil": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Until when the recommendation holds."
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "icp_fit_satisfied",
                "signal_required_passed",
                "signal_boost_passed",
                "signal_boost_failed",
                "signal_boost_unknown",
                "signals_not_configured",
                "icp_required_uncertain",
                "icp_insufficient_coverage",
                "icp_required_partial",
                "signal_required_unknown",
                "signal_exclude_unknown",
                "icp_required_failed",
                "signal_required_failed",
                "icp_hard_exclusion_verified",
                "signal_exclude_passed",
                "commercial_dismissal",
                "icp_review_suppression",
                "snoozed"
              ]
            },
            "description": "Every reason the evaluation recorded, such as `icp_fit_satisfied`."
          }
        },
        "required": [
          "state",
          "staleReasons",
          "snapshotId",
          "tier",
          "timingCategory",
          "effectiveTimingGroup",
          "fitScore",
          "fitCoverage",
          "validUntil",
          "reasons"
        ],
        "additionalProperties": true,
        "description": "Why a ranked company ranks where it does."
      },
      "CompanyReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The company’s id."
          },
          "name": {
            "type": "string",
            "description": "The company’s name."
          },
          "domain": {
            "description": "The company’s domain, such as `example.com`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "domain"
        ],
        "additionalProperties": true,
        "description": "A company, named and linkable."
      },
      "CompanyRestoredEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "company.restored",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company was restored, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/CompanyEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a company is restored from the trash. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "CompanyReviewAssignee": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The assigned member’s user id."
          },
          "name": {
            "description": "Their name; `null` when they have none.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true,
        "description": "The member a company’s review is assigned to."
      },
      "CompanyReviewSummary": {
        "type": "object",
        "properties": {
          "reviewItemId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The company’s review item, for the review item routes."
          },
          "stage": {
            "type": "string",
            "enum": [
              "signal_review",
              "activation_ready",
              "export_ready",
              "sync_ready",
              "done"
            ],
            "description": "Where the company is in the review pipeline, from `signal_review` to `done`."
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "urgent"
            ],
            "description": "`low`, `medium`, `high` or `urgent`."
          },
          "assignee": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyReviewAssignee"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who the review is assigned to; `null` for no one."
          }
        },
        "required": [
          "reviewItemId",
          "stage",
          "priority",
          "assignee"
        ],
        "additionalProperties": true,
        "description": "The company’s review item: its stage, priority and assignee."
      },
      "CompanySignal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The signal’s id."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the signal belongs to."
          },
          "companyId": {
            "type": "string",
            "description": "The company the signal is about."
          },
          "category": {
            "type": "string",
            "enum": [
              "hiring",
              "expansion",
              "new_location",
              "product_launch",
              "event_participation",
              "certification",
              "partnership",
              "technology",
              "website_change",
              "regulatory",
              "leadership_change",
              "funding",
              "content_activity",
              "customer_reference",
              "website_visit",
              "other"
            ],
            "description": "What kind of signal it is, such as `hiring` or `funding`."
          },
          "title": {
            "type": "string",
            "description": "A one-line title."
          },
          "researchLabel": {
            "description": "The researched finding’s label from its retained source, while it may be shown.",
            "$ref": "#/components/schemas/SignalResearchLabel"
          },
          "summary": {
            "type": "string",
            "description": "What the signal says."
          },
          "signalDate": {
            "description": "When the signal happened, as a date (`YYYY-MM-DD`), if known.",
            "type": [
              "string",
              "null"
            ]
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the signal was observed."
          },
          "sourceType": {
            "type": "string",
            "enum": [
              "manual",
              "company_website_research",
              "controlled_source_page",
              "company_custom_field",
              "candidate_source_context",
              "website_visit"
            ],
            "description": "Where it came from, such as `manual`."
          },
          "sourceUrl": {
            "description": "The page it came from, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceLabel": {
            "description": "The name of its source, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "strength": {
            "type": "string",
            "enum": [
              "weak",
              "medium",
              "strong"
            ],
            "description": "`weak`, `medium` or `strong`."
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "How sure it is: `low`, `medium` or `high`."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "dismissed",
              "archived",
              "expired"
            ],
            "description": "`active`, `dismissed` or `archived`; an active signal past its age reads `expired`."
          },
          "freshnessScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How fresh it is, 0 to 100."
          },
          "relevanceScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How relevant it is, 0 to 100."
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The passages that support it."
          },
          "extractedBy": {
            "type": "string",
            "enum": [
              "manual",
              "ai_extraction",
              "system"
            ],
            "description": "Who found it: `manual`, `ai_extraction` or `system`."
          },
          "extractionRunId": {
            "description": "The extraction run that found it, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who recorded it, if a user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "dismissedBy": {
            "description": "The user who dismissed it, if it is dismissed.",
            "type": [
              "string",
              "null"
            ]
          },
          "dismissedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was dismissed."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When it was recorded."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "workspaceId",
          "companyId",
          "category",
          "title",
          "summary",
          "signalDate",
          "observedAt",
          "sourceType",
          "sourceUrl",
          "sourceLabel",
          "strength",
          "confidence",
          "status",
          "freshnessScore",
          "relevanceScore",
          "evidence",
          "extractedBy",
          "extractionRunId",
          "createdBy",
          "dismissedBy",
          "dismissedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "Something that happened at a company."
      },
      "CompanySignalCreatedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "companySignal.created",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the signal was applied to the company, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/CompanySignalCreatedEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a new signal is applied to a company. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "CompanySignalCreatedEventData": {
        "type": "object",
        "properties": {
          "signalId": {
            "type": "string",
            "description": "The new signal. Read it with `GET /v1/company-signals/{signalId}` and a key that holds `crm:read`; a signal the app would hide reads as not found."
          },
          "companyId": {
            "type": "string",
            "description": "The company the signal is about."
          }
        },
        "required": [
          "signalId",
          "companyId"
        ],
        "additionalProperties": true,
        "description": "Which signal, on which company."
      },
      "CompanySignalList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CompanySignal"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of a company’s signals, newest first."
      },
      "CompanySignalSummary": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "The company the summary is of."
          },
          "latestSignalTitle": {
            "description": "The title of the latest active signal.",
            "type": [
              "string",
              "null"
            ]
          },
          "latestSignalCategory": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "hiring",
                  "expansion",
                  "new_location",
                  "product_launch",
                  "event_participation",
                  "certification",
                  "partnership",
                  "technology",
                  "website_change",
                  "regulatory",
                  "leadership_change",
                  "funding",
                  "content_activity",
                  "customer_reference",
                  "website_visit",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest active signal’s category. What kind of signal it is, such as `hiring` or `funding`."
          },
          "latestSignalDate": {
            "description": "When the latest active signal happened, as a date (`YYYY-MM-DD`).",
            "type": [
              "string",
              "null"
            ]
          },
          "latestSignalStrength": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "weak",
                  "medium",
                  "strong"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest active signal’s strength: `weak`, `medium` or `strong`."
          },
          "latestSignalConfidence": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How sure the latest active signal is: `low`, `medium` or `high`."
          },
          "latestSignalRelevanceScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest active signal’s relevance, 0 to 100."
          },
          "activeSignalCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many active signals the company has."
          },
          "strongSignalCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many of them are strong."
          },
          "signalPriorityScore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The highest relevance among the active signals, 0 to 100."
          },
          "scoringVersion": {
            "type": "string",
            "description": "The scoring rules the scores were computed under."
          }
        },
        "required": [
          "companyId",
          "latestSignalTitle",
          "latestSignalCategory",
          "latestSignalDate",
          "latestSignalStrength",
          "latestSignalConfidence",
          "latestSignalRelevanceScore",
          "activeSignalCount",
          "strongSignalCount",
          "signalPriorityScore",
          "scoringVersion"
        ],
        "additionalProperties": true,
        "description": "What a company’s active signals add up to."
      },
      "CompanyUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The new name, 1 to 120 characters. It cannot be cleared.",
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "domain": {
            "description": "The company’s domain, such as `example.com`; a URL is reduced to its host. Unique among the workspace’s live companies that are not linked to an Enrik company (`canonicalCompanyId` is `null`). A linked company is exempt: several linked companies may share a domain, also with one unlinked company. `null` clears it.",
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The website address; `null` clears it. `domain` is not derived from it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "industry": {
            "description": "The industry; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "employeeCount": {
            "description": "How many people the company employs; `null` clears it.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "annualRevenue": {
            "description": "The annual revenue in euros, with at most two decimals; `null` clears it.",
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 999999999999.99
              },
              {
                "type": "null"
              }
            ]
          },
          "address": {
            "description": "The postal address; it replaces the whole address. It is not read for `city` or `country`, which have their own fields.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "linkedinUrl": {
            "description": "The LinkedIn page address; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "description": "The country; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "description": "The description; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "description": "The city; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "legalForm": {
            "description": "The legal form; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "registerNumber": {
            "description": "The commercial register number; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The owning member, by user id; `null` clears it. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "customFields": {
            "description": "Custom field values to set, by key; the keys left out keep their values.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "expectedUpdatedAt": {
            "description": "The company’s `updatedAt` as you read it. When the company has changed since, the update is refused with 409 `stale_version` and nothing is written. Leave it out to apply the fields you send whatever changed meanwhile.",
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
          }
        },
        "additionalProperties": false,
        "description": "What to change on a company. A field left out keeps its value."
      },
      "CompanyUpdatedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "company.updated",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the company was changed, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/CompanyUpdatedEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a company’s fields change; an update that changes nothing sends nothing. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "CompanyUpdatedEventData": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "description": "The company. Read it with `GET /v1/companies/{companyId}` and a key that holds `crm:read`; a deleted company reads as not found."
          },
          "changedFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The names of the fields the update changed, never their values: the public field names, and `customFields.<key>` for a custom field. Read the record for the new values."
          },
          "changeSource": {
            "type": "string",
            "x-extensible-enum": [
              "app",
              "api",
              "import",
              "automation",
              "assistant",
              "system"
            ],
            "description": "Who made the change: `app` (a member in the Enrik app), `api` (an API key), `import` (a CSV import row), `automation` (enrichment, waterfalls, columns, workflows, discovery, Enrik data), `assistant` (the in-app assistant) or `system`. Values may be added."
          },
          "apiKeyId": {
            "description": "Present when `changeSource` is `api`: the key that made the change, so a receiver can ignore the echo of its own writes.",
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "changedFields",
          "changeSource"
        ],
        "additionalProperties": true,
        "description": "Which company, which fields changed, and who changed them."
      },
      "CompanyUpsertRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "description": "The key: the company’s domain, such as `example.com`; a URL is reduced to its host. The live company with this domain is updated, or a company is created when there is none.",
            "type": "string"
          },
          "name": {
            "description": "The company’s name, 1 to 120 characters. Required when the company is created.",
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "website": {
            "description": "The website address; blank means none. `domain` is not derived from it.",
            "type": "string",
            "maxLength": 2048
          },
          "industry": {
            "description": "The industry, at most 255 characters.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "employeeCount": {
            "description": "How many people the company employs.",
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "annualRevenue": {
            "description": "The annual revenue in euros, with at most two decimals.",
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 999999999999.99
              },
              {
                "type": "null"
              }
            ]
          },
          "linkedinUrl": {
            "description": "The LinkedIn page address; blank means none.",
            "type": "string",
            "maxLength": 2048
          },
          "country": {
            "description": "The country, as free text; blank means none.",
            "type": "string",
            "maxLength": 120
          },
          "summary": {
            "description": "A short description of the company.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "description": "The city the company is based in.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "legalForm": {
            "description": "The legal form, such as `GmbH`.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "registerNumber": {
            "description": "The commercial register number.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The member who owns the company, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "address": {
            "description": "The postal address, as an object of your choosing; it replaces the whole address.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "customFields": {
            "description": "Custom field values by key, checked against the workspace’s company custom fields; the keys left out keep their values.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "domain"
        ],
        "additionalProperties": false,
        "description": "A company to create or update, found by its `domain`. A field left out keeps its value; `name` is required when the company is created."
      },
      "CompanyUpsertResult": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ],
            "description": "`created` when no live company had the domain; `updated` when one did and the fields you sent were written to it."
          },
          "company": {
            "description": "The company as it is now.",
            "$ref": "#/components/schemas/Company"
          }
        },
        "required": [
          "outcome",
          "company"
        ],
        "additionalProperties": true,
        "description": "What an upsert did, and the company."
      },
      "Contact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The contact’s id."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the contact belongs to."
          },
          "firstName": {
            "description": "The first name.",
            "type": [
              "string",
              "null"
            ]
          },
          "lastName": {
            "description": "The last name.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "The e-mail address, lower-cased.",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "The phone number.",
            "type": [
              "string",
              "null"
            ]
          },
          "jobTitle": {
            "description": "The job title.",
            "type": [
              "string",
              "null"
            ]
          },
          "ownerUserId": {
            "description": "The member who owns the contact, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": [
              "string",
              "null"
            ]
          },
          "companyId": {
            "description": "The company the contact works for.",
            "type": [
              "string",
              "null"
            ]
          },
          "customFields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Custom field values, by the custom field’s key."
          },
          "createdBy": {
            "description": "The user who created the contact; `null` when an API key did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who changed the contact last.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the contact was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the contact last changed. Send it back as `expectedUpdatedAt` to update safely."
          },
          "deletedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the contact was deleted; `null` while it is live."
          },
          "company": {
            "description": "With `include=company`: the linked company, or `null` when there is none or it is deleted.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/CompanyReference"
              },
              {
                "type": "null"
              }
            ]
          },
          "enrichmentCells": {
            "description": "With `include=enrichmentCells`: each enrichment column’s state for this record, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/EnrichmentColumnCell"
            }
          },
          "formulaCells": {
            "description": "With `include=formulaCells`: each formula column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/FormulaColumnCell"
            }
          },
          "customApiCells": {
            "description": "With `include=customApiCells`: each custom-API column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/CustomApiColumnCell"
            }
          },
          "agentCells": {
            "description": "With `include=agentCells`: each agent column’s state, by column id.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/AgentColumnCell"
            }
          }
        },
        "required": [
          "id",
          "workspaceId",
          "firstName",
          "lastName",
          "email",
          "phone",
          "jobTitle",
          "ownerUserId",
          "companyId",
          "customFields",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ],
        "additionalProperties": true,
        "description": "A person in your workspace."
      },
      "ContactBulkCreateRequestInput": {
        "type": "object",
        "properties": {
          "items": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactCreateRequestInput"
            },
            "description": "The contacts, each as `contacts.create` takes it, 1 to 100. The whole body is checked first: one malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written."
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "description": "Up to 100 contacts to create."
      },
      "ContactBulkItemWritten": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The item’s position in `items`, from 0."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ],
            "description": "`created` when the item created the contact; `updated` when the fields sent were written to an existing one. A bulk upsert creates when no live contact had the e-mail address; a bulk create only creates and a bulk update only updates."
          },
          "contact": {
            "description": "The contact as it is now.",
            "$ref": "#/components/schemas/Contact"
          }
        },
        "required": [
          "index",
          "outcome",
          "contact"
        ],
        "additionalProperties": true,
        "description": "A contact a bulk write created or updated."
      },
      "ContactBulkUpdateItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The id of the contact to change."
          },
          "firstName": {
            "description": "The first name; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "lastName": {
            "description": "The last name; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "description": "The e-mail address; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254,
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "description": "The phone number; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ]
          },
          "jobTitle": {
            "description": "The job title; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The owning member, by user id; `null` clears it. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "companyId": {
            "description": "The company the contact works for; `null` unlinks it.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "customFields": {
            "description": "Custom field values to set, by key; the keys left out keep their values.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "expectedUpdatedAt": {
            "description": "The contact’s `updatedAt` as you read it. When the contact has changed since, the update is refused with 409 `stale_version` and nothing is written. Leave it out to apply the fields you send whatever changed meanwhile.",
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false,
        "description": "One contact to change: its `id` and the fields `contacts.update` takes. A field left out keeps its value."
      },
      "ContactBulkUpdateRequest": {
        "type": "object",
        "properties": {
          "items": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactBulkUpdateItem"
            },
            "description": "The contacts to change, each by its `id`, 1 to 100. The whole body is checked first: one malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written."
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "description": "Up to 100 contacts to change."
      },
      "ContactBulkUpsertRequest": {
        "type": "object",
        "properties": {
          "items": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactUpsertRequest"
            },
            "description": "The contacts, each as `contacts.upsert` takes it, 1 to 100. The whole body is checked first: one malformed item refuses the request with 422 `validation_error` at its path, such as `items.3.name`, and nothing is written."
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "description": "Up to 100 contacts to create or update by e-mail."
      },
      "ContactBulkWriteResult": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ContactBulkItemWritten"
                },
                {
                  "$ref": "#/components/schemas/BulkItemFailed"
                }
              ]
            },
            "description": "One result per item, in the order of `items`."
          },
          "created": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many items created a record."
          },
          "updated": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many items updated a record."
          },
          "failed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many items failed."
          }
        },
        "required": [
          "results",
          "created",
          "updated",
          "failed"
        ],
        "additionalProperties": true,
        "description": "What a bulk write did, item by item."
      },
      "ContactCreateRequestInput": {
        "type": "object",
        "properties": {
          "firstName": {
            "description": "The first name, at most 255 characters. Send it, `lastName` or `email`.",
            "type": "string",
            "maxLength": 255
          },
          "lastName": {
            "description": "The last name, at most 255 characters. Send it, `firstName` or `email`.",
            "type": "string",
            "maxLength": 255
          },
          "email": {
            "description": "The e-mail address, stored lower-cased. Unique among the workspace’s live contacts. Send it, `firstName` or `lastName`.",
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "phone": {
            "description": "The phone number, at most 50 characters.",
            "type": "string",
            "maxLength": 50
          },
          "jobTitle": {
            "description": "The job title, at most 255 characters.",
            "type": "string",
            "maxLength": 255
          },
          "ownerUserId": {
            "description": "The member who owns the contact, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "companyId": {
            "description": "The company the contact works for, in this workspace; `null` or absent for none.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "customFields": {
            "default": {},
            "description": "Custom field values by key, checked against the workspace’s contact custom fields.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "additionalProperties": false,
        "description": "A new contact. It needs at least one of `firstName`, `lastName` or `email`, not blank; without one the request is refused with 422 `validation_error`. Every other field is optional."
      },
      "ContactCreatedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "contact.created",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the contact was created, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/ContactEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a contact is created, in the app, through the API, by an import or an automation. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "ContactDeletedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "contact.deleted",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the contact was moved to the trash, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/ContactEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a contact is moved to the trash. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "ContactEventData": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "description": "The contact. Read it with `GET /v1/contacts/{contactId}` and a key that holds `crm:read`; a deleted contact reads as not found."
          },
          "changeSource": {
            "type": "string",
            "x-extensible-enum": [
              "app",
              "api",
              "import",
              "automation",
              "assistant",
              "system"
            ],
            "description": "Who made the change: `app` (a member in the Enrik app), `api` (an API key), `import` (a CSV import row), `automation` (enrichment, waterfalls, columns, workflows, discovery, Enrik data), `assistant` (the in-app assistant) or `system`. Values may be added."
          },
          "apiKeyId": {
            "description": "Present when `changeSource` is `api`: the key that made the change, so a receiver can ignore the echo of its own writes.",
            "type": "string"
          }
        },
        "required": [
          "contactId",
          "changeSource"
        ],
        "additionalProperties": true,
        "description": "Which contact, and who changed it."
      },
      "ContactList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of contacts."
      },
      "ContactRestoredEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "contact.restored",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the contact was restored, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/ContactEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a contact is restored from the trash. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "ContactUpdateRequest": {
        "type": "object",
        "properties": {
          "firstName": {
            "description": "The first name; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "lastName": {
            "description": "The last name; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "description": "The e-mail address; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 254,
                "format": "email",
                "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "description": "The phone number; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ]
          },
          "jobTitle": {
            "description": "The job title; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "ownerUserId": {
            "description": "The owning member, by user id; `null` clears it. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "companyId": {
            "description": "The company the contact works for; `null` unlinks it.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "customFields": {
            "description": "Custom field values to set, by key; the keys left out keep their values.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "expectedUpdatedAt": {
            "description": "The contact’s `updatedAt` as you read it. When the contact has changed since, the update is refused with 409 `stale_version` and nothing is written. Leave it out to apply the fields you send whatever changed meanwhile.",
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
          }
        },
        "additionalProperties": false,
        "description": "What to change on a contact. A field left out keeps its value."
      },
      "ContactUpdatedEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`. It never changes across attempts and redeliveries: deduplicate by it."
          },
          "type": {
            "type": "string",
            "const": "contact.updated",
            "description": "The event type, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version. A breaking change is a new version a subscription opts in to."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the contact was changed, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the record belongs to."
          },
          "data": {
            "description": "Which record changed and how; never field values. Read the record for its current state.",
            "$ref": "#/components/schemas/ContactUpdatedEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent when a contact’s fields change; an update that changes nothing sends nothing. Delivery is at least once and unordered; ignore fields you do not know."
      },
      "ContactUpdatedEventData": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "description": "The contact. Read it with `GET /v1/contacts/{contactId}` and a key that holds `crm:read`; a deleted contact reads as not found."
          },
          "changedFields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The names of the fields the update changed, never their values: the public field names, and `customFields.<key>` for a custom field. Read the record for the new values."
          },
          "changeSource": {
            "type": "string",
            "x-extensible-enum": [
              "app",
              "api",
              "import",
              "automation",
              "assistant",
              "system"
            ],
            "description": "Who made the change: `app` (a member in the Enrik app), `api` (an API key), `import` (a CSV import row), `automation` (enrichment, waterfalls, columns, workflows, discovery, Enrik data), `assistant` (the in-app assistant) or `system`. Values may be added."
          },
          "apiKeyId": {
            "description": "Present when `changeSource` is `api`: the key that made the change, so a receiver can ignore the echo of its own writes.",
            "type": "string"
          }
        },
        "required": [
          "contactId",
          "changedFields",
          "changeSource"
        ],
        "additionalProperties": true,
        "description": "Which contact, which fields changed, and who changed them."
      },
      "ContactUpsertRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
            "description": "The key: the e-mail address, stored lower-cased and compared ignoring case. The live contact with this address is updated, or a contact is created when there is none."
          },
          "firstName": {
            "description": "The first name, at most 255 characters.",
            "type": "string",
            "maxLength": 255
          },
          "lastName": {
            "description": "The last name, at most 255 characters.",
            "type": "string",
            "maxLength": 255
          },
          "phone": {
            "description": "The phone number, at most 50 characters.",
            "type": "string",
            "maxLength": 50
          },
          "jobTitle": {
            "description": "The job title, at most 255 characters.",
            "type": "string",
            "maxLength": 255
          },
          "ownerUserId": {
            "description": "The member who owns the contact, by user id. List the members, and their ids, with `GET /v1/workspace-members` (needs `crm:write`).",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "companyId": {
            "description": "The company the contact works for, in this workspace; `null` or absent for none.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "customFields": {
            "description": "Custom field values by key, checked against the workspace’s contact custom fields; the keys left out keep their values.",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false,
        "description": "A contact to create or update, found by its `email`. A field left out keeps its value."
      },
      "ContactUpsertResult": {
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ],
            "description": "`created` when no live contact had the e-mail address; `updated` when one did and the fields you sent were written to it."
          },
          "contact": {
            "description": "The contact as it is now.",
            "$ref": "#/components/schemas/Contact"
          }
        },
        "required": [
          "outcome",
          "contact"
        ],
        "additionalProperties": true,
        "description": "What an upsert did, and the contact."
      },
      "CurrentApiKey": {
        "type": "object",
        "properties": {
          "apiKeyId": {
            "type": "string",
            "description": "The id of the API key that sent the request: the `apiKeyId` a timeline names as the actor of what this key did."
          },
          "name": {
            "description": "The label the key was given when it was minted, as Settings → API keys shows it.",
            "type": [
              "string",
              "null"
            ]
          },
          "prefix": {
            "type": "string",
            "description": "The first characters of the key’s secret, as Settings → API keys shows them: enough to tell keys apart, never enough to use one."
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the key stops authenticating (ISO 8601), or null for a key that does not expire. From then on every request with it answers 401."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the key belongs to. Every operation the key calls acts in it."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "x-extensible-enum": [
                "setup:read",
                "setup:run",
                "workspace:read",
                "crm:read",
                "crm:write",
                "crm:delete",
                "twin:read",
                "discovery:read",
                "discovery:write",
                "discovery:run",
                "enrichment:read",
                "enrichment:run",
                "automation:read",
                "automation:run",
                "exports:read",
                "exports:run",
                "integrations:read",
                "webhooks:read",
                "webhooks:write",
                "reporting:read",
                "assistant:read",
                "assistant:run",
                "assistant:write"
              ]
            },
            "description": "The scope names the key holds, in a fixed order; the `apiKey` security scheme says what each one grants. What the key may do is also bounded by the permissions frozen when it was minted, so a scope listed here does not promise that every operation naming it succeeds."
          }
        },
        "required": [
          "apiKeyId",
          "name",
          "prefix",
          "expiresAt",
          "workspaceId",
          "scopes"
        ],
        "additionalProperties": true,
        "description": "The API key that sent the request: its id, name, display prefix, expiry, workspace and scopes."
      },
      "CustomApiColumnCell": {
        "type": "object",
        "properties": {
          "definitionId": {
            "type": "string",
            "description": "The column’s id."
          },
          "fieldId": {
            "type": "string",
            "description": "The custom field the column writes its value into."
          },
          "status": {
            "type": "string",
            "enum": [
              "empty",
              "queued",
              "running",
              "succeeded",
              "failed",
              "skipped",
              "stale"
            ],
            "description": "Where the cell stands: `empty`, `queued`, `running`, `succeeded`, `failed`, `skipped` or `stale`."
          },
          "lastErrorCode": {
            "description": "Why the last attempt failed, as a stable code; `null` when it did not.",
            "type": [
              "string",
              "null"
            ]
          },
          "lastAppliedAt": {
            "description": "When a value was last written into the field, as an ISO 8601 instant.",
            "type": [
              "string",
              "null"
            ]
          },
          "latestRunId": {
            "description": "The run that last worked on this cell; `null` when none has.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "definitionId",
          "fieldId",
          "status",
          "lastErrorCode",
          "lastAppliedAt",
          "latestRunId"
        ],
        "additionalProperties": true,
        "description": "The state of one custom-API column for one record. The value is in its field."
      },
      "CustomFieldDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The custom field’s id."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the custom field belongs to."
          },
          "objectType": {
            "type": "string",
            "enum": [
              "contact",
              "company"
            ],
            "description": "The records the field is on: `contact` or `company`."
          },
          "key": {
            "type": "string",
            "description": "The key a record’s `customFields` holds the value under. It never changes."
          },
          "label": {
            "type": "string",
            "description": "The field’s name, as shown."
          },
          "fieldType": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "date",
              "datetime",
              "select",
              "multi_select",
              "email",
              "url",
              "phone"
            ],
            "description": "The kind of value: `text`, `number`, `boolean`, `date`, `datetime`, `select`, `multi_select`, `email`, `url` or `phone`. It never changes."
          },
          "options": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CustomFieldOption"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "The choices of a `select` or `multi_select` field; `null` for the others."
          },
          "isRequired": {
            "type": "boolean",
            "description": "Whether every record must have a value."
          },
          "defaultValue": {
            "description": "The value a new record gets when none is given, if the field has one."
          },
          "validation": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "Further rules a value must meet, such as a minimum or a pattern; `null` for none."
          },
          "position": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Where the field comes in the list, lowest first."
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the field is in use. A deactivated field keeps its values but takes none."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the field was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the field last changed."
          }
        },
        "required": [
          "id",
          "workspaceId",
          "objectType",
          "key",
          "label",
          "fieldType",
          "options",
          "isRequired",
          "validation",
          "position",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "A custom field the workspace defined on its contacts or companies."
      },
      "CustomFieldDefinitionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomFieldDefinition"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of custom fields: the active ones by position, then the deactivated ones."
      },
      "CustomFieldOption": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "What a record stores when this choice is picked."
          },
          "label": {
            "type": "string",
            "description": "What the choice is shown as."
          }
        },
        "required": [
          "value",
          "label"
        ],
        "additionalProperties": true,
        "description": "One choice of a select field."
      },
      "DeletedCompanyList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Company"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of deleted companies, most recently deleted first."
      },
      "DiscoveryBrief": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The discovery brief’s id."
          },
          "icpProfileId": {
            "type": "string",
            "description": "The ICP profile the brief is drawn from."
          },
          "icpProfileVersionId": {
            "type": "string",
            "description": "The exact version of that profile."
          },
          "title": {
            "type": "string",
            "description": "The brief’s title."
          },
          "brief": {
            "description": "What the brief asks for.",
            "$ref": "#/components/schemas/DiscoveryBriefContent"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "archived"
            ],
            "description": "`draft`, `active` or `archived`."
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The brief’s revision, which every change to it increases."
          },
          "currentVersionId": {
            "description": "The version the brief currently uses; `null` when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who created the brief; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who last changed the brief; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the brief was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the brief last changed."
          }
        },
        "required": [
          "id",
          "icpProfileId",
          "icpProfileVersionId",
          "title",
          "brief",
          "status",
          "revision",
          "currentVersionId",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "A discovery brief: how to find and judge companies for one ICP profile version."
      },
      "DiscoveryBriefArchiveRequest": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The revision you were shown; a stale one answers 409 `stale_version`. Required."
          }
        },
        "required": [
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "The revision of the brief to archive."
      },
      "DiscoveryBriefContent": {
        "type": "object",
        "properties": {
          "targetAccountSummary": {
            "type": "string",
            "description": "The accounts to find, in a few sentences."
          },
          "mustHaveCriteria": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What every candidate must have."
          },
          "niceToHaveCriteria": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What a candidate should ideally have."
          },
          "disqualifiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What rules a candidate out."
          },
          "recommendedSourceCategories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "company_website",
                "industry_directory",
                "trade_fair_exhibitor",
                "job_board",
                "company_register",
                "press_news",
                "technology_signal",
                "existing_workspace_data",
                "manual_import"
              ]
            },
            "description": "The kinds of source to search."
          },
          "fieldsToCollect": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefFieldSpec"
            },
            "description": "What to collect about each candidate."
          },
          "scoringRubric": {
            "description": "The rubric to score each candidate with.",
            "$ref": "#/components/schemas/DiscoveryBriefScoringRubric"
          },
          "suggestedSearchQueries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Searches worth running."
          },
          "candidateReviewChecklist": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What to check when reviewing."
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the brief cannot promise."
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "How confident the brief is."
          }
        },
        "required": [
          "targetAccountSummary",
          "mustHaveCriteria",
          "niceToHaveCriteria",
          "disqualifiers",
          "recommendedSourceCategories",
          "fieldsToCollect",
          "scoringRubric",
          "suggestedSearchQueries",
          "candidateReviewChecklist",
          "limitations",
          "confidence"
        ],
        "additionalProperties": true,
        "description": "What a discovery brief asks for."
      },
      "DiscoveryBriefContentRequest": {
        "type": "object",
        "properties": {
          "targetAccountSummary": {
            "description": "The accounts to find, in a few sentences.",
            "type": "string"
          },
          "mustHaveCriteria": {
            "description": "What every candidate must have.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "niceToHaveCriteria": {
            "description": "What a candidate should ideally have.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disqualifiers": {
            "description": "What rules a candidate out.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recommendedSourceCategories": {
            "description": "The kinds of source to search.",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "company_website",
                "industry_directory",
                "trade_fair_exhibitor",
                "job_board",
                "company_register",
                "press_news",
                "technology_signal",
                "existing_workspace_data",
                "manual_import"
              ]
            }
          },
          "fieldsToCollect": {
            "description": "What to collect about each candidate.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefFieldSpecRequest"
            }
          },
          "scoringRubric": {
            "description": "The rubric to score each candidate with.",
            "$ref": "#/components/schemas/DiscoveryBriefScoringRubricRequest"
          },
          "suggestedSearchQueries": {
            "description": "Searches worth running.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "candidateReviewChecklist": {
            "description": "What to check when reviewing.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limitations": {
            "description": "What the brief cannot promise.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "confidence": {
            "description": "How confident the brief is: `low` when left out.",
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          }
        },
        "required": [
          "targetAccountSummary",
          "mustHaveCriteria",
          "niceToHaveCriteria",
          "disqualifiers",
          "recommendedSourceCategories",
          "fieldsToCollect",
          "scoringRubric",
          "suggestedSearchQueries",
          "candidateReviewChecklist",
          "limitations",
          "confidence"
        ],
        "additionalProperties": false,
        "description": "What a discovery brief asks for."
      },
      "DiscoveryBriefCreateRequest": {
        "type": "object",
        "properties": {
          "icpProfileId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The ICP profile the brief is drawn from."
          },
          "icpProfileVersionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The exact version of that profile to pin."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The brief’s title."
          },
          "brief": {
            "description": "What the brief asks for.",
            "$ref": "#/components/schemas/DiscoveryBriefContentRequest"
          },
          "memoryContext": {
            "description": "The company memory the plan was generated from; leave it out unless saving such a plan.",
            "$ref": "#/components/schemas/MemoryContextSnapshotRequest"
          }
        },
        "required": [
          "icpProfileId",
          "icpProfileVersionId",
          "title",
          "brief"
        ],
        "additionalProperties": false,
        "description": "A new discovery brief pinned to one ICP profile version."
      },
      "DiscoveryBriefFieldSpec": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The field’s name."
          },
          "description": {
            "description": "What the field holds; absent when not given.",
            "type": "string"
          },
          "required": {
            "description": "Whether the field must be filled; absent when not said.",
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": true,
        "description": "A field to collect about each candidate."
      },
      "DiscoveryBriefFieldSpecRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The field’s name."
          },
          "description": {
            "description": "What the field holds.",
            "type": "string"
          },
          "required": {
            "description": "Whether the field must be filled.",
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false,
        "description": "A field to collect about each candidate."
      },
      "DiscoveryBriefList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBrief"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of discovery briefs, newest first."
      },
      "DiscoveryBriefRubricCriterion": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "What the criterion scores."
          },
          "weight": {
            "type": "number",
            "description": "How much it counts, 0 to 100."
          },
          "description": {
            "description": "How to score it; absent when not given.",
            "type": "string"
          }
        },
        "required": [
          "label",
          "weight"
        ],
        "additionalProperties": true,
        "description": "One criterion of a scoring rubric."
      },
      "DiscoveryBriefRubricCriterionRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "What the criterion scores."
          },
          "weight": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "How much it counts, 0 to 100."
          },
          "description": {
            "description": "How to score it.",
            "type": "string"
          }
        },
        "required": [
          "label",
          "weight"
        ],
        "additionalProperties": false,
        "description": "One criterion of a scoring rubric."
      },
      "DiscoveryBriefRuleGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The group’s id, unique in its version."
          },
          "mode": {
            "type": "string",
            "enum": [
              "all",
              "any"
            ],
            "description": "`all` when every pin in the group must hold, `any` when one is enough."
          },
          "pinIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The signal pins in the group."
          }
        },
        "required": [
          "id",
          "mode",
          "pinIds"
        ],
        "additionalProperties": true,
        "description": "A group of signal pins judged together."
      },
      "DiscoveryBriefRuleGroupRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "The group’s id, unique in its version."
          },
          "mode": {
            "type": "string",
            "enum": [
              "all",
              "any"
            ],
            "description": "`all` when every pin in the group must hold, `any` when one is enough."
          },
          "pinIds": {
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "description": "The signal pins in the group."
          }
        },
        "required": [
          "id",
          "mode",
          "pinIds"
        ],
        "additionalProperties": false,
        "description": "A group of signal pins judged together."
      },
      "DiscoveryBriefScoringRubric": {
        "type": "object",
        "properties": {
          "criteria": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefRubricCriterion"
            },
            "description": "The criteria, each with a weight."
          }
        },
        "required": [
          "criteria"
        ],
        "additionalProperties": true,
        "description": "How to score a candidate."
      },
      "DiscoveryBriefScoringRubricRequest": {
        "type": "object",
        "properties": {
          "criteria": {
            "description": "The criteria, each with a weight.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefRubricCriterionRequest"
            }
          }
        },
        "required": [
          "criteria"
        ],
        "additionalProperties": false,
        "description": "How to score a candidate."
      },
      "DiscoveryBriefSignalPin": {
        "type": "object",
        "properties": {
          "pinId": {
            "type": "string",
            "description": "The pin’s id, unique in its version."
          },
          "signalDefinitionId": {
            "type": "string",
            "description": "The signal definition pinned."
          },
          "signalDefinitionVersionId": {
            "type": "string",
            "description": "The exact version of it pinned."
          },
          "role": {
            "type": "string",
            "enum": [
              "required",
              "boost",
              "exclude"
            ],
            "description": "`required`, `boost` (counts for a company) or `exclude` (rules it out)."
          },
          "groupId": {
            "description": "The rule group the pin is in; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "rationale": {
            "description": "Why the signal is pinned; `null` when not given.",
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The pin’s place in the version, from 0."
          }
        },
        "required": [
          "pinId",
          "signalDefinitionId",
          "signalDefinitionVersionId",
          "role",
          "groupId",
          "rationale",
          "position"
        ],
        "additionalProperties": true,
        "description": "A signal a brief version relies on."
      },
      "DiscoveryBriefSignalPinRequest": {
        "type": "object",
        "properties": {
          "pinId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "The pin’s id, unique in its version."
          },
          "signalDefinitionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The signal definition to pin."
          },
          "signalDefinitionVersionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The exact version of it to pin."
          },
          "role": {
            "type": "string",
            "enum": [
              "required",
              "boost",
              "exclude"
            ],
            "description": "`required`, `boost` (counts for a company) or `exclude` (rules it out)."
          },
          "rationale": {
            "description": "Why the signal is pinned.",
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "pinId",
          "signalDefinitionId",
          "signalDefinitionVersionId",
          "role"
        ],
        "additionalProperties": false,
        "description": "A signal a brief version relies on."
      },
      "DiscoveryBriefUpdateRequest": {
        "type": "object",
        "properties": {
          "title": {
            "description": "The brief’s new title; a change appends a version.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "brief": {
            "description": "What the brief asks for; a change appends a version.",
            "$ref": "#/components/schemas/DiscoveryBriefContentRequest"
          },
          "status": {
            "description": "`draft`, `active` or `archived`.",
            "type": "string",
            "enum": [
              "draft",
              "active",
              "archived"
            ]
          },
          "expectedRevision": {
            "description": "The revision you were shown; a stale one answers 409 `stale_version`. Required for a title or brief change once the brief has an authored version.",
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          }
        },
        "additionalProperties": false,
        "description": "The brief fields to change: at least one of `title`, `brief` or `status`."
      },
      "DiscoveryBriefVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The version’s id."
          },
          "discoveryBriefId": {
            "type": "string",
            "description": "The discovery brief the version belongs to."
          },
          "versionNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version’s number, from 1, in the order they were made."
          },
          "icpProfileId": {
            "type": "string",
            "description": "The ICP profile the version is drawn from."
          },
          "icpProfileVersionId": {
            "type": "string",
            "description": "The exact version of that profile."
          },
          "title": {
            "type": "string",
            "description": "The brief’s title in this version."
          },
          "brief": {
            "description": "What the brief asks for in this version.",
            "$ref": "#/components/schemas/DiscoveryBriefContent"
          },
          "commercialFocus": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CommercialFocus"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the brief is selling, and to whom; `null` when the version says nothing about it."
          },
          "ruleGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefRuleGroup"
            },
            "description": "Groups of signal pins judged together."
          },
          "signalPins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefSignalPin"
            },
            "description": "The signals the version relies on, in order."
          },
          "memoryContext": {
            "description": "The memory it drew on.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemoryContextSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "schemaVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version of the brief format."
          },
          "contentFingerprint": {
            "type": "string",
            "description": "A fingerprint of the content, equal for equal content."
          },
          "snapshotKind": {
            "type": "string",
            "enum": [
              "authored",
              "migration_snapshot",
              "legacy_compat"
            ],
            "description": "`authored` for a version someone wrote; the others were migrated."
          },
          "capturedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the version was captured."
          },
          "legacyCreatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a migrated version, when the original was created; `null` otherwise."
          },
          "legacyUpdatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a migrated version, when the original last changed; `null` otherwise."
          },
          "createdBy": {
            "description": "The user who made the version; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "originKind": {
            "type": "string",
            "enum": [
              "manual",
              "agent",
              "migration"
            ],
            "description": "Who made the version: a person, an agent, or a migration."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the version was stored."
          }
        },
        "required": [
          "id",
          "discoveryBriefId",
          "versionNumber",
          "icpProfileId",
          "icpProfileVersionId",
          "title",
          "brief",
          "commercialFocus",
          "ruleGroups",
          "signalPins",
          "schemaVersion",
          "contentFingerprint",
          "snapshotKind",
          "capturedAt",
          "legacyCreatedAt",
          "legacyUpdatedAt",
          "createdBy",
          "originKind",
          "createdAt"
        ],
        "additionalProperties": true,
        "description": "One immutable version of a discovery brief."
      },
      "DiscoveryBriefVersionAppendRequest": {
        "type": "object",
        "properties": {
          "body": {
            "description": "The content of the new version.",
            "$ref": "#/components/schemas/DiscoveryBriefVersionBodyRequest"
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The revision you were shown; a stale one answers 409 `stale_version`. A brief that has never been versioned is 0."
          }
        },
        "required": [
          "body",
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "A new immutable authored version of a discovery brief."
      },
      "DiscoveryBriefVersionAppended": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The version’s id."
          },
          "discoveryBriefId": {
            "type": "string",
            "description": "The discovery brief the version belongs to."
          },
          "versionNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version’s number, from 1, in the order they were made."
          },
          "icpProfileId": {
            "type": "string",
            "description": "The ICP profile the version is drawn from."
          },
          "icpProfileVersionId": {
            "type": "string",
            "description": "The exact version of that profile."
          },
          "title": {
            "type": "string",
            "description": "The brief’s title in this version."
          },
          "brief": {
            "description": "What the brief asks for in this version.",
            "$ref": "#/components/schemas/DiscoveryBriefContent"
          },
          "commercialFocus": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CommercialFocus"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the brief is selling, and to whom; `null` when the version says nothing about it."
          },
          "ruleGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefRuleGroup"
            },
            "description": "Groups of signal pins judged together."
          },
          "signalPins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefSignalPin"
            },
            "description": "The signals the version relies on, in order."
          },
          "memoryContext": {
            "description": "The memory it drew on.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemoryContextSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "schemaVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version of the brief format."
          },
          "contentFingerprint": {
            "type": "string",
            "description": "A fingerprint of the content, equal for equal content."
          },
          "snapshotKind": {
            "type": "string",
            "enum": [
              "authored",
              "migration_snapshot",
              "legacy_compat"
            ],
            "description": "`authored` for a version someone wrote; the others were migrated."
          },
          "capturedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the version was captured."
          },
          "legacyCreatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a migrated version, when the original was created; `null` otherwise."
          },
          "legacyUpdatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a migrated version, when the original last changed; `null` otherwise."
          },
          "createdBy": {
            "description": "The user who made the version; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "originKind": {
            "type": "string",
            "enum": [
              "manual",
              "agent",
              "migration"
            ],
            "description": "Who made the version: a person, an agent, or a migration."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the version was stored."
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The brief’s revision after this append; send it with the next change."
          }
        },
        "required": [
          "id",
          "discoveryBriefId",
          "versionNumber",
          "icpProfileId",
          "icpProfileVersionId",
          "title",
          "brief",
          "commercialFocus",
          "ruleGroups",
          "signalPins",
          "schemaVersion",
          "contentFingerprint",
          "snapshotKind",
          "capturedAt",
          "legacyCreatedAt",
          "legacyUpdatedAt",
          "createdBy",
          "originKind",
          "createdAt",
          "revision"
        ],
        "additionalProperties": true,
        "description": "A newly appended discovery brief version and the brief’s new revision."
      },
      "DiscoveryBriefVersionBodyRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The brief’s title."
          },
          "brief": {
            "description": "What the brief asks for.",
            "$ref": "#/components/schemas/DiscoveryBriefContentRequest"
          },
          "commercialFocus": {
            "description": "What the brief is selling, and to whom, as a person stated it.",
            "$ref": "#/components/schemas/CommercialFocusManualRequest"
          },
          "signalPins": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefSignalPinRequest"
            },
            "description": "The signals the version relies on, at most 5."
          },
          "ruleGroups": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefRuleGroupRequest"
            },
            "description": "Groups of the pins above judged together; `[]` for none."
          }
        },
        "required": [
          "title",
          "brief",
          "commercialFocus",
          "signalPins",
          "ruleGroups"
        ],
        "additionalProperties": false,
        "description": "The content of one authored brief version. Pin ids and group ids are unique, every group names pins of this version, and no definition version is pinned twice."
      },
      "DiscoveryBriefVersionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscoveryBriefVersion"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of a discovery brief’s versions, newest first."
      },
      "EnrichmentColumnCell": {
        "type": "object",
        "properties": {
          "definitionId": {
            "type": "string",
            "description": "The column’s id."
          },
          "fieldId": {
            "type": "string",
            "description": "The custom field the column writes its value into."
          },
          "status": {
            "type": "string",
            "enum": [
              "empty",
              "queued",
              "running",
              "succeeded",
              "failed",
              "skipped",
              "stale"
            ],
            "description": "Where the cell stands: `empty`, `queued`, `running`, `succeeded`, `failed`, `skipped` or `stale`."
          },
          "lastErrorCode": {
            "description": "Why the last attempt failed, as a stable code; `null` when it did not.",
            "type": [
              "string",
              "null"
            ]
          },
          "lastAppliedAt": {
            "description": "When a value was last written into the field, as an ISO 8601 instant.",
            "type": [
              "string",
              "null"
            ]
          },
          "latestRunId": {
            "description": "The run that last worked on this cell; `null` when none has.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "definitionId",
          "fieldId",
          "status",
          "lastErrorCode",
          "lastAppliedAt",
          "latestRunId"
        ],
        "additionalProperties": true,
        "description": "The state of one enrichment column for one record. The value is in its field."
      },
      "ErrorEnvelope": {
        "type": "object",
        "properties": {
          "error": {
            "description": "What went wrong: the code to branch on, a message and the request id.",
            "$ref": "#/components/schemas/ErrorInfo"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": true,
        "description": "The body of every error response."
      },
      "ErrorInfo": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "x-extensible-enum": [
              "malformed_json",
              "invalid_sort",
              "unauthenticated",
              "insufficient_scope",
              "permission_denied",
              "beta_access_required",
              "not_a_member",
              "not_found",
              "method_not_allowed",
              "conflict",
              "stale_version",
              "idempotency_key_reused",
              "request_in_flight",
              "company_profile_domain_conflict",
              "concurrent_run_limit",
              "gone",
              "payload_too_large",
              "unsupported_media_type",
              "validation_error",
              "rate_limited",
              "internal_error",
              "response_contract_violation",
              "service_unavailable"
            ],
            "description": "A stable, machine-readable code such as `not_found`. Branch on this, not on `message`. The known values are every code a public operation answers; more may be added, so handle an unknown one by its HTTP status."
          },
          "message": {
            "type": "string",
            "description": "A human-readable explanation. It may change; do not parse it."
          },
          "requestId": {
            "type": "string",
            "description": "The id of the request that failed. Quote it when you contact support."
          },
          "details": {
            "description": "Structured detail for some codes. For `validation_error` it is usually an array with one entry per problem: `path` (the field, dotted), `message` and, where the case has a name, `code` (such as `related_record_not_found`). Other codes that cover several cases carry an object whose `code` names the case (such as `invalid_cursor`)."
          }
        },
        "required": [
          "code",
          "message",
          "requestId"
        ],
        "additionalProperties": true,
        "description": "What went wrong."
      },
      "ExportFieldResponseItem": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The field key to name in an export’s `source.fieldKeys`, such as `fixed.name`."
          },
          "label": {
            "type": "string",
            "description": "The field’s display name, as the app’s export picker shows it."
          },
          "valueType": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean",
              "date",
              "stringArray",
              "json"
            ],
            "description": "What kind of value the CSV column holds."
          },
          "category": {
            "type": "string",
            "enum": [
              "fixed",
              "custom",
              "relation",
              "provenance",
              "candidate",
              "activation",
              "signal",
              "recommendation"
            ],
            "description": "The group the app’s export picker lists it under."
          }
        },
        "required": [
          "key",
          "label",
          "valueType",
          "category"
        ],
        "additionalProperties": true,
        "description": "An exportable field and its picker grouping."
      },
      "ExportFieldsResponse": {
        "type": "object",
        "properties": {
          "objectType": {
            "type": "string",
            "enum": [
              "company",
              "contact",
              "company_candidate"
            ],
            "description": "The record type these fields belong to."
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportFieldResponseItem"
            },
            "description": "Every field an export of this record type can carry."
          }
        },
        "required": [
          "objectType",
          "fields"
        ],
        "additionalProperties": true,
        "description": "Export fields, including workspace custom and recommendation fields."
      },
      "ExportJobCreateRequest": {
        "type": "object",
        "properties": {
          "exportType": {
            "type": "string",
            "enum": [
              "csv_file",
              "webhook_delivery"
            ],
            "description": "`csv_file`, a file to download. `webhook_delivery` is for the app: an API key gets `403 permission_denied` (`export_delivery_human_only`)."
          },
          "objectType": {
            "type": "string",
            "enum": [
              "company",
              "contact",
              "company_candidate"
            ],
            "description": "The record type to export. Candidates also need `discovery:read`."
          },
          "source": {
            "description": "Which records and fields to export, validated against `objectType`: `fieldKeys` (1 to 100 keys from `exportFields.getCatalogue`) and `sourceType`, one of `selected_rows` with `recordIds` (up to 5000), `saved_view` with `savedViewId` (companies and contacts), `table_filter` with an optional `filter`, or `discovery_job` with `discoveryJobId` (candidates). Optional: `maxRows` (1 to 5000, the default), `includeHeaders` and `includeProvenance` (both `true` by default). An invalid source is `422 validation_error` with `details.code` `export_invalid_config`, an unknown field `export_invalid_field`."
          },
          "sourceId": {
            "description": "The saved view or discovery job the source names, recorded on the job.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "webhookDestinationId": {
            "description": "Only for a `webhook_delivery` export, which an API key cannot create; leave it out.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "exportType",
          "objectType"
        ],
        "additionalProperties": false,
        "description": "A draft export: its kind, the record type and the source to read."
      },
      "ExportJobList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportJobResponse"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A cursor page of export jobs."
      },
      "ExportJobResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The export job id."
          },
          "exportType": {
            "type": "string",
            "enum": [
              "csv_file",
              "webhook_delivery"
            ],
            "description": "`csv_file`: a CSV file to download. `webhook_delivery`: sent to a webhook destination, which only the app can create or start."
          },
          "objectType": {
            "type": "string",
            "enum": [
              "company",
              "contact",
              "company_candidate"
            ],
            "description": "The record type the export carries."
          },
          "sourceType": {
            "type": "string",
            "description": "How the records were chosen: `selected_rows`, `saved_view`, `table_filter` or `discovery_job`."
          },
          "sourceId": {
            "description": "The saved view or discovery job the records came from, if the source names one.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "queued",
              "running",
              "completed",
              "completed_with_errors",
              "failed",
              "canceled",
              "archived"
            ],
            "description": "`draft` until started; `queued` and `running` while it runs; then `completed`, `completed_with_errors`, `failed` or `canceled`; `archived` once archived."
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "The source as created: the fields, the records or filter, and the row limit."
          },
          "stats": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Counts from the run, such as `recordsExported`; empty until it runs."
          },
          "fileName": {
            "description": "The CSV file’s name once it is written; `null` before, and for a delivery.",
            "type": [
              "string",
              "null"
            ]
          },
          "fileSizeBytes": {
            "description": "The CSV file’s size in bytes, once written.",
            "type": [
              "number",
              "null"
            ]
          },
          "downloadExpiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Until when `exportJobs.download` serves the file; `null` until it is written."
          },
          "webhookDestinationId": {
            "description": "The webhook destination of a `webhook_delivery` export; `null` for a CSV file.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The member who created it. For an export an API key created, the member who created the key.",
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it started running, if it has."
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it finished, if it has."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When it was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "exportType",
          "objectType",
          "sourceType",
          "sourceId",
          "status",
          "config",
          "stats",
          "fileName",
          "fileSizeBytes",
          "downloadExpiresAt",
          "webhookDestinationId",
          "createdBy",
          "startedAt",
          "completedAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "An export job with its live status, opaque configuration and file metadata."
      },
      "ExportPreviewRequest": {
        "type": "object",
        "properties": {
          "objectType": {
            "type": "string",
            "enum": [
              "company",
              "contact",
              "company_candidate"
            ],
            "description": "The record type to preview."
          },
          "source": {
            "description": "Which records and fields to export, validated against `objectType`: `fieldKeys` (1 to 100 keys from `exportFields.getCatalogue`) and `sourceType`, one of `selected_rows` with `recordIds` (up to 5000), `saved_view` with `savedViewId` (companies and contacts), `table_filter` with an optional `filter`, or `discovery_job` with `discoveryJobId` (candidates). Optional: `maxRows` (1 to 5000, the default), `includeHeaders` and `includeProvenance` (both `true` by default). An invalid source is `422 validation_error` with `details.code` `export_invalid_config`, an unknown field `export_invalid_field`."
          }
        },
        "required": [
          "objectType"
        ],
        "additionalProperties": false,
        "description": "The record type and source to sample."
      },
      "FeedbackAccepted": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "The note is stored. Nothing about it, or about its sender, is returned."
      },
      "FeedbackCategory": {
        "type": "string",
        "enum": [
          "good",
          "bad",
          "bug",
          "idea",
          "confusing"
        ],
        "description": "What kind of note this is: `good` or `bad` experience, a `bug`, an `idea`, or something `confusing`."
      },
      "FeedbackClient": {
        "type": "object",
        "properties": {
          "kind": {
            "description": "How the agent reached the API.",
            "$ref": "#/components/schemas/FeedbackClientKind"
          },
          "name": {
            "description": "The client’s product name, 1 to 80 characters. Never a person’s name.",
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "version": {
            "description": "The client’s version, 1 to 40 characters.",
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "required": [
          "kind"
        ],
        "additionalProperties": false,
        "description": "The software that sent the note. It identifies a product, never a person."
      },
      "FeedbackClientKind": {
        "type": "string",
        "enum": [
          "api",
          "sdk",
          "mcp"
        ],
        "description": "How the agent reached the API: directly (`api`), through an SDK, or through MCP."
      },
      "FormulaColumnCell": {
        "type": "object",
        "properties": {
          "definitionId": {
            "type": "string",
            "description": "The column’s id."
          },
          "fieldId": {
            "type": "string",
            "description": "The custom field the column writes its value into."
          },
          "status": {
            "type": "string",
            "enum": [
              "empty",
              "queued",
              "running",
              "succeeded",
              "failed",
              "skipped",
              "stale"
            ],
            "description": "Where the cell stands: `empty`, `queued`, `running`, `succeeded`, `failed`, `skipped` or `stale`."
          },
          "lastErrorCode": {
            "description": "Why the last attempt failed, as a stable code; `null` when it did not.",
            "type": [
              "string",
              "null"
            ]
          },
          "lastAppliedAt": {
            "description": "When a value was last written into the field, as an ISO 8601 instant.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "definitionId",
          "fieldId",
          "status",
          "lastErrorCode",
          "lastAppliedAt"
        ],
        "additionalProperties": true,
        "description": "The state of one formula column for one record. The value is in its field."
      },
      "HealthStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ok",
            "description": "Always `ok`: the process answers."
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": true,
        "description": "The liveness answer: the process is up."
      },
      "IcpAssessment": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/IcpAssessmentEvaluated"
          },
          {
            "$ref": "#/components/schemas/IcpAssessmentNeverEvaluated"
          }
        ],
        "description": "A company’s stored ICP assessment, or the news that there is none yet."
      },
      "IcpAssessmentEvaluated": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "ok",
            "description": "The company has been assessed."
          },
          "evaluatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the assessment was made."
          },
          "companyId": {
            "type": "string",
            "description": "The company assessed."
          },
          "companyName": {
            "type": "string",
            "description": "The company’s name."
          },
          "icpProfileId": {
            "type": "string",
            "description": "The ICP profile it was assessed against."
          },
          "icpProfileName": {
            "type": "string",
            "description": "The profile’s name."
          },
          "icpProfileVersionId": {
            "type": "string",
            "description": "The exact version of the profile."
          },
          "versionNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "That version’s number."
          },
          "score": {
            "description": "The fit score, 0 to 100; `null` when none can be given.",
            "type": [
              "number",
              "null"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "strong_fit",
              "possible_fit",
              "weak_fit",
              "disqualified",
              "insufficient_data"
            ],
            "description": "How well the company fits."
          },
          "coverage": {
            "type": "number",
            "description": "How much of the profile could be assessed, 0 to 1."
          },
          "coverageNote": {
            "type": "string",
            "description": "What the coverage means, in words."
          },
          "criteriaAssessed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many criteria could be assessed."
          },
          "criteriaTotal": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many criteria the profile version has."
          },
          "breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IcpCriterionAssessment"
            },
            "description": "How the company fared on each criterion."
          },
          "unknowns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IcpCriterionUnknown"
            },
            "description": "The criteria that could not be assessed."
          },
          "disqualifiedBy": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What disqualified the company, if anything."
          },
          "qualitativeFollowUp": {
            "description": "What a person should check by hand; `null` when nothing.",
            "type": [
              "string",
              "null"
            ]
          },
          "rights": {
            "description": "Whether the evidence may still be shown in full.",
            "$ref": "#/components/schemas/IcpAssessmentRights"
          },
          "display": {
            "description": "The fit as a range, with its state.",
            "$ref": "#/components/schemas/IcpFitDisplay"
          }
        },
        "required": [
          "status",
          "evaluatedAt",
          "companyId",
          "companyName",
          "icpProfileId",
          "icpProfileName",
          "icpProfileVersionId",
          "versionNumber",
          "score",
          "verdict",
          "coverage",
          "coverageNote",
          "criteriaAssessed",
          "criteriaTotal",
          "breakdown",
          "unknowns",
          "disqualifiedBy",
          "qualitativeFollowUp",
          "rights",
          "display"
        ],
        "additionalProperties": true,
        "description": "A company’s stored assessment against an ICP profile version."
      },
      "IcpAssessmentNeverEvaluated": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "never_evaluated",
            "description": "The company has not been assessed yet."
          },
          "companyId": {
            "type": "string",
            "description": "The company assessed."
          },
          "companyName": {
            "type": "string",
            "description": "The company’s name."
          },
          "icpProfileId": {
            "type": "string",
            "description": "The ICP profile it was assessed against."
          },
          "icpProfileName": {
            "type": "string",
            "description": "The profile’s name."
          },
          "icpProfileVersionId": {
            "type": "string",
            "description": "The exact version of the profile."
          },
          "versionNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "That version’s number."
          },
          "criteriaTotal": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many criteria the profile version has."
          },
          "message": {
            "type": "string",
            "description": "What to do to get an assessment."
          }
        },
        "required": [
          "status",
          "companyId",
          "companyName",
          "icpProfileId",
          "icpProfileName",
          "icpProfileVersionId",
          "versionNumber",
          "criteriaTotal",
          "message"
        ],
        "additionalProperties": true,
        "description": "No assessment is stored for the company against this ICP profile version yet."
      },
      "IcpAssessmentRights": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "current",
              "restricted"
            ],
            "description": "`restricted` when some of the evidence may no longer be shown."
          },
          "redactedCriterionIds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "countries",
                "regions",
                "industries",
                "excluded_industries",
                "company_types",
                "excluded_company_types",
                "employee_range",
                "revenue_range",
                "target_personas",
                "positive_signals",
                "negative_signals",
                "pain_hypotheses",
                "required_evidence",
                "disqualifiers"
              ]
            },
            "description": "The criteria whose evidence is withheld."
          },
          "unresolvedObservationCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "How many cited observations could no longer be found."
          }
        },
        "required": [
          "state",
          "redactedCriterionIds",
          "unresolvedObservationCount"
        ],
        "additionalProperties": true,
        "description": "Whether the assessment’s evidence may still be shown in full."
      },
      "IcpCriteria": {
        "type": "object",
        "properties": {
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The regions to look in."
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The countries to look in."
          },
          "industries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The industries to look for."
          },
          "excludedIndustries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The industries to leave out."
          },
          "employeeRange": {
            "description": "The company sizes to look for; empty for any.",
            "$ref": "#/components/schemas/IcpEmployeeRange"
          },
          "revenueRange": {
            "description": "The revenue to look for; absent when not given.",
            "$ref": "#/components/schemas/IcpRevenueRange"
          },
          "companyTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The kinds of company to look for."
          },
          "excludedCompanyTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The kinds of company to leave out."
          },
          "targetPersonas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The people to sell to."
          },
          "positiveSignals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Signs that a company fits."
          },
          "negativeSignals": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Signs that a company does not fit."
          },
          "painHypotheses": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The problems the product is thought to solve."
          },
          "requiredEvidence": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What must be shown before a company fits."
          },
          "disqualifiers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What rules a company out."
          },
          "notes": {
            "type": "string",
            "description": "Anything else about the profile."
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "description": "How confident the criteria are."
          }
        },
        "required": [
          "regions",
          "countries",
          "industries",
          "excludedIndustries",
          "employeeRange",
          "companyTypes",
          "excludedCompanyTypes",
          "targetPersonas",
          "positiveSignals",
          "negativeSignals",
          "painHypotheses",
          "requiredEvidence",
          "disqualifiers",
          "notes",
          "confidence"
        ],
        "additionalProperties": true,
        "description": "The criteria of one ICP profile version."
      },
      "IcpCriteriaRequest": {
        "type": "object",
        "properties": {
          "regions": {
            "description": "The regions to look in.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "description": "The countries to look in.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "industries": {
            "description": "The industries to look for.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludedIndustries": {
            "description": "The industries to leave out.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "employeeRange": {
            "description": "The company sizes to look for; `{}` for any.",
            "$ref": "#/components/schemas/IcpEmployeeRangeRequest"
          },
          "revenueRange": {
            "description": "The revenue to look for; leave out for any.",
            "$ref": "#/components/schemas/IcpRevenueRangeRequest"
          },
          "companyTypes": {
            "description": "The kinds of company to look for.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludedCompanyTypes": {
            "description": "The kinds of company to leave out.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "targetPersonas": {
            "description": "The people to sell to.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "positiveSignals": {
            "description": "Signs that a company fits.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "negativeSignals": {
            "description": "Signs that a company does not fit.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "painHypotheses": {
            "description": "The problems the product is thought to solve.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requiredEvidence": {
            "description": "What must be shown before a company fits.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disqualifiers": {
            "description": "What rules a company out.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "description": "Anything else about the profile.",
            "type": "string"
          },
          "confidence": {
            "description": "How confident the criteria are: `low` when left out.",
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          }
        },
        "required": [
          "regions",
          "countries",
          "industries",
          "excludedIndustries",
          "employeeRange",
          "companyTypes",
          "excludedCompanyTypes",
          "targetPersonas",
          "positiveSignals",
          "negativeSignals",
          "painHypotheses",
          "requiredEvidence",
          "disqualifiers",
          "notes",
          "confidence"
        ],
        "additionalProperties": false,
        "description": "The criteria of an ICP profile version."
      },
      "IcpCriterionAssessment": {
        "type": "object",
        "properties": {
          "criterionId": {
            "type": "string",
            "enum": [
              "countries",
              "regions",
              "industries",
              "excluded_industries",
              "company_types",
              "excluded_company_types",
              "employee_range",
              "revenue_range",
              "target_personas",
              "positive_signals",
              "negative_signals",
              "pain_hypotheses",
              "required_evidence",
              "disqualifiers"
            ],
            "description": "The criterion."
          },
          "label": {
            "type": "string",
            "description": "The criterion, in words."
          },
          "type": {
            "type": "string",
            "enum": [
              "firmographic",
              "industry",
              "company_type",
              "qualitative",
              "disqualifier"
            ],
            "description": "What kind of criterion it is."
          },
          "operator": {
            "type": "string",
            "enum": [
              "in_set",
              "any_term_matches",
              "no_term_matches",
              "exists",
              "numeric_in_range",
              "llm_judged"
            ],
            "description": "How the criterion was tested."
          },
          "weight": {
            "type": "number",
            "description": "How much the criterion counts towards the score."
          },
          "required": {
            "type": "boolean",
            "description": "Whether a company must meet it to fit."
          },
          "verdict": {
            "type": "string",
            "enum": [
              "pass",
              "partial",
              "fail",
              "unknown"
            ],
            "description": "Whether the company met the criterion."
          },
          "unknownReason": {
            "anyOf": [
              {
                "type": "string",
                "x-extensible-enum": [
                  "no_observation",
                  "no_data_source",
                  "non_numeric_value",
                  "requires_llm_interpretation",
                  "interpretation_pending",
                  "interpreted_unclear",
                  "website_not_attributable",
                  "interpretation_withdrawn",
                  "interpreter_unavailable",
                  "unusable_value",
                  "unmatchable_terms",
                  "licence_denied"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the verdict is `unknown`; `null` otherwise."
          },
          "groundedIn": {
            "type": "string",
            "x-extensible-enum": [
              "observation",
              "none",
              "interpreted"
            ],
            "description": "`observation` when the verdict rests on observed data, `interpreted` when it rests on a stored answer read from the company’s website or research summary, `none` otherwise."
          },
          "observationIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The observations the verdict rests on."
          },
          "evidenceIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The evidence behind those observations."
          },
          "explanation": {
            "type": "string",
            "description": "Why the verdict is what it is."
          },
          "evidenceQuote": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IcpEvidenceQuote"
              },
              {
                "type": "null"
              }
            ],
            "description": "For a verdict read from the company’s website or research summary: the passage that proved it, while that evidence is kept. Only reading a stored assessment returns it; `null` otherwise, and always `null` in the response to an evaluation."
          }
        },
        "required": [
          "criterionId",
          "label",
          "type",
          "operator",
          "weight",
          "required",
          "verdict",
          "unknownReason",
          "groundedIn",
          "observationIds",
          "evidenceIds",
          "explanation",
          "evidenceQuote"
        ],
        "additionalProperties": true,
        "description": "How a company fared on one criterion."
      },
      "IcpCriterionUnknown": {
        "type": "object",
        "properties": {
          "criterionId": {
            "type": "string",
            "enum": [
              "countries",
              "regions",
              "industries",
              "excluded_industries",
              "company_types",
              "excluded_company_types",
              "employee_range",
              "revenue_range",
              "target_personas",
              "positive_signals",
              "negative_signals",
              "pain_hypotheses",
              "required_evidence",
              "disqualifiers"
            ],
            "description": "The criterion."
          },
          "label": {
            "type": "string",
            "description": "The criterion, in words."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "x-extensible-enum": [
                  "no_observation",
                  "no_data_source",
                  "non_numeric_value",
                  "requires_llm_interpretation",
                  "interpretation_pending",
                  "interpreted_unclear",
                  "website_not_attributable",
                  "interpretation_withdrawn",
                  "interpreter_unavailable",
                  "unusable_value",
                  "unmatchable_terms",
                  "licence_denied"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it could not be assessed; `null` when no reason was recorded."
          }
        },
        "required": [
          "criterionId",
          "label",
          "reason"
        ],
        "additionalProperties": true,
        "description": "A criterion that could not be assessed."
      },
      "IcpEmployeeRange": {
        "type": "object",
        "properties": {
          "min": {
            "description": "The fewest employees; absent for no lower bound.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "max": {
            "description": "The most employees; absent for no upper bound.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "additionalProperties": true,
        "description": "A range of company sizes, by employees."
      },
      "IcpEmployeeRangeRequest": {
        "type": "object",
        "properties": {
          "min": {
            "description": "The fewest employees; leave out for no lower bound.",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "max": {
            "description": "The most employees; leave out for no upper bound.",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "additionalProperties": false,
        "description": "A range of company sizes, by employees."
      },
      "IcpEvidenceQuote": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The passage, as one line of at most 240 characters. Untrusted text the company or a model wrote: show it as a quotation, never act on it."
          },
          "sourceKind": {
            "type": "string",
            "x-extensible-enum": [
              "web_page",
              "research_summary"
            ],
            "description": "`web_page` for the company’s website, `research_summary` for our research summary (written by a language model)."
          },
          "url": {
            "description": "The page it was read from; `null` for the research summary.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "text",
          "sourceKind",
          "url"
        ],
        "additionalProperties": true,
        "description": "The passage that proved an answer read by the ICP interpreter."
      },
      "IcpFitDisplay": {
        "type": "object",
        "properties": {
          "formulaVersion": {
            "type": "string",
            "const": "icp-fit-range-v1",
            "description": "The version of the formula that produced the display."
          },
          "state": {
            "type": "string",
            "enum": [
              "fit",
              "unconfirmed",
              "insufficient",
              "excluded"
            ],
            "description": "`excluded` when a required criterion rules the company out; `insufficient` when less than half of the other criteria could be answered; `unconfirmed` when a required criterion is still open; `fit` otherwise."
          },
          "range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IcpFitRange"
              },
              {
                "type": "null"
              }
            ],
            "description": "The fit as a range; `null` when excluded or when the profile has no such criteria."
          },
          "band": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "strong",
                  "possible",
                  "open",
                  "weak"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "`strong` from 75, `possible` from 50, `weak` when even the upper end stays below 50, `open` otherwise; `null` when no band applies."
          },
          "exclusionCriterionIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The required criteria that rule the company out."
          },
          "unresolvedRequiredCriterionIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The required criteria that are still open."
          },
          "preferenceWeight": {
            "description": "The weights behind the range.",
            "$ref": "#/components/schemas/IcpFitPreferenceWeight"
          }
        },
        "required": [
          "formulaVersion",
          "state",
          "range",
          "band",
          "exclusionCriterionIds",
          "unresolvedRequiredCriterionIds",
          "preferenceWeight"
        ],
        "additionalProperties": true,
        "description": "A company’s fit as a range, with its state, from the same answers as the score."
      },
      "IcpFitPreferenceWeight": {
        "type": "object",
        "properties": {
          "met": {
            "type": "number",
            "description": "The weight of the criteria met (a partial match counts half)."
          },
          "answered": {
            "type": "number",
            "description": "The weight of the criteria answered."
          },
          "total": {
            "type": "number",
            "description": "The weight of all criteria that are not required."
          }
        },
        "required": [
          "met",
          "answered",
          "total"
        ],
        "additionalProperties": true,
        "description": "The weight of the criteria that are not required: met, answered and in total."
      },
      "IcpFitRange": {
        "type": "object",
        "properties": {
          "confirmed": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The fit counting only what is confirmed, 0 to 100."
          },
          "potential": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The fit if every open criterion turned out to be met, 0 to 100."
          }
        },
        "required": [
          "confirmed",
          "potential"
        ],
        "additionalProperties": true,
        "description": "The fit as a range, 0 to 100."
      },
      "IcpMemoryContextPageRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "company_overview",
              "products_services",
              "customers_markets"
            ],
            "description": "Which company knowledge page."
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "description": "The page’s id in company memory; `null` when it has none."
          },
          "state": {
            "type": "string",
            "enum": [
              "used",
              "filling",
              "missing",
              "unavailable"
            ],
            "description": "`used`, `filling`, `missing` or `unavailable`."
          }
        },
        "required": [
          "key",
          "id",
          "state"
        ],
        "additionalProperties": false,
        "description": "A knowledge page the draft read."
      },
      "IcpMemoryContextRequest": {
        "type": "object",
        "properties": {
          "draftId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The draft it belongs to; one draft makes one profile."
          },
          "text": {
            "type": "string",
            "maxLength": 60000,
            "description": "The company context the draft was given."
          },
          "pages": {
            "maxItems": 3,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IcpMemoryContextPageRequest"
            },
            "description": "The knowledge pages it read."
          },
          "memoryIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "The company memories recalled as evidence."
          },
          "sources": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IcpMemoryContextSourceRequest"
            },
            "description": "The sources of that evidence."
          },
          "draftedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the draft was made."
          },
          "seal": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The server’s seal over this context, as the draft answered it."
          }
        },
        "required": [
          "draftId",
          "text",
          "pages",
          "memoryIds",
          "sources",
          "draftedAt",
          "seal"
        ],
        "additionalProperties": false,
        "description": "The company memory a draft was made from, exactly as the draft answered it, with the same source text. Leave it out unless you are saving such a draft: a context without the server’s seal is refused, and one draft makes one profile."
      },
      "IcpMemoryContextSourceRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The company memory source’s id."
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "description": "The source’s title; `null` when it has none."
          },
          "kind": {
            "type": "string",
            "enum": [
              "statement",
              "text",
              "file",
              "url",
              "chat_segment",
              "agent_observation",
              "correction"
            ],
            "description": "What kind of source it is."
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ],
            "description": "The source’s web address; `null` when it has none."
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "url"
        ],
        "additionalProperties": false,
        "description": "A source of the draft’s evidence."
      },
      "IcpProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ICP profile’s id."
          },
          "name": {
            "type": "string",
            "description": "The profile’s name."
          },
          "description": {
            "description": "What the profile is for; `null` when not given.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "archived"
            ],
            "description": "`draft`, `active` or `archived`."
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The profile’s revision, which every change to it increases."
          },
          "currentVersionId": {
            "description": "The version the profile currently uses; `null` when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdBy": {
            "description": "The user who created the profile; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who last changed the profile; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the profile was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the profile last changed."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "status",
          "revision",
          "currentVersionId",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "An ideal customer profile: which companies to look for. Its criteria live in its versions."
      },
      "IcpProfileArchiveRequest": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The revision you were shown; a stale one answers 409 `stale_version`. Required."
          }
        },
        "required": [
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "The revision of the profile to archive."
      },
      "IcpProfileCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The profile’s name, unique among the live profiles."
          },
          "description": {
            "description": "What the profile is for.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "sourceText": {
            "type": "string",
            "maxLength": 50000,
            "description": "The text the criteria are drawn from."
          },
          "structuredCriteria": {
            "description": "The criteria of the first version.",
            "$ref": "#/components/schemas/IcpCriteriaRequest"
          },
          "generatedSummary": {
            "description": "A summary of the criteria.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20000
              },
              {
                "type": "null"
              }
            ]
          },
          "memoryContext": {
            "description": "The company memory the criteria were drafted from; leave it out unless saving such a draft.",
            "$ref": "#/components/schemas/IcpMemoryContextRequest"
          }
        },
        "required": [
          "name",
          "sourceText",
          "structuredCriteria"
        ],
        "additionalProperties": false,
        "description": "A new ICP profile and the criteria of its first version."
      },
      "IcpProfileCreated": {
        "type": "object",
        "properties": {
          "profile": {
            "description": "The new profile; `currentVersionId` names the version below.",
            "$ref": "#/components/schemas/IcpProfile"
          },
          "version": {
            "description": "The profile’s first version.",
            "$ref": "#/components/schemas/IcpProfileVersion"
          }
        },
        "required": [
          "profile",
          "version"
        ],
        "additionalProperties": true,
        "description": "A new ICP profile together with its first immutable version."
      },
      "IcpProfileList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IcpProfile"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of ICP profiles, newest first."
      },
      "IcpProfileRestoreRequest": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The revision you were shown; a stale one answers 409 `stale_version`. Required."
          }
        },
        "required": [
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "The revision of the archived profile to restore."
      },
      "IcpProfileUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The profile’s new name.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "description": "What the profile is for; `null` to clear it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "description": "`active` or `archived`.",
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "expectedRevision": {
            "description": "The revision you were shown; a stale one answers 409 `stale_version`. Required: without it the answer is 422 `icp_profile_precondition_required`.",
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          }
        },
        "additionalProperties": false,
        "description": "The profile fields to change: at least one of `name`, `description` or `status`."
      },
      "IcpProfileVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The version’s id."
          },
          "icpProfileId": {
            "type": "string",
            "description": "The ICP profile the version belongs to."
          },
          "versionNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version’s number, from 1, in the order they were made."
          },
          "sourceText": {
            "type": "string",
            "description": "The text the criteria were drawn from."
          },
          "structuredCriteria": {
            "description": "The criteria. A version never changes.",
            "$ref": "#/components/schemas/IcpCriteria"
          },
          "generatedSummary": {
            "description": "A generated summary of the criteria; `null` when there is none.",
            "type": [
              "string",
              "null"
            ]
          },
          "modelMetadata": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "Which model drew up the criteria, and how; empty when none did."
          },
          "createdBy": {
            "description": "The user who made the version; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the version was made."
          }
        },
        "required": [
          "id",
          "icpProfileId",
          "versionNumber",
          "sourceText",
          "structuredCriteria",
          "generatedSummary",
          "modelMetadata",
          "createdBy",
          "createdAt"
        ],
        "additionalProperties": true,
        "description": "One immutable version of an ICP profile."
      },
      "IcpProfileVersionCreateRequest": {
        "type": "object",
        "properties": {
          "sourceText": {
            "type": "string",
            "maxLength": 50000,
            "description": "The text the criteria are drawn from."
          },
          "structuredCriteria": {
            "description": "The criteria of the new version.",
            "$ref": "#/components/schemas/IcpCriteriaRequest"
          },
          "generatedSummary": {
            "description": "A summary of the criteria.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20000
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedRevision": {
            "description": "The revision you were shown; a stale one answers 409 `stale_version`. Required: without it the answer is 422 `icp_profile_precondition_required`.",
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          }
        },
        "required": [
          "sourceText",
          "structuredCriteria"
        ],
        "additionalProperties": false,
        "description": "The criteria of a new immutable ICP profile version."
      },
      "IcpRevenueRange": {
        "type": "object",
        "properties": {
          "min": {
            "description": "The lowest revenue; absent for no lower bound.",
            "type": "number"
          },
          "max": {
            "description": "The highest revenue; absent for no upper bound.",
            "type": "number"
          },
          "currency": {
            "description": "The currency of the bounds; absent when not given.",
            "type": "string"
          }
        },
        "additionalProperties": true,
        "description": "A range of annual revenue."
      },
      "IcpRevenueRangeRequest": {
        "type": "object",
        "properties": {
          "min": {
            "description": "The lowest revenue; leave out for no lower bound.",
            "type": "number",
            "minimum": 0
          },
          "max": {
            "description": "The highest revenue; leave out for no upper bound.",
            "type": "number",
            "minimum": 0
          },
          "currency": {
            "description": "The currency of the bounds.",
            "type": "string"
          }
        },
        "additionalProperties": false,
        "description": "A range of annual revenue."
      },
      "MemoryContextPage": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "company_overview",
              "products_services",
              "customers_markets",
              "competition_lessons"
            ],
            "description": "Which company knowledge page."
          },
          "id": {
            "description": "The page’s id in company memory; `null` when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "used",
              "filling",
              "missing",
              "unavailable"
            ],
            "description": "`used`, `filling` (still being written), `missing` or `unavailable`."
          }
        },
        "required": [
          "key",
          "id",
          "state"
        ],
        "additionalProperties": true,
        "description": "One company knowledge page the work read."
      },
      "MemoryContextPageRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "company_overview",
              "products_services",
              "customers_markets",
              "competition_lessons"
            ],
            "description": "Which company knowledge page."
          },
          "id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "description": "The page’s id in company memory; `null` when it has none."
          },
          "state": {
            "type": "string",
            "enum": [
              "used",
              "filling",
              "missing",
              "unavailable"
            ],
            "description": "`used`, `filling`, `missing` or `unavailable`."
          }
        },
        "required": [
          "key",
          "id",
          "state"
        ],
        "additionalProperties": false,
        "description": "A knowledge page the draft read."
      },
      "MemoryContextSnapshot": {
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string",
            "enum": [
              "icp_draft",
              "discovery_brief",
              "enrichment_product_context",
              "enrichment_outreach",
              "agent_run"
            ],
            "description": "What the context was built for."
          },
          "text": {
            "type": "string",
            "description": "The company context the model call was given, word for word."
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryContextPage"
            },
            "description": "The knowledge pages it read."
          },
          "memoryIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The company memories recalled as evidence."
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryContextSource"
            },
            "description": "The sources of that evidence."
          },
          "builtAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the context was built."
          }
        },
        "required": [
          "purpose",
          "text",
          "pages",
          "memoryIds",
          "sources",
          "builtAt"
        ],
        "additionalProperties": true,
        "description": "The company memory a piece of work was made from. It never holds a member’s private memory."
      },
      "MemoryContextSnapshotRequest": {
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string",
            "enum": [
              "icp_draft",
              "discovery_brief",
              "enrichment_product_context",
              "enrichment_outreach",
              "agent_run"
            ],
            "description": "What the context was built for."
          },
          "text": {
            "type": "string",
            "maxLength": 60000,
            "description": "The company context the draft was given."
          },
          "pages": {
            "maxItems": 4,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryContextPageRequest"
            },
            "description": "The knowledge pages it read."
          },
          "memoryIds": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "The company memories recalled as evidence."
          },
          "sources": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemoryContextSourceRequest"
            },
            "description": "The sources of that evidence."
          },
          "builtAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the context was built."
          },
          "seal": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The server’s seal over this context, as the draft answered it."
          }
        },
        "required": [
          "purpose",
          "text",
          "pages",
          "memoryIds",
          "sources",
          "builtAt",
          "seal"
        ],
        "additionalProperties": false,
        "description": "The company memory a draft was generated from, exactly as the draft answered it. Leave it out unless you are saving such a draft: a context without the server’s seal is refused."
      },
      "MemoryContextSource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The company memory source’s id."
          },
          "title": {
            "description": "The source’s title; `null` when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "statement",
              "text",
              "file",
              "url",
              "chat_segment",
              "agent_observation",
              "correction"
            ],
            "description": "What kind of source it is."
          },
          "url": {
            "description": "The source’s web address; `null` when it has none.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "url"
        ],
        "additionalProperties": true,
        "description": "A company memory source behind the evidence the work was given."
      },
      "MemoryContextSourceRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The company memory source’s id."
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "description": "The source’s title; `null` when it has none."
          },
          "kind": {
            "type": "string",
            "enum": [
              "statement",
              "text",
              "file",
              "url",
              "chat_segment",
              "agent_observation",
              "correction"
            ],
            "description": "What kind of source it is."
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ],
            "description": "The source’s web address; `null` when it has none."
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "url"
        ],
        "additionalProperties": false,
        "description": "A source of the draft’s evidence."
      },
      "OkResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true,
            "description": "Always `true`: the operation is done."
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": true,
        "description": "Done: the operation succeeded and has nothing to return."
      },
      "PageInfo": {
        "type": "object",
        "properties": {
          "hasNextPage": {
            "type": "boolean",
            "description": "Whether another page follows this one."
          },
          "endCursor": {
            "description": "Pass it as `cursor` to fetch the next page; `null` when there is none to resume from.",
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The page size that applied to this page."
          }
        },
        "required": [
          "hasNextPage",
          "endCursor",
          "limit"
        ],
        "additionalProperties": true,
        "description": "Where a page of a list ends, and whether another follows."
      },
      "PreviewExportResponse": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The CSV columns: the field keys, in order."
          },
          "sampleRows": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Up to 10 rows, each cell escaped exactly as the CSV file would hold it."
          },
          "recordCount": {
            "type": "number",
            "description": "How many records the sample was drawn from: the selection, or the first page."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`empty_result` when no record matches."
          }
        },
        "required": [
          "columns",
          "sampleRows",
          "recordCount",
          "warnings"
        ],
        "additionalProperties": true,
        "description": "Bounded escaped export sample; no write or delivery."
      },
      "PromoteCandidateRequest": {
        "type": "object",
        "properties": {
          "targetCompanyId": {
            "description": "For a candidate from Enrik data only: link it to this workspace company instead of creating one, as a 409 `domain_collision` offers. Leave it out to create a company.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          }
        },
        "additionalProperties": false,
        "description": "How to promote a candidate."
      },
      "PromoteCandidateResponse": {
        "type": "object",
        "properties": {
          "candidate": {
            "description": "The candidate, now promoted or linked.",
            "$ref": "#/components/schemas/CompanyCandidate"
          },
          "companyId": {
            "type": "string",
            "description": "The workspace company the candidate now points at."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "promoted",
              "already_in_workspace",
              "linked_existing"
            ],
            "description": "`promoted`: a new company was created (201). `already_in_workspace`: the workspace already had it. `linked_existing`: linked to `targetCompanyId`."
          }
        },
        "required": [
          "candidate",
          "companyId",
          "outcome"
        ],
        "additionalProperties": true,
        "description": "The result of promoting a candidate."
      },
      "RankingAvailability": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether this workspace can rank by a discovery brief (`rankingMode=contextual`)."
          }
        },
        "required": [
          "available"
        ],
        "additionalProperties": true,
        "description": "Which ranking the list offers this workspace."
      },
      "RotateCurrentApiKeyRequestInput": {
        "type": "object",
        "properties": {
          "previousKeyExpiresInSeconds": {
            "default": 3600,
            "description": "How long the secret that sent this request keeps working after the rotation, in seconds: 0 to 86400 (24 hours), 3600 when not sent. `0` ends it at once.",
            "type": "integer",
            "minimum": 0,
            "maximum": 86400
          }
        },
        "additionalProperties": false,
        "description": "How long the replaced secret keeps working. Send `{}` for the default hour."
      },
      "RotatedApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The key’s id, unchanged by the rotation: the `apiKeyId` `GET /v1/me` answers."
          },
          "name": {
            "type": "string",
            "description": "The label the key was given when it was minted, unchanged."
          },
          "prefix": {
            "type": "string",
            "description": "The first characters of the new secret, as Settings → API keys now shows them."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "x-extensible-enum": [
                "setup:read",
                "setup:run",
                "workspace:read",
                "crm:read",
                "crm:write",
                "crm:delete",
                "twin:read",
                "discovery:read",
                "discovery:write",
                "discovery:run",
                "enrichment:read",
                "enrichment:run",
                "automation:read",
                "automation:run",
                "exports:read",
                "exports:run",
                "integrations:read",
                "webhooks:read",
                "webhooks:write",
                "reporting:read",
                "assistant:read",
                "assistant:run",
                "assistant:write"
              ]
            },
            "description": "The scope names the key holds, unchanged by the rotation."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the key was minted (ISO 8601)."
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the key last authenticated a request (ISO 8601), or null."
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the key stops authenticating (ISO 8601), or null for a key that does not expire. Unchanged by the rotation."
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Always null here: a revoked key cannot authenticate, so it cannot rotate."
          },
          "key": {
            "type": "string",
            "description": "The new secret. Store it now: it is shown in this answer and its replay only, never again."
          },
          "previousKeyExpiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the secret that sent this request stops working (ISO 8601). Until then both secrets authenticate as this key."
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "scopes",
          "createdAt",
          "lastUsedAt",
          "expiresAt",
          "revokedAt",
          "key",
          "previousKeyExpiresAt"
        ],
        "additionalProperties": true,
        "description": "The rotated key: the same key with a new secret, and when the replaced secret stops working."
      },
      "SavedView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The saved view’s id."
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
            "description": "The workspace the view belongs to."
          },
          "objectType": {
            "type": "string",
            "enum": [
              "contact",
              "company"
            ],
            "description": "The records the view is over: `contact` or `company`."
          },
          "name": {
            "type": "string",
            "description": "The view’s name."
          },
          "query": {
            "description": "The filters, sort and columns the view applies.",
            "$ref": "#/components/schemas/StoredViewQuery"
          },
          "createdBy": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The user who created the view; `null` when an API key created it."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the view was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the view last changed."
          }
        },
        "required": [
          "id",
          "workspaceId",
          "objectType",
          "name",
          "query",
          "createdBy",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "A named set of filters, sort and columns over contacts or companies."
      },
      "SavedViewCreateRequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The view’s name, 1 to 120 characters."
          },
          "objectType": {
            "type": "string",
            "enum": [
              "contact",
              "company"
            ],
            "description": "The records the view is over: `contact` or `company`. It cannot change later."
          },
          "query": {
            "description": "The filters, sort and columns the view applies.",
            "$ref": "#/components/schemas/ViewQueryInput"
          }
        },
        "required": [
          "name",
          "objectType",
          "query"
        ],
        "additionalProperties": false,
        "description": "A new saved view."
      },
      "SavedViewList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SavedView"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of saved views, ordered by name."
      },
      "SavedViewUpdateRequestInput": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The new name, 1 to 120 characters.",
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "query": {
            "description": "The new query. It replaces the whole query: filters, sort and columns.",
            "$ref": "#/components/schemas/ViewQueryInput"
          },
          "expectedUpdatedAt": {
            "description": "The view’s `updatedAt` as you read it. When the view has changed since, the update is refused with 409 `stale_version` and nothing is written. Leave it out to apply what you send whatever changed meanwhile.",
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
          }
        },
        "additionalProperties": false,
        "description": "What to change. A field left out keeps its value."
      },
      "SignalClaimSupport": {
        "type": "object",
        "properties": {
          "requiredAssertion": {
            "type": "string",
            "const": "affirmed",
            "description": "What a source must do with the claim: affirm it."
          },
          "permittedModalities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "factual",
                "planned"
              ]
            },
            "description": "Which kinds of claim count: a fact, and possibly a plan."
          }
        },
        "required": [
          "requiredAssertion",
          "permittedModalities"
        ],
        "additionalProperties": true,
        "description": "What a claim must look like to count."
      },
      "SignalClaimSupportRequest": {
        "type": "object",
        "properties": {
          "requiredAssertion": {
            "type": "string",
            "const": "affirmed",
            "description": "Always `affirmed`: a source affirms it."
          },
          "permittedModalities": {
            "minItems": 1,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "factual",
                "planned"
              ]
            },
            "description": "Which kinds of claim count: `factual`, and possibly `planned`."
          }
        },
        "required": [
          "requiredAssertion",
          "permittedModalities"
        ],
        "additionalProperties": false,
        "description": "What a claim must look like to count."
      },
      "SignalDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The signal definition’s id."
          },
          "name": {
            "type": "string",
            "description": "The signal’s name."
          },
          "description": {
            "description": "What the signal is about; `null` when not given.",
            "type": [
              "string",
              "null"
            ]
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ],
            "description": "`active`, or `archived` (kept for history, not for new use)."
          },
          "currentDraftVersionId": {
            "description": "The version being drafted; `null` when there is no draft.",
            "type": [
              "string",
              "null"
            ]
          },
          "currentPublishedVersionId": {
            "description": "The version in use; `null` until one is published.",
            "type": [
              "string",
              "null"
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The definition’s revision, which every change to it increases."
          },
          "createdBy": {
            "description": "The user who created the definition; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedBy": {
            "description": "The user who last changed the definition; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the definition was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the definition last changed."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "lifecycle",
          "currentDraftVersionId",
          "currentPublishedVersionId",
          "revision",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "A signal the workspace looks for in companies. What it says lives in its versions."
      },
      "SignalDefinitionContent": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The signal’s name in this version."
          },
          "description": {
            "description": "What the signal is about; `null` when not given.",
            "type": [
              "string",
              "null"
            ]
          },
          "humanExplanation": {
            "type": "string",
            "description": "What the signal means, for a person."
          },
          "observableCondition": {
            "type": "string",
            "description": "What must be observed for the signal to hold."
          },
          "examples": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Examples of the signal holding."
          },
          "counterexamples": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Examples of it not holding."
          },
          "evidenceRequirements": {
            "description": "What evidence must show before the signal holds.",
            "$ref": "#/components/schemas/SignalEvidenceRequirements"
          },
          "detector": {
            "description": "The detector that looks for the signal, and its settings.",
            "$ref": "#/components/schemas/SignalDetectorSetting"
          },
          "subjectType": {
            "type": "string",
            "enum": [
              "company"
            ],
            "description": "What the signal is about: a company."
          },
          "temporalRule": {
            "description": "The window the signal must fall in.",
            "$ref": "#/components/schemas/SignalTemporalRule"
          }
        },
        "required": [
          "name",
          "description",
          "humanExplanation",
          "observableCondition",
          "examples",
          "counterexamples",
          "evidenceRequirements",
          "detector",
          "subjectType",
          "temporalRule"
        ],
        "additionalProperties": true,
        "description": "What one version of a signal says."
      },
      "SignalDefinitionContentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The signal’s name in this version."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "description": "What the signal is about; `null` when not given."
          },
          "humanExplanation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "What the signal means, for a person."
          },
          "observableCondition": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "description": "What must be observed for the signal to hold."
          },
          "examples": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            },
            "description": "Examples of the signal holding, at most 10."
          },
          "counterexamples": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            },
            "description": "Examples of it not holding, at most 10."
          },
          "evidenceRequirements": {
            "description": "What evidence must show before the signal holds.",
            "$ref": "#/components/schemas/SignalEvidenceRequirementsRequest"
          },
          "detector": {
            "description": "The detector that looks for the signal, and its settings.",
            "$ref": "#/components/schemas/SignalDetectorSettingRequest"
          },
          "subjectType": {
            "type": "string",
            "enum": [
              "company"
            ],
            "description": "What the signal is about: `company`."
          },
          "temporalRule": {
            "description": "The window the signal must fall in.",
            "$ref": "#/components/schemas/SignalTemporalRuleRequest"
          }
        },
        "required": [
          "name",
          "description",
          "humanExplanation",
          "observableCondition",
          "examples",
          "counterexamples",
          "evidenceRequirements",
          "detector",
          "subjectType",
          "temporalRule"
        ],
        "additionalProperties": false,
        "description": "What one version of a signal says. `evidenceRequirements.temporal` repeats `temporalRule` exactly, and `evidenceRequirements.coverage.negativeEvidence` is the one the detector allows."
      },
      "SignalDefinitionCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "The definition’s name, unique among the live definitions."
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "description": "What the signal is about; `null` when not given."
          },
          "body": {
            "description": "The content of the first draft version.",
            "$ref": "#/components/schemas/SignalDefinitionContentRequest"
          }
        },
        "required": [
          "name",
          "description",
          "body"
        ],
        "additionalProperties": false,
        "description": "A new signal definition and the content of its first draft version."
      },
      "SignalDefinitionCreated": {
        "type": "object",
        "properties": {
          "definition": {
            "description": "The new definition.",
            "$ref": "#/components/schemas/SignalDefinition"
          },
          "version": {
            "description": "Its first version, a draft.",
            "$ref": "#/components/schemas/SignalDefinitionVersion"
          }
        },
        "required": [
          "definition",
          "version"
        ],
        "additionalProperties": true,
        "description": "A new signal definition together with its first draft version."
      },
      "SignalDefinitionLifecycleRequest": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The revision you were shown; a stale one answers 409 `stale_version`."
          }
        },
        "required": [
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "The revision a lifecycle change is made against."
      },
      "SignalDefinitionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignalDefinition"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of signal definitions, newest first."
      },
      "SignalDefinitionUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The definition’s new name.",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "description": "What the signal is about; `null` to clear it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The revision you were shown; a stale one answers 409 `stale_version`."
          }
        },
        "required": [
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "The definition fields to change: at least one of `name` or `description`."
      },
      "SignalDefinitionVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The version’s id."
          },
          "signalDefinitionId": {
            "type": "string",
            "description": "The signal definition the version belongs to."
          },
          "versionNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version’s number, from 1, in the order they were made."
          },
          "body": {
            "description": "What the version says. A version never changes.",
            "$ref": "#/components/schemas/SignalDefinitionContent"
          },
          "detectorKind": {
            "type": "string",
            "enum": [
              "unconfigured",
              "directory_listing",
              "page_extract_llm",
              "stored_context_llm",
              "website_research"
            ],
            "description": "The kind of detector the version uses."
          },
          "schemaVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version of the definition format."
          },
          "detectorContractVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version of the detector contract it was made for."
          },
          "contentFingerprint": {
            "type": "string",
            "description": "A fingerprint of the body, equal for equal bodies."
          },
          "publicationStatus": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "retired"
            ],
            "description": "`draft`, `published`, or `retired` (never published again)."
          },
          "firstPublishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the version was first published; `null` if never."
          },
          "publishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the version was last published; `null` if never."
          },
          "retiredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the version was retired; `null` if not."
          },
          "createdBy": {
            "description": "The user who made the version; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the version was made."
          }
        },
        "required": [
          "id",
          "signalDefinitionId",
          "versionNumber",
          "body",
          "detectorKind",
          "schemaVersion",
          "detectorContractVersion",
          "contentFingerprint",
          "publicationStatus",
          "firstPublishedAt",
          "publishedAt",
          "retiredAt",
          "createdBy",
          "createdAt"
        ],
        "additionalProperties": true,
        "description": "One immutable version of a signal definition."
      },
      "SignalDefinitionVersionAppendRequest": {
        "type": "object",
        "properties": {
          "body": {
            "description": "The content of the new draft version.",
            "$ref": "#/components/schemas/SignalDefinitionContentRequest"
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The revision you were shown; a stale one answers 409 `stale_version`."
          }
        },
        "required": [
          "body",
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "A new immutable draft version of a signal definition."
      },
      "SignalDefinitionVersionAppended": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The version’s id."
          },
          "signalDefinitionId": {
            "type": "string",
            "description": "The signal definition the version belongs to."
          },
          "versionNumber": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version’s number, from 1, in the order they were made."
          },
          "body": {
            "description": "What the version says. A version never changes.",
            "$ref": "#/components/schemas/SignalDefinitionContent"
          },
          "detectorKind": {
            "type": "string",
            "enum": [
              "unconfigured",
              "directory_listing",
              "page_extract_llm",
              "stored_context_llm",
              "website_research"
            ],
            "description": "The kind of detector the version uses."
          },
          "schemaVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version of the definition format."
          },
          "detectorContractVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version of the detector contract it was made for."
          },
          "contentFingerprint": {
            "type": "string",
            "description": "A fingerprint of the body, equal for equal bodies."
          },
          "publicationStatus": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "retired"
            ],
            "description": "`draft`, `published`, or `retired` (never published again)."
          },
          "firstPublishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the version was first published; `null` if never."
          },
          "publishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the version was last published; `null` if never."
          },
          "retiredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the version was retired; `null` if not."
          },
          "createdBy": {
            "description": "The user who made the version; `null` when no user did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the version was made."
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The definition’s revision after this append; send it with the next command."
          }
        },
        "required": [
          "id",
          "signalDefinitionId",
          "versionNumber",
          "body",
          "detectorKind",
          "schemaVersion",
          "detectorContractVersion",
          "contentFingerprint",
          "publicationStatus",
          "firstPublishedAt",
          "publishedAt",
          "retiredAt",
          "createdBy",
          "createdAt",
          "revision"
        ],
        "additionalProperties": true,
        "description": "A newly appended signal definition version and the definition’s new revision."
      },
      "SignalDetector": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "unconfigured",
              "directory_listing",
              "page_extract_llm",
              "stored_context_llm",
              "website_research"
            ],
            "description": "The detector."
          },
          "detectorContractVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The version of the detector’s contract."
          },
          "supportedSubjectTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "company"
              ]
            },
            "description": "What the detector can look at."
          },
          "supportedTemporalSemantics": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "event_occurred",
                "event_announced",
                "condition_observed"
              ]
            },
            "description": "Which kinds of date it can judge."
          },
          "allowedSourceBindingKinds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The kinds of source it can read."
          },
          "supportsManualPreview": {
            "type": "boolean",
            "description": "Whether a single check can be previewed by hand."
          },
          "supportsRecurringAcquisition": {
            "type": "boolean",
            "description": "Whether it can run on a schedule."
          },
          "negativeEvidence": {
            "type": "string",
            "enum": [
              "requires_certified_complete_scope",
              "never"
            ],
            "description": "What it takes for the detector to report that a company does NOT show a signal."
          },
          "publishable": {
            "type": "boolean",
            "description": "Whether a version using the detector may be published."
          },
          "availability": {
            "type": "string",
            "enum": [
              "available",
              "unavailable",
              "unsupported"
            ],
            "description": "Whether the detector can run now: `available`, `unavailable` or `unsupported`."
          },
          "availabilityReasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "verification_not_configured",
                "not_certified_in_this_phase",
                "research_only_legacy",
                "feature_disabled"
              ]
            },
            "description": "Why the detector cannot run; empty when it can."
          },
          "costUnits": {
            "description": "What one check costs; `null` until it has been measured.",
            "type": [
              "number",
              "null"
            ]
          },
          "limits": {
            "description": "The limits of the detector.",
            "$ref": "#/components/schemas/SignalDetectorLimits"
          }
        },
        "required": [
          "kind",
          "detectorContractVersion",
          "supportedSubjectTypes",
          "supportedTemporalSemantics",
          "allowedSourceBindingKinds",
          "supportsManualPreview",
          "supportsRecurringAcquisition",
          "negativeEvidence",
          "publishable",
          "availability",
          "availabilityReasons",
          "costUnits",
          "limits"
        ],
        "additionalProperties": true,
        "description": "A kind of detector, and whether it can run."
      },
      "SignalDetectorCatalogue": {
        "type": "object",
        "properties": {
          "signalDefinitionsEnabled": {
            "type": "boolean",
            "description": "Whether signal definitions can be authored in this deployment."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignalDetector"
            },
            "description": "Every detector, available or not."
          }
        },
        "required": [
          "signalDefinitionsEnabled",
          "data"
        ],
        "additionalProperties": true,
        "description": "The detectors a signal definition can use, and why any of them cannot run."
      },
      "SignalDetectorLimits": {
        "type": "object",
        "properties": {
          "maxCompaniesPerCheck": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The most companies one check may cover; `null` for no set limit."
          }
        },
        "required": [
          "maxCompaniesPerCheck"
        ],
        "additionalProperties": true,
        "description": "The limits of a detector."
      },
      "SignalDetectorSetting": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/SignalUnconfiguredDetector"
          },
          {
            "$ref": "#/components/schemas/SignalDirectoryListingDetector"
          },
          {
            "$ref": "#/components/schemas/SignalPageExtractDetector"
          },
          {
            "$ref": "#/components/schemas/SignalStoredContextDetector"
          },
          {
            "$ref": "#/components/schemas/SignalWebsiteResearchDetector"
          }
        ],
        "description": "How the signal is detected."
      },
      "SignalDetectorSettingRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/SignalUnconfiguredDetectorRequest"
          },
          {
            "$ref": "#/components/schemas/SignalDirectoryListingDetectorRequest"
          },
          {
            "$ref": "#/components/schemas/SignalPageExtractDetectorRequest"
          },
          {
            "$ref": "#/components/schemas/SignalStoredContextDetectorRequest"
          },
          {
            "$ref": "#/components/schemas/SignalWebsiteResearchDetectorRequest"
          }
        ],
        "description": "How the signal is detected."
      },
      "SignalDirectoryListingConfig": {
        "type": "object",
        "properties": {
          "sourceRole": {
            "type": "string",
            "description": "What part the directory plays, such as an exhibitor list."
          },
          "editionLabel": {
            "description": "Which edition of the directory, such as a year; `null` when any.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "sourceRole",
          "editionLabel"
        ],
        "additionalProperties": true,
        "description": "How a directory listing is read."
      },
      "SignalDirectoryListingConfigRequest": {
        "type": "object",
        "properties": {
          "sourceRole": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "The role the company must hold in the list, such as `exhibitor`."
          },
          "editionLabel": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "description": "Which edition of the directory, such as a year; `null` for a rolling directory."
          }
        },
        "required": [
          "sourceRole",
          "editionLabel"
        ],
        "additionalProperties": false,
        "description": "How a directory listing is read."
      },
      "SignalDirectoryListingDetector": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "directory_listing",
            "description": "The company is listed in a directory."
          },
          "config": {
            "description": "How the directory is read.",
            "$ref": "#/components/schemas/SignalDirectoryListingConfig"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": true,
        "description": "Finds the signal in a controlled directory the company is listed in."
      },
      "SignalDirectoryListingDetectorRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "directory_listing",
            "description": "The company is listed in a directory."
          },
          "config": {
            "description": "How the directory is read.",
            "$ref": "#/components/schemas/SignalDirectoryListingConfigRequest"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": false,
        "description": "Finds the signal in a controlled directory the company is listed in."
      },
      "SignalEvidenceCoverage": {
        "type": "object",
        "properties": {
          "negativeEvidence": {
            "type": "string",
            "enum": [
              "requires_certified_complete_scope",
              "never"
            ],
            "description": "What it takes to say a company does NOT show the signal."
          }
        },
        "required": [
          "negativeEvidence"
        ],
        "additionalProperties": true,
        "description": "When an absence of evidence means something."
      },
      "SignalEvidenceCoverageRequest": {
        "type": "object",
        "properties": {
          "negativeEvidence": {
            "type": "string",
            "enum": [
              "requires_certified_complete_scope",
              "never"
            ],
            "description": "What it takes to say a company does NOT show the signal. Fixed by the detector: `requires_certified_complete_scope` for `directory_listing`, `never` for the others."
          }
        },
        "required": [
          "negativeEvidence"
        ],
        "additionalProperties": false,
        "description": "When an absence of evidence means something."
      },
      "SignalEvidenceRequirements": {
        "type": "object",
        "properties": {
          "permittedSourceKinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "controlled_directory",
                "company_page",
                "workspace_document",
                "provider_record"
              ]
            },
            "description": "The kinds of source evidence may come from."
          },
          "requireLocatedSupport": {
            "type": "boolean",
            "description": "Whether evidence must point at where in the source it is."
          },
          "requireEntityAttribution": {
            "type": "boolean",
            "const": true,
            "description": "Evidence must be about the company itself: always `true`."
          },
          "claimSupport": {
            "description": "What a source’s claim must look like.",
            "$ref": "#/components/schemas/SignalClaimSupport"
          },
          "temporal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SignalEvidenceWindow"
              },
              {
                "type": "null"
              }
            ],
            "description": "When evidence must date from; `null` when any date will do."
          },
          "coverage": {
            "description": "What an absence of evidence may be taken to mean.",
            "$ref": "#/components/schemas/SignalEvidenceCoverage"
          }
        },
        "required": [
          "permittedSourceKinds",
          "requireLocatedSupport",
          "requireEntityAttribution",
          "claimSupport",
          "temporal",
          "coverage"
        ],
        "additionalProperties": true,
        "description": "What evidence must show before the signal is said to hold."
      },
      "SignalEvidenceRequirementsRequest": {
        "type": "object",
        "properties": {
          "permittedSourceKinds": {
            "minItems": 1,
            "maxItems": 4,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "controlled_directory",
                "company_page",
                "workspace_document",
                "provider_record"
              ]
            },
            "description": "The kinds of source evidence may come from; at least one."
          },
          "requireLocatedSupport": {
            "type": "boolean",
            "description": "Whether evidence must point at where in the source it is."
          },
          "requireEntityAttribution": {
            "type": "boolean",
            "const": true,
            "description": "Evidence must be about the company itself: always `true`."
          },
          "claimSupport": {
            "description": "What a source’s claim must look like.",
            "$ref": "#/components/schemas/SignalClaimSupportRequest"
          },
          "temporal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SignalEvidenceWindowRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "When evidence must date from: the same values as `temporalRule`, never `null`."
          },
          "coverage": {
            "description": "What an absence of evidence may be taken to mean.",
            "$ref": "#/components/schemas/SignalEvidenceCoverageRequest"
          }
        },
        "required": [
          "permittedSourceKinds",
          "requireLocatedSupport",
          "requireEntityAttribution",
          "claimSupport",
          "temporal",
          "coverage"
        ],
        "additionalProperties": false,
        "description": "What evidence must show before the signal is said to hold."
      },
      "SignalEvidenceWindow": {
        "type": "object",
        "properties": {
          "semantics": {
            "type": "string",
            "enum": [
              "event_occurred",
              "event_announced",
              "condition_observed"
            ],
            "description": "What the date is of: an event, its announcement, or an observed condition."
          },
          "minimumPrecision": {
            "type": "string",
            "enum": [
              "day",
              "month",
              "year"
            ],
            "description": "How exact the date must be at least."
          },
          "windowDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How many days back evidence may date from; `null` for no limit."
          },
          "allowPlannedFuture": {
            "type": "boolean",
            "description": "Whether an event planned for later counts."
          }
        },
        "required": [
          "semantics",
          "minimumPrecision",
          "windowDays",
          "allowPlannedFuture"
        ],
        "additionalProperties": true,
        "description": "When evidence must date from."
      },
      "SignalEvidenceWindowRequest": {
        "type": "object",
        "properties": {
          "semantics": {
            "type": "string",
            "enum": [
              "event_occurred",
              "event_announced",
              "condition_observed"
            ],
            "description": "What the date is of; must equal `temporalRule.semantics`."
          },
          "minimumPrecision": {
            "type": "string",
            "enum": [
              "day",
              "month",
              "year"
            ],
            "description": "How exact the date must be at least; must equal `temporalRule.minimumPrecision`."
          },
          "windowDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3650
              },
              {
                "type": "null"
              }
            ],
            "description": "How many days back evidence may date from, 1 to 3650, or `null` for no limit; must equal `temporalRule.windowDays`."
          },
          "allowPlannedFuture": {
            "type": "boolean",
            "description": "Whether an event planned for later counts; must equal `temporalRule.allowPlannedFuture`."
          }
        },
        "required": [
          "semantics",
          "minimumPrecision",
          "windowDays",
          "allowPlannedFuture"
        ],
        "additionalProperties": false,
        "description": "When evidence must date from."
      },
      "SignalPageExtractConfig": {
        "type": "object",
        "properties": {
          "announcementType": {
            "type": "string",
            "description": "What kind of announcement to look for."
          },
          "maxPagesPerCompany": {
            "type": "number",
            "const": 1,
            "description": "How many pages of each company to read: one, in this contract version."
          }
        },
        "required": [
          "announcementType",
          "maxPagesPerCompany"
        ],
        "additionalProperties": true,
        "description": "How a company’s pages are read."
      },
      "SignalPageExtractConfigRequest": {
        "type": "object",
        "properties": {
          "announcementType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "What kind of announcement to look for."
          },
          "maxPagesPerCompany": {
            "type": "number",
            "const": 1,
            "description": "How many pages of each company to read: always 1."
          }
        },
        "required": [
          "announcementType",
          "maxPagesPerCompany"
        ],
        "additionalProperties": false,
        "description": "How a company’s pages are read."
      },
      "SignalPageExtractDetector": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "page_extract_llm",
            "description": "A model reads the company’s own pages."
          },
          "config": {
            "description": "How the pages are read.",
            "$ref": "#/components/schemas/SignalPageExtractConfig"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": true,
        "description": "Finds the signal on the company’s own pages, read by a model."
      },
      "SignalPageExtractDetectorRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "page_extract_llm",
            "description": "A model reads the company’s own pages."
          },
          "config": {
            "description": "How the pages are read.",
            "$ref": "#/components/schemas/SignalPageExtractConfigRequest"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": false,
        "description": "Finds the signal on the company’s own pages, read by a model."
      },
      "SignalResearchLabel": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The label, sliced from the finding’s retained source page."
          },
          "validUntil": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "Until when the label may be shown. After it, the label is no longer served."
          }
        },
        "required": [
          "text",
          "validUntil"
        ],
        "additionalProperties": true,
        "description": "A researched finding’s read-only source label."
      },
      "SignalStoredContextConfig": {
        "type": "object",
        "properties": {
          "note": {
            "description": "A note on what to look for; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "note"
        ],
        "additionalProperties": true,
        "description": "How stored context is read."
      },
      "SignalStoredContextConfigRequest": {
        "type": "object",
        "properties": {
          "note": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "description": "A note on what to look for; `null` when none."
          }
        },
        "required": [
          "note"
        ],
        "additionalProperties": false,
        "description": "How stored context is read."
      },
      "SignalStoredContextDetector": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "stored_context_llm",
            "description": "A model reads what the workspace has stored."
          },
          "config": {
            "description": "How the stored context is read.",
            "$ref": "#/components/schemas/SignalStoredContextConfig"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": true,
        "description": "Finds the signal in what the workspace already knows about the company."
      },
      "SignalStoredContextDetectorRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "stored_context_llm",
            "description": "A model reads what the workspace has stored. Research only: never publishable."
          },
          "config": {
            "description": "How the stored context is read.",
            "$ref": "#/components/schemas/SignalStoredContextConfigRequest"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": false,
        "description": "Finds the signal in what the workspace already knows about the company."
      },
      "SignalTemporalRule": {
        "type": "object",
        "properties": {
          "semantics": {
            "type": "string",
            "enum": [
              "event_occurred",
              "event_announced",
              "condition_observed"
            ],
            "description": "What the date is of: an event, its announcement, or an observed condition."
          },
          "windowDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "How many days back the signal may date from; `null` for no limit."
          },
          "minimumPrecision": {
            "type": "string",
            "enum": [
              "day",
              "month",
              "year"
            ],
            "description": "How exact the date must be at least."
          },
          "allowPlannedFuture": {
            "type": "boolean",
            "description": "Whether an event planned for later counts."
          }
        },
        "required": [
          "semantics",
          "windowDays",
          "minimumPrecision",
          "allowPlannedFuture"
        ],
        "additionalProperties": true,
        "description": "When the signal must have happened."
      },
      "SignalTemporalRuleRequest": {
        "type": "object",
        "properties": {
          "semantics": {
            "type": "string",
            "enum": [
              "event_occurred",
              "event_announced",
              "condition_observed"
            ],
            "description": "What the date is of: an event, its announcement, or an observed condition."
          },
          "windowDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 3650
              },
              {
                "type": "null"
              }
            ],
            "description": "How many days back the signal may date from, 1 to 3650, or `null` for no limit."
          },
          "minimumPrecision": {
            "type": "string",
            "enum": [
              "day",
              "month",
              "year"
            ],
            "description": "How exact the date must be at least."
          },
          "allowPlannedFuture": {
            "type": "boolean",
            "description": "Whether an event planned for later counts."
          }
        },
        "required": [
          "semantics",
          "windowDays",
          "minimumPrecision",
          "allowPlannedFuture"
        ],
        "additionalProperties": false,
        "description": "When the signal must have happened."
      },
      "SignalUnconfiguredConfig": {
        "type": "object",
        "properties": {},
        "additionalProperties": true,
        "description": "No settings: nothing is checked yet."
      },
      "SignalUnconfiguredConfigRequest": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No settings."
      },
      "SignalUnconfiguredDetector": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "unconfigured",
            "description": "No verification method yet: the signal is defined, not checked."
          },
          "config": {
            "description": "Always empty.",
            "$ref": "#/components/schemas/SignalUnconfiguredConfig"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": true,
        "description": "A signal defined before any method exists to check it. It can be published and pinned; no check runs it."
      },
      "SignalUnconfiguredDetectorRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "unconfigured",
            "description": "No verification method yet: the signal is defined, not checked. It can be published; no check runs it."
          },
          "config": {
            "description": "Always empty: `{}`.",
            "$ref": "#/components/schemas/SignalUnconfiguredConfigRequest"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": false,
        "description": "A signal defined before any method exists to check it."
      },
      "SignalWebsiteResearchConfig": {
        "type": "object",
        "properties": {
          "strategy": {
            "type": "string",
            "const": "map_then_read_v1",
            "description": "Map the company’s site, then read the pages chosen from that map."
          },
          "maxPagesPerCompany": {
            "type": "number",
            "const": 3,
            "description": "How many pages of each company to read at most: three, in this contract version."
          }
        },
        "required": [
          "strategy",
          "maxPagesPerCompany"
        ],
        "additionalProperties": true,
        "description": "How a company’s website is researched."
      },
      "SignalWebsiteResearchConfigRequest": {
        "type": "object",
        "properties": {
          "strategy": {
            "type": "string",
            "const": "map_then_read_v1",
            "description": "Map the company’s site, then read the pages chosen from that map."
          },
          "maxPagesPerCompany": {
            "type": "number",
            "const": 3,
            "description": "How many pages of each company to read at most: always 3."
          }
        },
        "required": [
          "strategy",
          "maxPagesPerCompany"
        ],
        "additionalProperties": false,
        "description": "How a company’s website is researched."
      },
      "SignalWebsiteResearchDetector": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "website_research",
            "description": "A model researches the company’s own website, a few chosen pages at most."
          },
          "config": {
            "description": "How the website is researched.",
            "$ref": "#/components/schemas/SignalWebsiteResearchConfig"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": true,
        "description": "Finds the signal on the company’s website: mapped, a few pages read, reviewed."
      },
      "SignalWebsiteResearchDetectorRequest": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "website_research",
            "description": "A model researches the company’s own website, a few chosen pages at most."
          },
          "config": {
            "description": "How the website is researched.",
            "$ref": "#/components/schemas/SignalWebsiteResearchConfigRequest"
          }
        },
        "required": [
          "kind",
          "config"
        ],
        "additionalProperties": false,
        "description": "Finds the signal on the company’s website: mapped, a few pages read, reviewed."
      },
      "StoredViewFilter": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "The field compared: a fixed field, or a custom field as `customFields.<key>`."
          },
          "operator": {
            "type": "string",
            "enum": [
              "eq",
              "neq",
              "gt",
              "gte",
              "lt",
              "lte",
              "contains",
              "startsWith",
              "in",
              "notIn",
              "isNull",
              "isNotNull",
              "between"
            ],
            "description": "How the field is compared with `value`."
          },
          "value": {
            "description": "What the field is compared with, as it was saved: absent for `isNull` and `isNotNull`, an array for `in`, `notIn` and `between`, one value otherwise."
          }
        },
        "required": [
          "field",
          "operator"
        ],
        "additionalProperties": true,
        "description": "One condition of a saved view."
      },
      "StoredViewQuery": {
        "type": "object",
        "properties": {
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoredViewFilter"
            },
            "description": "The conditions a record must meet: every one of them (AND)."
          },
          "sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoredViewSort"
            },
            "description": "The sort order, most significant key first."
          },
          "columns": {
            "description": "The visible columns, in order. Absent means the default columns.",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "filters",
          "sort"
        ],
        "additionalProperties": true,
        "description": "A saved view’s query. Send its `filters` and `sort` to the contact or company list to get the records the view shows."
      },
      "StoredViewSort": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "The field sorted by."
          },
          "direction": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "`asc` for ascending, `desc` for descending."
          }
        },
        "required": [
          "field",
          "direction"
        ],
        "additionalProperties": true,
        "description": "One sort key of a saved view."
      },
      "SubmitFeedbackRequest": {
        "type": "object",
        "properties": {
          "category": {
            "description": "What kind of note this is.",
            "$ref": "#/components/schemas/FeedbackCategory"
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "The note, 1 to 2000 characters after trimming, with no NUL character. Do not include personal data, credentials or customer records."
          },
          "rating": {
            "description": "How it went, from 1 (poor) to 5 (excellent).",
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "operationId": {
            "description": "The public operation the note is about, such as `companies.list`. An id the public API does not publish is accepted and stored as no operation.",
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "client": {
            "description": "The software that sent the note.",
            "$ref": "#/components/schemas/FeedbackClient"
          }
        },
        "required": [
          "category",
          "message"
        ],
        "additionalProperties": false,
        "description": "One anonymous note about the public API. It carries no sender: the server stores none."
      },
      "TimelineEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event’s id."
          },
          "eventName": {
            "type": "string",
            "description": "What happened, such as `contact.created` or `company.updated`."
          },
          "actor": {
            "description": "Who caused it.",
            "$ref": "#/components/schemas/TimelineEventActor"
          },
          "payload": {
            "description": "The event’s detail, as recorded. Its shape depends on `eventName`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When it happened."
          }
        },
        "required": [
          "id",
          "eventName",
          "actor",
          "payload",
          "createdAt"
        ],
        "additionalProperties": true,
        "description": "One entry of a record’s activity timeline."
      },
      "TimelineEventActor": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Who acted: `user`, `api_key` or `system` (the platform itself, such as a sync)."
          },
          "userId": {
            "description": "The user who acted; `null` unless `type` is `user`.",
            "type": [
              "string",
              "null"
            ]
          },
          "apiKeyId": {
            "description": "The API key that acted; `null` unless `type` is `api_key`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "type",
          "userId",
          "apiKeyId"
        ],
        "additionalProperties": true,
        "description": "Who caused a timeline event."
      },
      "TimelineEventList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TimelineEvent"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of a record’s timeline, newest first."
      },
      "UserOnboardingAnswers": {
        "type": "object",
        "properties": {
          "role": {
            "description": "The person’s role.",
            "type": "string",
            "enum": [
              "founder_ceo",
              "head_of_sales",
              "sales_rep_sdr",
              "marketing",
              "revops",
              "other"
            ]
          },
          "heardAbout": {
            "description": "Where the person heard about Enrik.",
            "type": "string",
            "enum": [
              "linkedin",
              "google_search",
              "friend_colleague",
              "ai_assistant",
              "podcast_event",
              "other"
            ]
          },
          "firstGoal": {
            "description": "What the person wants to do first in Enrik.",
            "type": "string",
            "enum": [
              "find_accounts",
              "buying_signals",
              "enrich_list",
              "pipeline"
            ]
          }
        },
        "additionalProperties": false,
        "description": "Private answers about the person completing setup. Every answer is optional."
      },
      "ViewFilter": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "description": "The field to compare: a fixed field such as `email`, or a custom field as `customFields.<key>`."
          },
          "operator": {
            "type": "string",
            "enum": [
              "eq",
              "neq",
              "gt",
              "gte",
              "lt",
              "lte",
              "contains",
              "startsWith",
              "in",
              "notIn",
              "isNull",
              "isNotNull",
              "between"
            ],
            "description": "How the field is compared with `value`."
          },
          "value": {
            "description": "What the field is compared with. `isNull` and `isNotNull` take none; `in`, `notIn` and `between` take an array (`between` exactly two); every other operator takes one value."
          }
        },
        "required": [
          "field",
          "operator"
        ],
        "additionalProperties": false,
        "description": "One condition a record must meet."
      },
      "ViewQueryInput": {
        "type": "object",
        "properties": {
          "filters": {
            "default": [],
            "description": "The conditions a record must meet: every one of them (AND). At most 50.",
            "maxItems": 50,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ViewFilter"
            }
          },
          "sort": {
            "default": [],
            "description": "The sort order, most significant key first. At most 10.",
            "maxItems": 10,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ViewSort"
            }
          },
          "columns": {
            "description": "The visible columns, in order. Absent (or empty) shows the default columns.",
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          }
        },
        "additionalProperties": false,
        "description": "Which records a view shows and how: the same query the contact and company lists take. A filter names a field of the view’s `objectType`: for `contact`, `firstName`, `lastName`, `email`, `phone`, `jobTitle`, `id`, `ownerUserId`, `companyId`, `createdAt` and `updatedAt`; for `company`, `name`, `domain`, `website`, `industry`, `linkedinUrl`, `country`, `city`, `legalForm`, `registerNumber`, `summary`, `employeeCount`, `annualRevenue`, `id`, `ownerUserId`, `createdAt` and `updatedAt`, `nameOrDomain` and the signal and review fields `companies.list` describes. Either takes a custom field as `customFields.<key>`."
      },
      "ViewSort": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "description": "The field to sort by: a fixed field such as `lastName`. Custom fields cannot be sorted by."
          },
          "direction": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "`asc` for ascending, `desc` for descending."
          }
        },
        "required": [
          "field",
          "direction"
        ],
        "additionalProperties": false,
        "description": "One sort key."
      },
      "WebhookEventAttempt": {
        "type": "object",
        "properties": {
          "attempt": {
            "type": "number",
            "description": "The attempt number, also sent as `X-Enrik-Delivery-Attempt`."
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the attempt started."
          },
          "durationMs": {
            "type": "number",
            "description": "How long it took, in milliseconds."
          },
          "responseStatus": {
            "description": "The HTTP status the receiver answered; `null` without an answer.",
            "type": [
              "number",
              "null"
            ]
          },
          "errorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "http_status",
                  "timeout",
                  "network_error",
                  "egress_blocked",
                  "redirect_blocked",
                  "response_too_large",
                  "retries_exhausted",
                  "subscription_inactive",
                  "destination_inactive",
                  "signing_secret_missing",
                  "workspace_deleted"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it failed; `null` when it succeeded."
          }
        },
        "required": [
          "attempt",
          "startedAt",
          "durationMs",
          "responseStatus",
          "errorCode"
        ],
        "additionalProperties": true,
        "description": "One HTTP attempt: its status code or error, and how long it took."
      },
      "WebhookEventDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The delivery id, also sent as `X-Enrik-Delivery-Id`."
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription the event is delivered to."
          },
          "eventId": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`; the same on every attempt."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "companyDiscoveryJob.terminal",
              "company.created",
              "company.updated",
              "company.deleted",
              "company.restored",
              "contact.created",
              "contact.updated",
              "contact.deleted",
              "contact.restored",
              "companySignal.created"
            ],
            "description": "The event type."
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "delivering",
              "delivered",
              "failed",
              "canceled",
              "expired"
            ],
            "description": "Where the delivery is: pending or in flight, or ended (delivered, failed, canceled, expired)."
          },
          "attemptCount": {
            "type": "number",
            "description": "HTTP attempts so far, redeliveries included."
          },
          "nextAttemptAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the next attempt is due; `null` once the delivery ended."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the delivery stops being attempted."
          },
          "lastAttemptAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the last attempt started, if any."
          },
          "lastResponseStatus": {
            "description": "The HTTP status the receiver last answered; `null` without an answer.",
            "type": [
              "number",
              "null"
            ]
          },
          "lastErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "http_status",
                  "timeout",
                  "network_error",
                  "egress_blocked",
                  "redirect_blocked",
                  "response_too_large",
                  "retries_exhausted",
                  "subscription_inactive",
                  "destination_inactive",
                  "signing_secret_missing",
                  "workspace_deleted"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the last attempt failed; `null` when it succeeded or none was made."
          },
          "deliveredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the receiver accepted it, if it did."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the delivery was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "subscriptionId",
          "eventId",
          "eventType",
          "state",
          "attemptCount",
          "nextAttemptAt",
          "expiresAt",
          "lastAttemptAt",
          "lastResponseStatus",
          "lastErrorCode",
          "deliveredAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "One event on its way to one subscription: state and last outcome, never a body."
      },
      "WebhookEventDeliveryDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The delivery id, also sent as `X-Enrik-Delivery-Id`."
          },
          "subscriptionId": {
            "type": "string",
            "description": "The subscription the event is delivered to."
          },
          "eventId": {
            "type": "string",
            "description": "The event id, also sent as `X-Enrik-Event-Id`; the same on every attempt."
          },
          "eventType": {
            "type": "string",
            "enum": [
              "companyDiscoveryJob.terminal",
              "company.created",
              "company.updated",
              "company.deleted",
              "company.restored",
              "contact.created",
              "contact.updated",
              "contact.deleted",
              "contact.restored",
              "companySignal.created"
            ],
            "description": "The event type."
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "delivering",
              "delivered",
              "failed",
              "canceled",
              "expired"
            ],
            "description": "Where the delivery is: pending or in flight, or ended (delivered, failed, canceled, expired)."
          },
          "attemptCount": {
            "type": "number",
            "description": "HTTP attempts so far, redeliveries included."
          },
          "nextAttemptAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the next attempt is due; `null` once the delivery ended."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the delivery stops being attempted."
          },
          "lastAttemptAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the last attempt started, if any."
          },
          "lastResponseStatus": {
            "description": "The HTTP status the receiver last answered; `null` without an answer.",
            "type": [
              "number",
              "null"
            ]
          },
          "lastErrorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "http_status",
                  "timeout",
                  "network_error",
                  "egress_blocked",
                  "redirect_blocked",
                  "response_too_large",
                  "retries_exhausted",
                  "subscription_inactive",
                  "destination_inactive",
                  "signing_secret_missing",
                  "workspace_deleted"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the last attempt failed; `null` when it succeeded or none was made."
          },
          "deliveredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the receiver accepted it, if it did."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the delivery was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When it last changed."
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventAttempt"
            },
            "description": "Every attempt, oldest first."
          }
        },
        "required": [
          "id",
          "subscriptionId",
          "eventId",
          "eventType",
          "state",
          "attemptCount",
          "nextAttemptAt",
          "expiresAt",
          "lastAttemptAt",
          "lastResponseStatus",
          "lastErrorCode",
          "deliveredAt",
          "createdAt",
          "updatedAt",
          "attempts"
        ],
        "additionalProperties": true,
        "description": "One delivery with its attempts, oldest first."
      },
      "WebhookEventDeliveryList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventDelivery"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of one subscription’s deliveries, newest first."
      },
      "WebhookEventType": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "companyDiscoveryJob.terminal",
              "company.created",
              "company.updated",
              "company.deleted",
              "company.restored",
              "contact.created",
              "contact.updated",
              "contact.deleted",
              "contact.restored",
              "companySignal.created"
            ],
            "description": "The event type, as a subscription names it."
          },
          "version": {
            "type": "number",
            "description": "The payload version a subscription receives."
          },
          "stability": {
            "type": "string",
            "enum": [
              "beta",
              "stable"
            ],
            "description": "`beta` may still change in place; `stable` changes only in a new version."
          },
          "description": {
            "type": "string",
            "description": "What the event announces."
          },
          "permission": {
            "type": "string",
            "description": "What the subscription’s creator must hold to subscribe to this type."
          },
          "readOperation": {
            "type": "string",
            "description": "The operation a receiver calls to read what the event names."
          },
          "readScope": {
            "type": "string",
            "description": "The API key scope that operation needs."
          }
        },
        "required": [
          "type",
          "version",
          "stability",
          "description",
          "permission",
          "readOperation",
          "readScope"
        ],
        "additionalProperties": true,
        "description": "One event type a subscription can name: its version, what a subscriber must hold, and how a receiver reads what it names."
      },
      "WebhookEventTypeList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of the event types, in catalogue order."
      },
      "WebhookPingEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A fresh id per test, also sent as `X-Enrik-Event-Id`. Never redelivered."
          },
          "type": {
            "type": "string",
            "const": "webhook.ping",
            "description": "Always `webhook.ping`, also sent as `X-Enrik-Event-Type`."
          },
          "version": {
            "type": "number",
            "const": 1,
            "description": "The payload version."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
            "description": "When the test was sent, in UTC."
          },
          "workspaceId": {
            "type": "string",
            "description": "The workspace the subscription belongs to."
          },
          "data": {
            "description": "The subscription that was tested.",
            "$ref": "#/components/schemas/WebhookPingEventData"
          }
        },
        "required": [
          "id",
          "type",
          "version",
          "occurredAt",
          "workspaceId",
          "data"
        ],
        "additionalProperties": true,
        "description": "Sent once each time a subscription is tested. It is never stored or retried, and never appears in the delivery log; acknowledge it like any event."
      },
      "WebhookPingEventData": {
        "type": "object",
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "The subscription that was tested."
          }
        },
        "required": [
          "subscriptionId"
        ],
        "additionalProperties": true,
        "description": "Which subscription was tested."
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The subscription id."
          },
          "destinationId": {
            "type": "string",
            "description": "The destination that receives the events and holds the signing secret."
          },
          "url": {
            "type": "string",
            "description": "The receiver URL, read from the subscription’s destination."
          },
          "description": {
            "type": "string",
            "description": "The destination’s name: the description given at create, or else the receiver’s host."
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "companyDiscoveryJob.terminal",
                "company.created",
                "company.updated",
                "company.deleted",
                "company.restored",
                "contact.created",
                "contact.updated",
                "contact.deleted",
                "contact.restored",
                "companySignal.created"
              ]
            },
            "description": "The event types the receiver gets; `webhookEventTypes.list` lists them all."
          },
          "eventVersion": {
            "type": "number",
            "description": "The payload version the receiver gets."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled",
              "archived"
            ],
            "description": "`active` delivers; `disabled` is paused (see `disabledReason`); `archived` is final."
          },
          "disabledReason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "manual",
                  "consecutive_failures"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it is paused: `manual`, or `consecutive_failures` after 10 failed deliveries in a row; `null` unless `disabled`."
          },
          "consecutiveFailures": {
            "type": "number",
            "description": "Failed deliveries since the last success; enabling resets it."
          },
          "lastSuccessAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a delivery last succeeded, if ever."
          },
          "lastFailureAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a delivery last failed, if ever."
          },
          "createdBy": {
            "description": "The user who created it; `null` when an API key or the system did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When it was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When it last changed."
          }
        },
        "required": [
          "id",
          "destinationId",
          "url",
          "description",
          "eventTypes",
          "eventVersion",
          "status",
          "disabledReason",
          "consecutiveFailures",
          "lastSuccessAt",
          "lastFailureAt",
          "createdBy",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "Which events a destination receives, and how its deliveries are going."
      },
      "WebhookSubscriptionCreateRequest": {
        "type": "object",
        "properties": {
          "destinationId": {
            "description": "An existing webhook destination to subscribe, created in the app. Send it or `url`, not both.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
          },
          "url": {
            "description": "The https:// URL to send events to. Enrik creates its destination with a new signing secret, answered once. Send it or `destinationId`, not both.",
            "type": "string",
            "format": "uri"
          },
          "description": {
            "description": "A name for the receiver, at most 120 characters; only with `url`. Defaults to its host.",
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "eventTypes": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "companyDiscoveryJob.terminal",
                "company.created",
                "company.updated",
                "company.deleted",
                "company.restored",
                "contact.created",
                "contact.updated",
                "contact.deleted",
                "contact.restored",
                "companySignal.created"
              ]
            },
            "description": "The event types to send, each once. The creator must be allowed to read what each one names."
          },
          "eventVersion": {
            "default": 1,
            "description": "The payload version to receive; `1`, the only one so far.",
            "type": "number",
            "const": 1
          }
        },
        "required": [
          "eventTypes"
        ],
        "additionalProperties": false,
        "description": "A new subscription: a receiver `url` (with an optional `description`) or an existing `destinationId`, exactly one, and the event types to send."
      },
      "WebhookSubscriptionList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSubscription"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of the subscriptions, archived ones included, newest first."
      },
      "WebhookSubscriptionTestResult": {
        "type": "object",
        "properties": {
          "responseStatus": {
            "description": "The HTTP status the receiver answered; `null` when it did not answer.",
            "type": [
              "number",
              "null"
            ]
          },
          "durationMs": {
            "type": "number",
            "description": "How long the request took, in milliseconds."
          },
          "errorCode": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "http_status",
                  "timeout",
                  "network_error",
                  "egress_blocked",
                  "redirect_blocked",
                  "response_too_large",
                  "retries_exhausted",
                  "subscription_inactive",
                  "destination_inactive",
                  "signing_secret_missing",
                  "workspace_deleted"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the test failed: `http_status` for a status other than 2xx, or the reason no status came back. `null` when the receiver answered 2xx."
          }
        },
        "required": [
          "responseStatus",
          "durationMs",
          "errorCode"
        ],
        "additionalProperties": true,
        "description": "What the receiver did with one signed `webhook.ping`; never the response body."
      },
      "WebhookSubscriptionUpdateRequest": {
        "type": "object",
        "properties": {
          "eventTypes": {
            "description": "The event types to send from now on, each once; they replace the current ones. You must be allowed to read what each one names.",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "companyDiscoveryJob.terminal",
                "company.created",
                "company.updated",
                "company.deleted",
                "company.restored",
                "contact.created",
                "contact.updated",
                "contact.deleted",
                "contact.restored",
                "companySignal.created"
              ]
            }
          },
          "url": {
            "description": "The new https:// URL to send events to. The signing secret stays the same. Refused for a destination that authenticates with a bearer token (see the operation).",
            "type": "string",
            "format": "uri"
          },
          "description": {
            "description": "A new name for the receiver, at most 120 characters.",
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "additionalProperties": false,
        "description": "What to change: the event types, the receiver `url`, its `description`, or several. A field left out keeps its value."
      },
      "WebhookSubscriptionWithSecret": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The subscription id."
          },
          "destinationId": {
            "type": "string",
            "description": "The destination that receives the events and holds the signing secret."
          },
          "url": {
            "type": "string",
            "description": "The receiver URL, read from the subscription’s destination."
          },
          "description": {
            "type": "string",
            "description": "The destination’s name: the description given at create, or else the receiver’s host."
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "companyDiscoveryJob.terminal",
                "company.created",
                "company.updated",
                "company.deleted",
                "company.restored",
                "contact.created",
                "contact.updated",
                "contact.deleted",
                "contact.restored",
                "companySignal.created"
              ]
            },
            "description": "The event types the receiver gets; `webhookEventTypes.list` lists them all."
          },
          "eventVersion": {
            "type": "number",
            "description": "The payload version the receiver gets."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled",
              "archived"
            ],
            "description": "`active` delivers; `disabled` is paused (see `disabledReason`); `archived` is final."
          },
          "disabledReason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "manual",
                  "consecutive_failures"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Why it is paused: `manual`, or `consecutive_failures` after 10 failed deliveries in a row; `null` unless `disabled`."
          },
          "consecutiveFailures": {
            "type": "number",
            "description": "Failed deliveries since the last success; enabling resets it."
          },
          "lastSuccessAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a delivery last succeeded, if ever."
          },
          "lastFailureAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a delivery last failed, if ever."
          },
          "createdBy": {
            "description": "The user who created it; `null` when an API key or the system did.",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When it was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When it last changed."
          },
          "signingSecret": {
            "description": "The signing secret, shown once: verify `X-Enrik-Signature` with it. A create with a `url` and a rotation answer it; `null` when the create named an existing destination.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "destinationId",
          "url",
          "description",
          "eventTypes",
          "eventVersion",
          "status",
          "disabledReason",
          "consecutiveFailures",
          "lastSuccessAt",
          "lastFailureAt",
          "createdBy",
          "createdAt",
          "updatedAt",
          "signingSecret"
        ],
        "additionalProperties": true,
        "description": "A subscription and, after a create with a url or a rotation, its signing secret, delivered once."
      },
      "WebsiteOnboarding": {
        "type": "object",
        "properties": {
          "state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteOnboardingSetupState"
              },
              {
                "type": "null"
              }
            ],
            "description": "The company setup; `null` when the workspace has not started one."
          },
          "profileHash": {
            "type": "string",
            "description": "The hash of the saved company profile. Send it as `expectedProfileHash` to confirm."
          }
        },
        "required": [
          "state",
          "profileHash"
        ],
        "additionalProperties": true,
        "description": "The workspace’s company setup and the hash of its saved company profile."
      },
      "WebsiteOnboardingAccess": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The workspace."
          },
          "eligible": {
            "type": "boolean",
            "description": "Whether the caller may run the workspace’s company setup."
          },
          "required": {
            "type": "boolean",
            "description": "Whether the caller must still complete setup: eligible and not complete."
          },
          "nextPath": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "/onboarding/intro",
                  "/onboarding/company-profile",
                  "/onboarding/handoff",
                  "/onboarding/setups",
                  "/onboarding/questions"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The setup step to continue at; `null` when none is required."
          },
          "generation": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The current setup generation; `null` before setup starts."
          },
          "revision": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "The setup revision; `null` before setup starts."
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When setup was completed or waived; `null` until then."
          },
          "handoff": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteOnboardingAccessHandoff"
              },
              {
                "type": "null"
              }
            ],
            "description": "Always `null`: setup no longer has a handoff step. Kept for compatibility."
          },
          "completionSource": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cutover",
                  "seed",
                  "generation"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How setup was completed: `generation` by a completed setup generation, `cutover` or `seed` by a waiver; `null` until then."
          }
        },
        "required": [
          "workspaceId",
          "eligible",
          "required",
          "nextPath",
          "generation",
          "revision",
          "completedAt",
          "handoff",
          "completionSource"
        ],
        "additionalProperties": true,
        "description": "Whether the caller may or must complete the workspace’s setup, and where."
      },
      "WebsiteOnboardingAccessHandoff": {
        "type": "object",
        "properties": {
          "researchDomain": {
            "description": "The confirmed website’s domain, under research; `null` when no website was confirmed or no research is bound to the current setup generation.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "researchDomain"
        ],
        "additionalProperties": true,
        "description": "What the handoff step shows."
      },
      "WebsiteOnboardingAiOutcome": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WebsiteOnboardingAiOutcomeDrafted"
          },
          {
            "$ref": "#/components/schemas/WebsiteOnboardingAiOutcomeManualRequired"
          }
        ],
        "description": "Whether a model drafted the findings, or why the profile is filled in by hand."
      },
      "WebsiteOnboardingAiOutcomeDrafted": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "drafted",
            "description": "A model drafted the findings."
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": true,
        "description": "A model drafted the findings."
      },
      "WebsiteOnboardingAiOutcomeManualRequired": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "const": "manual_required",
            "description": "No model draft: the profile is filled in by hand."
          },
          "reason": {
            "type": "string",
            "enum": [
              "unavailable",
              "budget_exhausted",
              "timeout",
              "website_unreadable",
              "invalid_output"
            ],
            "description": "Why no model draft was made."
          }
        },
        "required": [
          "status",
          "reason"
        ],
        "additionalProperties": true,
        "description": "No model draft was made, so the profile is filled in by hand."
      },
      "WebsiteOnboardingChooseSetupsRequest": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          },
          "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The current setup generation."
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The setup revision last read; a stale revision is refused."
          },
          "setups": {
            "description": "The setups to run.",
            "$ref": "#/components/schemas/WebsiteOnboardingSetupsSelection"
          }
        },
        "required": [
          "operationId",
          "generation",
          "expectedRevision",
          "setups"
        ],
        "additionalProperties": false,
        "description": "The setups chosen for the confirmed generation."
      },
      "WebsiteOnboardingCompanyProfile": {
        "type": "object",
        "properties": {
          "companyName": {
            "description": "The company’s name, up to 255 characters; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "website": {
            "description": "The company’s website, up to 2048 characters; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "productDescription": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "What the company sells, 1 to 5000 characters."
          },
          "valueProposition": {
            "description": "Why customers buy from the company, up to 5000 characters; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "targetRegion": {
            "description": "The regions the company sells into, up to 255 characters; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "buyerPersonas": {
            "description": "The people the company sells to: up to 50, each 1 to 255 characters.",
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          },
          "mainPainSolved": {
            "description": "The main problem the company solves, up to 5000 characters; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "salesMotion": {
            "description": "How the company sells, up to 255 characters; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "exclusionNotes": {
            "description": "Who the company does not sell to, up to 5000 characters; `null` clears it.",
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "productDescription"
        ],
        "additionalProperties": false,
        "description": "The company profile to save. An omitted optional field keeps its saved value; `null` clears it."
      },
      "WebsiteOnboardingCompleteFinish": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          },
          "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The current setup generation."
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The setup revision last read; a stale revision is refused."
          },
          "mode": {
            "type": "string",
            "const": "finish",
            "description": "Finish setup, with optional answers."
          },
          "answers": {
            "description": "Private answers about the person. Only a person may send them.",
            "$ref": "#/components/schemas/UserOnboardingAnswers"
          }
        },
        "required": [
          "operationId",
          "generation",
          "expectedRevision",
          "mode"
        ],
        "additionalProperties": false,
        "description": "Finishes setup. An API key omits `answers` entirely."
      },
      "WebsiteOnboardingCompleteRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WebsiteOnboardingCompleteFinish"
          },
          {
            "$ref": "#/components/schemas/WebsiteOnboardingCompleteSkip"
          }
        ],
        "description": "Completes setup: finished, or with its questions skipped."
      },
      "WebsiteOnboardingCompleteSkip": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          },
          "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The current setup generation."
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The setup revision last read; a stale revision is refused."
          },
          "mode": {
            "type": "string",
            "const": "skip",
            "description": "Skip the remaining setup questions."
          }
        },
        "required": [
          "operationId",
          "generation",
          "expectedRevision",
          "mode"
        ],
        "additionalProperties": false,
        "description": "Completes setup without answering its questions."
      },
      "WebsiteOnboardingCompletedState": {
        "type": "object",
        "properties": {
          "generation": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The completed setup generation."
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The setup revision."
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the generation’s setup was completed."
          }
        },
        "required": [
          "generation",
          "revision",
          "completedAt"
        ],
        "additionalProperties": true,
        "description": "A generation whose setup is complete."
      },
      "WebsiteOnboardingCompletion": {
        "type": "object",
        "properties": {
          "state": {
            "description": "The completed generation.",
            "$ref": "#/components/schemas/WebsiteOnboardingCompletedState"
          }
        },
        "required": [
          "state"
        ],
        "additionalProperties": true,
        "description": "The current generation’s completed setup."
      },
      "WebsiteOnboardingCompletionState": {
        "type": "object",
        "properties": {
          "generation": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The current setup generation."
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The setup revision."
          },
          "completedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the generation’s setup was completed; `null` until it is."
          }
        },
        "required": [
          "generation",
          "revision",
          "completedAt"
        ],
        "additionalProperties": true,
        "description": "The current generation and whether its setup is complete."
      },
      "WebsiteOnboardingCompletionStatus": {
        "type": "object",
        "properties": {
          "state": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteOnboardingCompletionState"
              },
              {
                "type": "null"
              }
            ],
            "description": "The current generation; `null` when the workspace has not started setup."
          }
        },
        "required": [
          "state"
        ],
        "additionalProperties": true,
        "description": "Whether the current generation’s setup is complete."
      },
      "WebsiteOnboardingConfirmProfileRequest": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          },
          "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The current setup generation."
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The setup revision last read; a stale revision is refused."
          },
          "expectedProfileHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "The `profileHash` last read; a changed saved profile is refused."
          },
          "profile": {
            "description": "The company profile to save.",
            "$ref": "#/components/schemas/WebsiteOnboardingCompanyProfile"
          },
          "sourceText": {
            "description": "Optional text supplied during setup, saved to company memory only when enabled.",
            "type": "string",
            "maxLength": 5000
          }
        },
        "required": [
          "operationId",
          "generation",
          "expectedRevision",
          "expectedProfileHash",
          "profile"
        ],
        "additionalProperties": false,
        "description": "Confirms the company profile of the current generation."
      },
      "WebsiteOnboardingConfirmedProfile": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The saved company profile’s id."
          },
          "profile": {
            "description": "The profile as confirmed.",
            "$ref": "#/components/schemas/WebsiteOnboardingProfileSnapshot"
          },
          "confirmedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the profile was confirmed."
          }
        },
        "required": [
          "profileId",
          "profile",
          "confirmedAt"
        ],
        "additionalProperties": true,
        "description": "The company profile confirmed in a generation."
      },
      "WebsiteOnboardingDraft": {
        "type": "object",
        "properties": {
          "website": {
            "description": "The website drafted from; `null` when none.",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "description": "What the draft was made from: the `website` or a `description`. Absent on older drafts, which were made from the website.",
            "type": "string",
            "enum": [
              "website",
              "description"
            ]
          },
          "locale": {
            "type": "string",
            "enum": [
              "en",
              "de"
            ],
            "description": "The language of the findings: `en` or `de`."
          },
          "aiOutcome": {
            "description": "Whether a model drafted the findings. Absent on older drafts.",
            "$ref": "#/components/schemas/WebsiteOnboardingAiOutcome"
          },
          "findings": {
            "description": "What the draft found.",
            "$ref": "#/components/schemas/WebsiteOnboardingDraftFindings"
          }
        },
        "required": [
          "website",
          "locale",
          "findings"
        ],
        "additionalProperties": true,
        "description": "A company profile drafted from the website or a description, to confirm."
      },
      "WebsiteOnboardingDraftFindings": {
        "type": "object",
        "properties": {
          "companyName": {
            "description": "The company’s name; `null` when none was found.",
            "type": [
              "string",
              "null"
            ]
          },
          "productDescription": {
            "type": "string",
            "description": "What the company sells."
          },
          "buyerRoles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The roles of the people who buy from the company."
          },
          "markets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The countries the company sells into."
          },
          "bestFitCustomers": {
            "description": "One line on the company’s best-fit customers; `null` when none was found, absent on older drafts.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "companyName",
          "productDescription",
          "buyerRoles",
          "markets"
        ],
        "additionalProperties": true,
        "description": "What a draft found."
      },
      "WebsiteOnboardingDraftProfileFromDescription": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          },
          "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The current setup generation."
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The setup revision last read; a stale revision is refused."
          },
          "locale": {
            "description": "The language to draft in: `en` or `de`. Absent means the person’s language, or `en` for an API key.",
            "type": "string",
            "enum": [
              "en",
              "de"
            ]
          },
          "source": {
            "type": "string",
            "const": "description",
            "description": "Draft from a description."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "A description of the company, 1 to 5000 characters."
          },
          "website": {
            "description": "The company’s website, up to 2048 characters. It is not read.",
            "type": "string",
            "maxLength": 2048
          }
        },
        "required": [
          "operationId",
          "generation",
          "expectedRevision",
          "source",
          "description"
        ],
        "additionalProperties": false,
        "description": "Drafts the company profile from a description, without reading a website."
      },
      "WebsiteOnboardingDraftProfileFromWebsite": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          },
          "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The current setup generation."
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The setup revision last read; a stale revision is refused."
          },
          "locale": {
            "description": "The language to draft in: `en` or `de`. Absent means the person’s language, or `en` for an API key.",
            "type": "string",
            "enum": [
              "en",
              "de"
            ]
          },
          "source": {
            "description": "Draft from the website. Absent means the same.",
            "type": "string",
            "const": "website"
          },
          "description": {
            "description": "Not sent when drafting from the website.",
            "not": {}
          },
          "website": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "description": "The company’s website to read, 1 to 2048 characters."
          }
        },
        "required": [
          "operationId",
          "generation",
          "expectedRevision",
          "website"
        ],
        "additionalProperties": false,
        "description": "Drafts the company profile from the company’s website."
      },
      "WebsiteOnboardingDraftProfileRequest": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/WebsiteOnboardingDraftProfileFromWebsite"
          },
          {
            "$ref": "#/components/schemas/WebsiteOnboardingDraftProfileFromDescription"
          }
        ],
        "description": "Drafts the company profile from the company’s website or from a description."
      },
      "WebsiteOnboardingProfileSnapshot": {
        "type": "object",
        "properties": {
          "companyName": {
            "description": "The company’s name; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "website": {
            "description": "The company’s website; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "productDescription": {
            "description": "What the company sells; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "valueProposition": {
            "description": "Why customers buy from the company; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "targetRegion": {
            "description": "The regions the company sells into; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "buyerPersonas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The people the company sells to."
          },
          "mainPainSolved": {
            "description": "The main problem the company solves; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "salesMotion": {
            "description": "How the company sells; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "exclusionNotes": {
            "description": "Who the company does not sell to; `null` when not set.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "companyName",
          "website",
          "productDescription",
          "valueProposition",
          "targetRegion",
          "buyerPersonas",
          "mainPainSolved",
          "salesMotion",
          "exclusionNotes"
        ],
        "additionalProperties": true,
        "description": "A saved company profile, complete: a field not set is `null`."
      },
      "WebsiteOnboardingResetRequest": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          },
          "generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The current setup generation."
          },
          "expectedRevision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "The setup revision last read; a stale revision is refused."
          }
        },
        "required": [
          "operationId",
          "generation",
          "expectedRevision"
        ],
        "additionalProperties": false,
        "description": "Starts the next setup generation."
      },
      "WebsiteOnboardingSetupState": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The setup’s id."
          },
          "generation": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The setup generation. A reset starts the next one."
          },
          "revision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The setup revision. Every change advances it; send it as `expectedRevision`."
          },
          "draft": {
            "description": "The latest drafted profile; `null` when none. Absent only in replays of older commands.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteOnboardingDraft"
              },
              {
                "type": "null"
              }
            ]
          },
          "setups": {
            "description": "The setups chosen in this generation; `null` until chosen. Absent only in replays of older commands.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteOnboardingSetups"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WebsiteOnboardingConfirmedProfile"
              },
              {
                "type": "null"
              }
            ],
            "description": "The confirmed company profile; `null` until confirmed."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the setup was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))T([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?Z$",
            "description": "When the setup last changed."
          }
        },
        "required": [
          "id",
          "generation",
          "revision",
          "confirmed",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": true,
        "description": "The workspace’s company setup in its current generation."
      },
      "WebsiteOnboardingSetups": {
        "type": "object",
        "properties": {
          "icpProfiles": {
            "type": "boolean",
            "description": "Whether to set up ICP profiles."
          },
          "targetSegments": {
            "type": "boolean",
            "description": "Whether to set up target segments; needs `icpProfiles`."
          },
          "buyingSignals": {
            "type": "boolean",
            "description": "Whether to set up buying signals."
          }
        },
        "required": [
          "icpProfiles",
          "targetSegments",
          "buyingSignals"
        ],
        "additionalProperties": true,
        "description": "The setups chosen in a generation."
      },
      "WebsiteOnboardingSetupsSelection": {
        "type": "object",
        "properties": {
          "icpProfiles": {
            "type": "boolean",
            "description": "Whether to set up ICP profiles."
          },
          "targetSegments": {
            "type": "boolean",
            "description": "Whether to set up target segments; needs `icpProfiles`."
          },
          "buyingSignals": {
            "type": "boolean",
            "description": "Whether to set up buying signals."
          }
        },
        "required": [
          "icpProfiles",
          "targetSegments",
          "buyingSignals"
        ],
        "additionalProperties": false,
        "description": "The setups to run. Target segments require ICP profiles; choosing none is valid."
      },
      "WebsiteOnboardingStartRequest": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "The command’s id: the same UUID as its `Idempotency-Key` header."
          }
        },
        "required": [
          "operationId"
        ],
        "additionalProperties": false,
        "description": "Starts the company setup."
      },
      "WithheldRecommendation": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "withheld",
            "description": "`withheld`: the recommendation may not be shown."
          },
          "staleReasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "result_expired",
                "input_changed",
                "rights_withheld",
                "dismissed",
                "snoozed",
                "account_context_changed",
                "policy_incompatible",
                "brief_unavailable"
              ]
            },
            "description": "Why a `stale` recommendation is no longer current."
          },
          "snapshotId": {
            "description": "The evaluation the recommendation comes from.",
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "qualified",
                  "review_needed",
                  "currently_unsatisfied",
                  "suppressed_excluded"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "How eligible the company is: `qualified`, `review_needed`, `currently_unsatisfied` or `suppressed_excluded`."
          },
          "timingCategory": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "supported_event",
                  "condition_observed",
                  "outside_window",
                  "unknown",
                  "not_configured"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "What the timing rests on, such as `supported_event`."
          },
          "effectiveTimingGroup": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "supported_now",
                  "condition_observed",
                  "unknown",
                  "outside_window"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The timing group the company sorts in, such as `supported_now`."
          },
          "fitScore": {
            "description": "The fit to the profile, 0 to 100.",
            "type": [
              "number",
              "null"
            ]
          },
          "fitCoverage": {
            "description": "How much of the profile could be judged, 0 to 1.",
            "type": [
              "number",
              "null"
            ]
          },
          "validUntil": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Until when the recommendation holds."
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "icp_fit_satisfied",
                "signal_required_passed",
                "signal_boost_passed",
                "signal_boost_failed",
                "signal_boost_unknown",
                "signals_not_configured",
                "icp_required_uncertain",
                "icp_insufficient_coverage",
                "icp_required_partial",
                "signal_required_unknown",
                "signal_exclude_unknown",
                "icp_required_failed",
                "signal_required_failed",
                "icp_hard_exclusion_verified",
                "signal_exclude_passed",
                "commercial_dismissal",
                "icp_review_suppression",
                "snoozed"
              ]
            },
            "description": "Every reason the evaluation recorded, such as `icp_fit_satisfied`."
          }
        },
        "required": [
          "state",
          "staleReasons",
          "snapshotId",
          "tier",
          "timingCategory",
          "effectiveTimingGroup",
          "fitScore",
          "fitCoverage",
          "validUntil",
          "reasons"
        ],
        "additionalProperties": true,
        "description": "A recommendation this workspace’s rights do not allow to show: every field is empty or `null`."
      },
      "WorkspaceMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The member’s user id: what `ownerUserId` takes on contacts and companies, and what `createdBy` and `updatedBy` name."
          },
          "name": {
            "description": "The member’s name; `null` when they have not set one.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": true,
        "description": "An active member of the workspace, as an owner of a record names them."
      },
      "WorkspaceMemberList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkspaceMember"
            },
            "description": "The items on this page, in order."
          },
          "pageInfo": {
            "description": "Where this page ends, and whether another follows.",
            "$ref": "#/components/schemas/PageInfo"
          }
        },
        "required": [
          "data",
          "pageInfo"
        ],
        "additionalProperties": true,
        "description": "A page of the workspace’s active members, by user id."
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An Enrik API key, sent as `Authorization: Bearer <key>`. A key reaches public operations only, and only those whose scopes it holds. A few parameters need a scope beyond their operation’s, which the parameter names. The scopes:\n\n- `setup:read`: Read the workspace setup and its company profile.\n- `setup:run`: Change the setup: confirm the company profile, authorize sponsored drafting, choose what to set up and complete setup.\n- `workspace:read`: Read the workspace’s own profile: its health summary and setup state.\n- `crm:read`: Read companies with their signals, contacts and the saved views over them.\n- `crm:write`: Create, update and restore companies and contacts, and create, update and delete saved views.\n- `crm:delete`: Delete companies and contacts.\n- `twin:read`: Retired with the Company Twin: no new key can request it. A key that already has it keeps reading company signals where an operation names this scope.\n- `discovery:read`: Read ICP profiles, ICP assessments, discovery briefs, discovery jobs, candidates and the signal library.\n- `discovery:write`: Create and change ICP profiles, discovery briefs and signal-definition drafts, and review, read and promote discovery candidates.\n- `discovery:run`: Create, start and cancel discovery jobs, and edit a draft one. Uses provider budget.\n- `enrichment:read`: Read the enrichment configuration and its results, including a record’s enrichment, formula and custom-API cells.\n- `enrichment:run`: Launch and cancel enrichment. Spends enrichment credits.\n- `automation:read`: Read workflows and agents with their run history, including a record’s agent cells.\n- `automation:run`: Run existing workflows and agents.\n- `exports:read`: Read export jobs and the fields an export can carry.\n- `exports:run`: Create, preview, start, cancel and archive CSV exports of companies, contacts and candidates, and download the file. Also needs `crm:read`. Delivering an export to a webhook destination stays in the app.\n- `integrations:read`: Read connections, field mappings, CRM sync jobs and webhook destinations.\n- `webhooks:read`: Read webhook subscriptions, the event types they can name and their delivery log.\n- `webhooks:write`: Subscribe a receiver URL to webhook events; edit, test, pause, resume and archive a subscription and rotate its signing secret; redeliver an event. Subscribing to an event type also needs the scope that reads it (for example discovery:read for discovery jobs). Only workspace owners and admins can grant it.\n- `reporting:read`: Read analytics and dashboards.\n- `assistant:read`: Read the Assistant: its threads, messages and pending approvals.\n- `assistant:run`: Converse with the Assistant. Uses the workspace’s AI quota.\n- `assistant:write`: Approve or reject the changes the Assistant proposes."
      }
    }
  }
}
