{"openapi":"3.1.0","info":{"title":"Caryon Lead API","version":"1.0.0","description":"The REST API of Caryon Lead: the companies of the portfolio, their contacts, the deals, the actions and the exchanges of a workspace.\n\n**Authentication.** Send an API key (`cyk_…`, created in Caryon ID > Connexions) or the access token of an AI agent as a Bearer token. A key belongs to a member and one workspace; it acts with the member's role or a lower one, possibly read-only. The API comes with the Business and Enterprise plans, and the trial.\n\n**Limits.** 30 calls a minute and 5000 a day per key or agent; beyond, a 429 with `Retry-After`.\n\n**Lists.** Paginated by cursor: `limit` (1 to 100) and the `next_cursor` of the previous page, `null` on the last one.\n\n**Archiving.** Nothing is deleted: `POST /{resource}/{id}/archive` and `/restore`. A DELETE answers 405. Archived records leave the lists, unless `include_archived=true`.\n\n**Errors.** `{ \"error\": { \"code\", \"message\", \"details\"? } }`; the `code` is stable, the `message` is for a person.\n\n**History.** Every write is recorded in the Journal of the workspace, with the key or the agent that made it."},"servers":[{"url":"https://api.caryon.app/lead/v1","description":"Production"},{"url":"https://api.test.caryon.app/lead/v1","description":"Test"}],"security":[{"bearer":[]}],"tags":[{"name":"Companies"},{"name":"Contacts"},{"name":"Deals"},{"name":"Actions"},{"name":"Exchanges"},{"name":"Pipelines"},{"name":"Users"}],"paths":{"/companies":{"get":{"operationId":"list_companies","tags":["Companies"],"summary":"List the companies of the portfolio","description":"The oldest added first. Archived companies only with `include_archived=true`.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many records, 1 to 100 (50 by default).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page; left out, the first page.","schema":{"type":"string","maxLength":500}},{"name":"include_archived","in":"query","required":false,"description":"`true` lists the archived records too, with their `archived_at`.","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"A page of records.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Company"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_companies","tags":["Companies"],"summary":"Add a company to the portfolio","description":"By its SIREN, from the official register (201, or 200 when the workspace already follows it); or by hand with a `name`, for a company the register does not know. The assignment rules of the workspace then apply.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"siren":{"type":"string","pattern":"^\\d{9}$"}},"required":["siren"],"additionalProperties":false,"description":"A company of the official register (INSEE), by its SIREN."},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"siren":{"anyOf":[{"type":"string","pattern":"^\\d{9}$"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}]},"sector":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"required":["name"],"additionalProperties":false,"description":"A company the register does not know, created by hand."}]}}}},"responses":{"201":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/companies/{id}":{"get":{"operationId":"get_companies","tags":["Companies"],"summary":"Get a company","description":"Archived companies too, with their `archived_at`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_companies","tags":["Companies"],"summary":"Qualify a company","description":"What the workspace says of it: status, owner, notes, LinkedIn page, parent company. The fields of the register are not written here.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"status_id":{"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"}]},"owner_user_id":{"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"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"linkedin_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"parent_company_id":{"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"}]},"parent_group_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"additionalProperties":false,"description":"What the workspace says of a company; the register fields stay."}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/companies/{id}/archive":{"post":{"operationId":"archive_companies","tags":["Companies"],"summary":"Archive a company","description":"Takes it out of the portfolio; nothing is deleted, and its contacts, deals and actions come back with it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"Why, in a sentence (500 characters at most): shown in the Journal.","type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/companies/{id}/restore":{"post":{"operationId":"restore_companies","tags":["Companies"],"summary":"Restore an archived company","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Company"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts":{"get":{"operationId":"list_contacts","tags":["Contacts"],"summary":"List the contacts","description":"The oldest first. Archived contacts only with `include_archived=true`.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many records, 1 to 100 (50 by default).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page; left out, the first page.","schema":{"type":"string","maxLength":500}},{"name":"include_archived","in":"query","required":false,"description":"`true` lists the archived records too, with their `archived_at`.","schema":{"type":"string","enum":["true","false"]}},{"name":"company_id","in":"query","required":false,"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 page of records.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_contacts","tags":["Contacts"],"summary":"Create a contact at a company of the portfolio","description":"Left out, `site_id` attaches the contact to the head office. A contact of the same name at the company answers 409 `duplicate`, with the ids of the existing ones.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_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})$"},"site_id":{"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"}]},"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"business_unit":{"anyOf":[{"type":"string","enum":["executive","sales","marketing","purchasing","finance","human_resources","legal","information_technology","engineering","production","qhse","customer_service","other"]},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mobile_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"phone_verified":{"type":"boolean"},"mobile_phone_verified":{"type":"boolean"},"consent_status":{"type":"string","enum":["never_contacted","responded","opted_out"]},"linkedin_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]}},"required":["company_id","first_name","last_name"],"additionalProperties":false}}}},"responses":{"201":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}":{"get":{"operationId":"get_contacts","tags":["Contacts"],"summary":"Get a contact","description":"Archived contacts too, with their `archived_at`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_contacts","tags":["Contacts"],"summary":"Update a contact","description":"A field left out is kept, `null` empties it. An opt-out is final.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"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"}]},"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"business_unit":{"anyOf":[{"type":"string","enum":["executive","sales","marketing","purchasing","finance","human_resources","legal","information_technology","engineering","production","qhse","customer_service","other"]},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"mobile_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"phone_verified":{"type":"boolean"},"mobile_phone_verified":{"type":"boolean"},"consent_status":{"type":"string","enum":["never_contacted","responded","opted_out"]},"linkedin_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"phone_wrong":{"type":"boolean"},"mobile_phone_wrong":{"type":"boolean"},"manager_contact_id":{"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"}]},"is_key":{"type":"boolean"}},"additionalProperties":false,"description":"Never the company: a person who moves is a new contact."}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}/archive":{"post":{"operationId":"archive_contacts","tags":["Contacts"],"summary":"Archive a contact","description":"Out of every list until restored; its running sequences stop.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"Why, in a sentence (500 characters at most): shown in the Journal.","type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contacts/{id}/restore":{"post":{"operationId":"restore_contacts","tags":["Contacts"],"summary":"Restore an archived contact","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deals":{"get":{"operationId":"list_deals","tags":["Deals"],"summary":"List the deals","description":"The oldest first. Archived deals only with `include_archived=true`.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many records, 1 to 100 (50 by default).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page; left out, the first page.","schema":{"type":"string","maxLength":500}},{"name":"include_archived","in":"query","required":false,"description":"`true` lists the archived records too, with their `archived_at`.","schema":{"type":"string","enum":["true","false"]}},{"name":"company_id","in":"query","required":false,"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":"pipeline_id","in":"query","required":false,"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,"schema":{"type":"string","enum":["open","won","lost"]}}],"responses":{"200":{"description":"A page of records.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deal"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_deals","tags":["Deals"],"summary":"Open a deal","description":"With a contact of its company, at the entry stage of its pipeline. The fields the entry stage asks for answer 422 `stage_requirements` when missing.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_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})$"},"contact_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})$"},"pipeline_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 deal enters at the entry stage of the pipeline."},"name":{"type":"string","minLength":1,"maxLength":200},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"expected_close_on":{"anyOf":[{"type":"string","format":"date","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])))$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"origin":{"anyOf":[{"type":"string","enum":["prospecting","inbound","referral","event","partner","other"]},{"type":"null"}]},"contact_ids":{"maxItems":50,"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})$"}},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The values of the deal fields of the workspace, by field id."},"owner_user_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})$"}},"required":["company_id","contact_id","pipeline_id","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deals/{id}":{"get":{"operationId":"get_deals","tags":["Deals"],"summary":"Get a deal","description":"Archived deals too, with their `archived_at`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_deals","tags":["Deals"],"summary":"Update or move a deal","description":"A field left out is kept, `null` empties it. `stage_id` moves the deal — the stage conditions apply — and `contact_ids` gives it exactly these interlocutors.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"value":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"expected_close_on":{"anyOf":[{"type":"string","format":"date","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])))$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"origin":{"anyOf":[{"type":"string","enum":["prospecting","inbound","referral","event","partner","other"]},{"type":"null"}]},"owner_user_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})$"},"contact_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})$"},"contact_ids":{"maxItems":50,"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})$"},"description":"Every interlocutor of the deal; its contact stays."},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The values of the deal fields of the workspace, by field id."},"stage_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":"Moves the deal; a stage of another pipeline moves it there."},"closed_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deals/{id}/archive":{"post":{"operationId":"archive_deals","tags":["Deals"],"summary":"Archive a deal","description":"Out of the pipeline and the lists until restored; its history stays.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"Why, in a sentence (500 characters at most): shown in the Journal.","type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deals/{id}/restore":{"post":{"operationId":"restore_deals","tags":["Deals"],"summary":"Restore an archived deal","description":"Back at its stage.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/actions":{"get":{"operationId":"list_actions","tags":["Actions"],"summary":"List the actions","description":"The oldest created first. Archived actions only with `include_archived=true`.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many records, 1 to 100 (50 by default).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page; left out, the first page.","schema":{"type":"string","maxLength":500}},{"name":"include_archived","in":"query","required":false,"description":"`true` lists the archived records too, with their `archived_at`.","schema":{"type":"string","enum":["true","false"]}},{"name":"company_id","in":"query","required":false,"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":"contact_id","in":"query","required":false,"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":"deal_id","in":"query","required":false,"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":"owner_user_id","in":"query","required":false,"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,"schema":{"type":"string","enum":["planned","done","canceled"]}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]}}],"responses":{"200":{"description":"A page of records.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_actions","tags":["Actions"],"summary":"Plan an action, or log one done","description":"Planned by default; `status: done` logs one already carried out, with its `disposition`. No outreach on a contact who opted out (422 `contact_opted_out`).","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]},"channel":{"description":"Required for a message.","anyOf":[{"type":"string","enum":["linkedin","sms"]},{"type":"null"}]},"is_follow_up":{"type":"boolean"},"company_id":{"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"}]},"contact_id":{"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"}]},"deal_id":{"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"}]},"participants":{"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"contact_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})$"}},"required":["kind","contact_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"colleague"},"user_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})$"}},"required":["kind","user_id"],"additionalProperties":false}]}},"place":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"site"},"site_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})$"}},"required":["kind","site_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"type":"string","minLength":1,"maxLength":300},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]}},"required":["kind","name","address","latitude","longitude"],"additionalProperties":false}]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"due_at":{"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"}]},"recurrence":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly"]},{"type":"null"}]},"owner_user_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})$"},"status":{"description":"`done` logs an action already carried out.","type":"string","enum":["planned","done"]},"disposition":{"anyOf":[{"type":"string","enum":["success","postponed","refused","no_answer","voicemail","wrong_number","reached","meeting","other"]},{"type":"null"}]},"completed_at":{"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"}]}},"required":["type"],"additionalProperties":false}}}},"responses":{"201":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/actions/{id}":{"get":{"operationId":"get_actions","tags":["Actions"],"summary":"Get an action","description":"Archived actions too, with their `archived_at`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"update_actions","tags":["Actions"],"summary":"Rewrite an action","description":"By its author, its assignee or an admin; never a canceled one. A field left out is kept, `null` empties it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]},"channel":{"anyOf":[{"type":"string","enum":["linkedin","sms"]},{"type":"null"}]},"is_follow_up":{"type":"boolean"},"company_id":{"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"}]},"contact_id":{"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"}]},"deal_id":{"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"}]},"participants":{"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"contact_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})$"}},"required":["kind","contact_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"colleague"},"user_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})$"}},"required":["kind","user_id"],"additionalProperties":false}]}},"place":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"site"},"site_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})$"}},"required":["kind","site_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"type":"string","minLength":1,"maxLength":300},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]}},"required":["kind","name","address","latitude","longitude"],"additionalProperties":false}]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"due_at":{"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"}]},"recurrence":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly"]},{"type":"null"}]},"owner_user_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})$"},"disposition":{"anyOf":[{"type":"string","enum":["success","postponed","refused","no_answer","voicemail","wrong_number","reached","meeting","other"]},{"type":"null"}]},"completed_at":{"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"}]}},"additionalProperties":false,"description":"Rewrites a planned action or a past exchange; never a canceled one."}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/actions/{id}/complete":{"post":{"operationId":"complete_actions","tags":["Actions"],"summary":"Mark a planned action done","description":"With its outcome when the type has one. A recurring action plans its next occurrence.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"disposition":{"anyOf":[{"type":"string","enum":["success","postponed","refused","no_answer","voicemail","wrong_number","reached","meeting","other"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/actions/{id}/cancel":{"post":{"operationId":"cancel_actions","tags":["Actions"],"summary":"Cancel a planned action","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/actions/{id}/archive":{"post":{"operationId":"archive_actions","tags":["Actions"],"summary":"Archive an action","description":"Out of the agenda and the lists until restored. The event Caryon Lead created for it in the member's agenda (Google, CalDAV) goes too.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"Why, in a sentence (500 characters at most): shown in the Journal.","type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/actions/{id}/restore":{"post":{"operationId":"restore_actions","tags":["Actions"],"summary":"Restore an archived action","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/exchanges":{"get":{"operationId":"list_exchanges","tags":["Exchanges"],"summary":"List the exchanges","description":"The actions done, the oldest created first. Archived ones only with `include_archived=true`.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many records, 1 to 100 (50 by default).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page; left out, the first page.","schema":{"type":"string","maxLength":500}},{"name":"include_archived","in":"query","required":false,"description":"`true` lists the archived records too, with their `archived_at`.","schema":{"type":"string","enum":["true","false"]}},{"name":"company_id","in":"query","required":false,"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":"contact_id","in":"query","required":false,"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":"deal_id","in":"query","required":false,"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":"owner_user_id","in":"query","required":false,"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":"type","in":"query","required":false,"schema":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]}}],"responses":{"200":{"description":"A page of records.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"create_exchanges","tags":["Exchanges"],"summary":"Log an exchange","description":"A call, a meeting, an email or a message that happened: the action done with its outcome, then where the contact now stands, then the next step. An opt-out is final: a next step that would reach the contact is left out.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]},"channel":{"anyOf":[{"type":"string","enum":["linkedin","sms"]},{"type":"null"}]},"is_follow_up":{"type":"boolean"},"deal_id":{"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"}]},"company_id":{"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"}]},"contact_id":{"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"}]},"participants":{"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"contact_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})$"}},"required":["kind","contact_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"colleague"},"user_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})$"}},"required":["kind","user_id"],"additionalProperties":false}]}},"place":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"site"},"site_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})$"}},"required":["kind","site_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"type":"string","minLength":1,"maxLength":300},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]}},"required":["kind","name","address","latitude","longitude"],"additionalProperties":false}]},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"occurred_at":{"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)))$","description":"When it happened; not ahead of now."},"disposition":{"description":"The outcome; required for a call.","anyOf":[{"type":"string","enum":["success","postponed","refused","no_answer","voicemail","wrong_number","reached","meeting","other"]},{"type":"null"}]},"consent_status":{"description":"Where the contact now stands; an opt-out is final.","anyOf":[{"type":"string","enum":["never_contacted","responded","opted_out"]},{"type":"null"}]},"next":{"description":"The next step, planned with the same company and contact.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]},"channel":{"anyOf":[{"type":"string","enum":["linkedin","sms"]},{"type":"null"}]},"is_follow_up":{"type":"boolean"},"due_at":{"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)))$"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["type","due_at"],"additionalProperties":false},{"type":"null"}]}},"required":["type","company_id","occurred_at"],"additionalProperties":false}}}},"responses":{"201":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ExchangeLogged"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A duplicate, or a record in a state that does not allow it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"A field the service refuses (`validation_failed`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/exchanges/{id}":{"get":{"operationId":"get_exchanges","tags":["Exchanges"],"summary":"Get an exchange","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Action"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipelines":{"get":{"operationId":"list_pipelines","tags":["Pipelines"],"summary":"List the pipelines, with their stages","description":"The stages in the order of the board; the entry stage first.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many records, 1 to 100 (50 by default).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page; left out, the first page.","schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"A page of records.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Pipeline"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pipelines/{id}":{"get":{"operationId":"get_pipelines","tags":["Pipelines"],"summary":"Get a pipeline, with its stages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Pipeline"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users":{"get":{"operationId":"list_users","tags":["Users"],"summary":"List the members of the workspace","description":"Whom a company, a deal or an action can be given to.","parameters":[{"name":"limit","in":"query","required":false,"description":"How many records, 1 to 100 (50 by default).","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of the previous page; left out, the first page.","schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"A page of records.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/users/{id}":{"get":{"operationId":"get_users","tags":["Users"],"summary":"Get a member of the workspace","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/User"}}}}}},"400":{"description":"Invalid query or body (`invalid_request`, `invalid_json`, `invalid_cursor`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, unknown, expired or revoked key or token (`unauthorized`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan without the API (`plan_required`), switch off (`feature_disabled`), no seat (`seat_required`), or a right the role or the key does not give (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such record in the workspace (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many calls (`rate_limited`); see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key `cyk_…`, or the OAuth access token of an AI agent."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable, in English: what a program tests."},"message":{"type":"string","description":"For a person, in English; may change."},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"A refused or failed call."},"Company":{"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})$"},"name":{"type":"string"},"commercial_name":{"type":["string","null"]},"siren":{"type":["string","null"]},"domain":{"type":["string","null"]},"sector":{"type":["string","null"]},"naf_code":{"type":["string","null"]},"legal_form":{"description":"INSEE category of the legal form (5710 = SAS).","type":["string","null"]},"headcount_range":{"type":["string","null"]},"category":{"anyOf":[{"type":"string","enum":["PME","ETI","GE"]},{"type":"null"}]},"founded_on":{"anyOf":[{"type":"string","format":"date","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])))$"},{"type":"null"}]},"address":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"city":{"type":["string","null"]},"department":{"type":["string","null"]},"revenue":{"type":["number","null"]},"net_income":{"type":["number","null"]},"accounts_year":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status_id":{"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":"A company status of the workspace."},"owner_user_id":{"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 member in charge of the company."},"notes":{"type":["string","null"]},"linkedin_url":{"type":["string","null"]},"parent_company_id":{"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"}]},"parent_group_name":{"type":["string","null"]},"added_at":{"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"}]},"added_via":{"anyOf":[{"type":"string","enum":["search","radar","manual","extension","import","api","mcp"]},{"type":"null"}]},"archived_at":{"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"}]}},"required":["id","name","commercial_name","siren","domain","sector","naf_code","legal_form","headcount_range","category","founded_on","address","postal_code","city","department","revenue","net_income","accounts_year","status_id","owner_user_id","notes","linkedin_url","parent_company_id","parent_group_name","added_at","added_via","archived_at"],"additionalProperties":false},"Contact":{"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})$"},"company_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})$"},"site_id":{"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"}]},"first_name":{"type":"string"},"last_name":{"type":"string"},"full_name":{"type":"string"},"title":{"type":["string","null"]},"business_unit":{"anyOf":[{"type":"string","enum":["executive","sales","marketing","purchasing","finance","human_resources","legal","information_technology","engineering","production","qhse","customer_service","other"]},{"type":"null"}]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"phone_verified":{"type":"boolean"},"mobile_phone_verified":{"type":"boolean"},"phone_wrong":{"type":"boolean"},"mobile_phone_wrong":{"type":"boolean"},"consent_status":{"type":"string","enum":["never_contacted","responded","opted_out"]},"source":{"type":"string","enum":["manual","import","browser_extension","business_card","api","mcp"]},"linkedin_url":{"type":["string","null"]},"manager_contact_id":{"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"}]},"is_key":{"type":"boolean"},"left_at":{"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"}]},"created_by":{"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"}]},"created_at":{"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)))$"},"updated_at":{"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)))$"},"archived_at":{"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"}]}},"required":["id","company_id","site_id","first_name","last_name","full_name","title","business_unit","email","phone","mobile_phone","phone_verified","mobile_phone_verified","phone_wrong","mobile_phone_wrong","consent_status","source","linkedin_url","manager_contact_id","is_key","left_at","created_by","created_at","updated_at","archived_at"],"additionalProperties":false},"Deal":{"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})$"},"pipeline_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})$"},"stage_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})$"},"company_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})$"},"contact_id":{"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"}]},"contact_ids":{"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})$"}},"owner_user_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})$"},"name":{"type":"string"},"value":{"description":"In euros.","type":["number","null"]},"expected_close_on":{"anyOf":[{"type":"string","format":"date","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])))$"},{"type":"null"}]},"notes":{"type":["string","null"]},"origin":{"anyOf":[{"type":"string","enum":["prospecting","inbound","referral","event","partner","other"]},{"type":"null"}]},"status":{"type":"string","enum":["open","won","lost"]},"closed_at":{"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"}]},"closed_reason":{"type":["string","null"]},"last_activity_at":{"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)))$"},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The values of the deal fields of the workspace, by field id."},"created_by":{"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"}]},"created_at":{"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)))$"},"updated_at":{"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)))$"},"archived_at":{"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"}]}},"required":["id","pipeline_id","stage_id","company_id","contact_id","contact_ids","owner_user_id","name","value","expected_close_on","notes","origin","status","closed_at","closed_reason","last_activity_at","fields","created_by","created_at","updated_at","archived_at"],"additionalProperties":false},"Action":{"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})$"},"type":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]},"channel":{"anyOf":[{"type":"string","enum":["linkedin","sms"]},{"type":"null"}]},"direction":{"anyOf":[{"type":"string","enum":["sent","received"]},{"type":"null"}]},"status":{"type":"string","enum":["planned","done","canceled"]},"disposition":{"anyOf":[{"type":"string","enum":["success","postponed","refused","no_answer","voicemail","wrong_number","reached","meeting","other"]},{"type":"null"}]},"is_follow_up":{"type":"boolean"},"title":{"type":["string","null"]},"notes":{"type":["string","null"]},"due_at":{"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"}]},"completed_at":{"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"}]},"recurrence":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly"]},{"type":"null"}]},"company_id":{"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"}]},"contact_id":{"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"}]},"deal_id":{"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"}]},"owner_user_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})$"},"participants":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"contact_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})$"}},"required":["kind","contact_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"colleague"},"user_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})$"}},"required":["kind","user_id"],"additionalProperties":false}]}},"place":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"site"},"site_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})$"}},"required":["kind","site_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"type":"string","minLength":1,"maxLength":300},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]}},"required":["kind","name","address","latitude","longitude"],"additionalProperties":false}]},{"type":"null"}]},"postponements":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_by":{"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"}]},"created_at":{"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)))$"},"updated_at":{"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)))$"},"archived_at":{"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"}]}},"required":["id","type","channel","direction","status","disposition","is_follow_up","title","notes","due_at","completed_at","recurrence","company_id","contact_id","deal_id","owner_user_id","participants","place","postponements","created_by","created_at","updated_at","archived_at"],"additionalProperties":false},"ExchangeLogged":{"type":"object","properties":{"exchange":{"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})$"},"type":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]},"channel":{"anyOf":[{"type":"string","enum":["linkedin","sms"]},{"type":"null"}]},"direction":{"anyOf":[{"type":"string","enum":["sent","received"]},{"type":"null"}]},"status":{"type":"string","enum":["planned","done","canceled"]},"disposition":{"anyOf":[{"type":"string","enum":["success","postponed","refused","no_answer","voicemail","wrong_number","reached","meeting","other"]},{"type":"null"}]},"is_follow_up":{"type":"boolean"},"title":{"type":["string","null"]},"notes":{"type":["string","null"]},"due_at":{"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"}]},"completed_at":{"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"}]},"recurrence":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly"]},{"type":"null"}]},"company_id":{"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"}]},"contact_id":{"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"}]},"deal_id":{"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"}]},"owner_user_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})$"},"participants":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"contact_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})$"}},"required":["kind","contact_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"colleague"},"user_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})$"}},"required":["kind","user_id"],"additionalProperties":false}]}},"place":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"site"},"site_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})$"}},"required":["kind","site_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"type":"string","minLength":1,"maxLength":300},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]}},"required":["kind","name","address","latitude","longitude"],"additionalProperties":false}]},{"type":"null"}]},"postponements":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_by":{"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"}]},"created_at":{"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)))$"},"updated_at":{"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)))$"},"archived_at":{"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"}]}},"required":["id","type","channel","direction","status","disposition","is_follow_up","title","notes","due_at","completed_at","recurrence","company_id","contact_id","deal_id","owner_user_id","participants","place","postponements","created_by","created_at","updated_at","archived_at"],"additionalProperties":false},"next_action":{"anyOf":[{"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})$"},"type":{"type":"string","enum":["prospecting","call","meeting","proposal","email","message","note","task"]},"channel":{"anyOf":[{"type":"string","enum":["linkedin","sms"]},{"type":"null"}]},"direction":{"anyOf":[{"type":"string","enum":["sent","received"]},{"type":"null"}]},"status":{"type":"string","enum":["planned","done","canceled"]},"disposition":{"anyOf":[{"type":"string","enum":["success","postponed","refused","no_answer","voicemail","wrong_number","reached","meeting","other"]},{"type":"null"}]},"is_follow_up":{"type":"boolean"},"title":{"type":["string","null"]},"notes":{"type":["string","null"]},"due_at":{"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"}]},"completed_at":{"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"}]},"recurrence":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly"]},{"type":"null"}]},"company_id":{"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"}]},"contact_id":{"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"}]},"deal_id":{"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"}]},"owner_user_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})$"},"participants":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"contact_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})$"}},"required":["kind","contact_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"colleague"},"user_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})$"}},"required":["kind","user_id"],"additionalProperties":false}]}},"place":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"site"},"site_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})$"}},"required":["kind","site_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"address"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"address":{"type":"string","minLength":1,"maxLength":300},"latitude":{"anyOf":[{"type":"number","minimum":-90,"maximum":90},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number","minimum":-180,"maximum":180},{"type":"null"}]}},"required":["kind","name","address","latitude","longitude"],"additionalProperties":false}]},{"type":"null"}]},"postponements":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_by":{"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"}]},"created_at":{"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)))$"},"updated_at":{"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)))$"},"archived_at":{"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"}]}},"required":["id","type","channel","direction","status","disposition","is_follow_up","title","notes","due_at","completed_at","recurrence","company_id","contact_id","deal_id","owner_user_id","participants","place","postponements","created_by","created_at","updated_at","archived_at"],"additionalProperties":false},{"type":"null"}]},"consent_status":{"anyOf":[{"type":"string","enum":["never_contacted","responded","opted_out"]},{"type":"null"}],"description":"The status the contact moved to; `null` when unchanged."}},"required":["exchange","next_action","consent_status"],"additionalProperties":false},"Pipeline":{"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})$"},"name":{"type":"string"},"created_at":{"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)))$"},"stages":{"type":"array","items":{"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})$"},"name":{"type":"string"},"color":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outcome":{"anyOf":[{"type":"string","enum":["won","lost"]},{"type":"null"}]},"is_entry":{"type":"boolean"}},"required":["id","name","color","position","outcome","is_entry"],"additionalProperties":false}}},"required":["id","name","created_at","stages"],"additionalProperties":false},"User":{"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})$"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false}}}}