{
  "openapi": "3.1.0",
  "info": {
    "title": "ContactRoll API",
    "version": "1",
    "description": "An organization's contacts, companies, deals and cases (each with its custom fields), the records of its own kinds (/objects, each with its links), its members with their roles, its custom fields, and its calls (read, and logged from another phone system), its pipeline stages and notes, and REST hooks, for its own systems (Zapier among them). Every request carries an API key (Settings, API keys) as a Bearer token; the key's organization is the only one it reads or writes. Nothing here sends email. Every read answered (a GET with a 200) and every bulk export is an entry in the organization's audit log: the key, its maker, the resource and how many records — never a record's content. Tasks are read and made under /tasks. An AI assistant reaches these same records through ContactRoll's MCP server, at /api/mcp on the app's host, with an API key: it reads, and changes records only with a key allowed MCP writes; each of its calls is an entry in the audit log. Each contact, company, deal and case carries its version: send it back as If-Match to change only what you read. Bulk jobs import contacts and export records in the hundreds of thousands. A key makes as many requests a minute as it was made with, and never more than its plan's (Standard 120, Plus 600). Generated from the code by scripts/openapi.py."
  },
  "servers": [
    {
      "url": "https://app.contactroll.com/api/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "oauth2": []
    }
  ],
  "paths": {
    "/contacts": {
      "get": {
        "summary": "List contacts",
        "operationId": "list_contacts",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "1 to 100; 50 by default."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The previous page's next_cursor (asked with the same order)."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "updated"
              ]
            },
            "description": "oldest (made first; the default), newest (made last first) or updated (changed last first) — each with a stable id."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose words match these, 1 to 200 characters, read as a search box reads them (\"two words\", -not, or): a contact's name and email, a company's name and domain, a deal's name, a case's subject and description."
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those changed at or after this time, in ISO 8601 (as 2026-11-01T09:30:00Z): updated_at, or for a contact never changed, when it was made."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those of this member (their id), or none: whose they are — a case's assignee."
          },
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "One address; unique in the organization."
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A company of this organization."
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those with this number, in E.164 (as +14155550123)."
          }
        ],
        "responses": {
          "200": {
            "description": "A page, in the order asked (the order they were made, by default).",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Contact"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ],
        "description": "Needs Contacts (read) in a scoped key or an app's token."
      },
      "post": {
        "summary": "Make a contact",
        "operationId": "create_contact",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      }
    },
    "/contacts/upsert": {
      "post": {
        "summary": "Make or change a contact, found by your app's id",
        "operationId": "upsert_contact",
        "description": "Found by its external_id, else its email: changed with the fields sent (200), or made (201). One that is another of your app's records (it holds another external_id) is refused (409). On the Standard and Plus plans; on Standard a key makes this request and the other upsert, and nothing else. Needs Contacts (read and change) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Found, and changed: only the fields sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ContactRoll-Matched": {
                "description": "How it was found: external_id, email, or none (it was made).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ContactRoll-Matched": {
                "description": "How it was found: external_id, email, or none (it was made).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ]
      }
    },
    "/contacts/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a contact",
        "operationId": "get_contact",
        "responses": {
          "200": {
            "description": "It.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ],
        "description": "Needs Contacts (read) in a scoped key or an app's token."
      },
      "patch": {
        "summary": "Change a contact",
        "operationId": "update_contact",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "description": "The version you read: \"7\", 7, W/\"7\", a list of them, or * for any. Another version is refused (412, version_mismatch) and nothing is changed; without it, the change is made whatever the version."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed: only the fields sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "If-Match named a version the record is no longer at; error.current_version is the one it is at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      }
    },
    "/companies": {
      "get": {
        "summary": "List companies",
        "operationId": "list_companies",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "1 to 100; 50 by default."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The previous page's next_cursor (asked with the same order)."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "updated"
              ]
            },
            "description": "oldest (made first; the default), newest (made last first) or updated (changed last first) — each with a stable id."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose words match these, 1 to 200 characters, read as a search box reads them (\"two words\", -not, or): a contact's name and email, a company's name and domain, a deal's name, a case's subject and description."
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those changed at or after this time, in ISO 8601 (as 2026-11-01T09:30:00Z): updated_at, or for a contact never changed, when it was made."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those of this member (their id), or none: whose they are — a case's assignee."
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A domain name, like example.com; unique in the organization."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose name is this, whole (case aside)."
          }
        ],
        "responses": {
          "200": {
            "description": "A page, in the order asked (the order they were made, by default).",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Company"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "companies",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "companies:read"
            ]
          }
        ],
        "description": "Needs Companies (read) in a scoped key or an app's token."
      },
      "post": {
        "summary": "Make a company",
        "operationId": "create_company",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "companies",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "companies:write"
            ]
          }
        ],
        "description": "Needs Companies (read and change) in a scoped key or an app's token."
      }
    },
    "/companies/upsert": {
      "post": {
        "summary": "Make or change a company, found by your app's id",
        "operationId": "upsert_company",
        "description": "Found by its external_id, else its domain: changed with the fields sent (200), or made (201). One that is another of your app's records (it holds another external_id) is refused (409). On the Standard and Plus plans; on Standard a key makes this request and the other upsert, and nothing else. Needs Companies (read and change) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Found, and changed: only the fields sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ContactRoll-Matched": {
                "description": "How it was found: external_id, domain, or none (it was made).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ContactRoll-Matched": {
                "description": "How it was found: external_id, domain, or none (it was made).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "companies",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "companies:write"
            ]
          }
        ]
      }
    },
    "/companies/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a company",
        "operationId": "get_company",
        "responses": {
          "200": {
            "description": "It.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "companies",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "companies:read"
            ]
          }
        ],
        "description": "Needs Companies (read) in a scoped key or an app's token."
      },
      "patch": {
        "summary": "Change a company",
        "operationId": "update_company",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "description": "The version you read: \"7\", 7, W/\"7\", a list of them, or * for any. Another version is refused (412, version_mismatch) and nothing is changed; without it, the change is made whatever the version."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed: only the fields sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "If-Match named a version the record is no longer at; error.current_version is the one it is at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "companies",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "companies:write"
            ]
          }
        ],
        "description": "Needs Companies (read and change) in a scoped key or an app's token."
      }
    },
    "/deals": {
      "get": {
        "summary": "List deals",
        "operationId": "list_deals",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "1 to 100; 50 by default."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The previous page's next_cursor (asked with the same order)."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "updated"
              ]
            },
            "description": "oldest (made first; the default), newest (made last first) or updated (changed last first) — each with a stable id."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose words match these, 1 to 200 characters, read as a search box reads them (\"two words\", -not, or): a contact's name and email, a company's name and domain, a deal's name, a case's subject and description."
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those changed at or after this time, in ISO 8601 (as 2026-11-01T09:30:00Z): updated_at, or for a contact never changed, when it was made."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those of this member (their id), or none: whose they are — a case's assignee."
          },
          {
            "name": "stage_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A pipeline stage of this organization; the first open stage by default."
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "A company of this organization."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose name is this, whole (case aside)."
          }
        ],
        "responses": {
          "200": {
            "description": "A page, in the order asked (the order they were made, by default).",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deal"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "deals",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "deals:read"
            ]
          }
        ],
        "description": "Needs Deals (read) in a scoped key or an app's token."
      },
      "post": {
        "summary": "Make a deal",
        "operationId": "create_deal",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "deals",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "deals:write"
            ]
          }
        ],
        "description": "Needs Deals (read and change) in a scoped key or an app's token."
      }
    },
    "/deals/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a deal",
        "operationId": "get_deal",
        "responses": {
          "200": {
            "description": "It.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "deals",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "deals:read"
            ]
          }
        ],
        "description": "Needs Deals (read) in a scoped key or an app's token."
      },
      "patch": {
        "summary": "Change a deal",
        "operationId": "update_deal",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "description": "The version you read: \"7\", 7, W/\"7\", a list of them, or * for any. Another version is refused (412, version_mismatch) and nothing is changed; without it, the change is made whatever the version."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed: only the fields sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "If-Match named a version the record is no longer at; error.current_version is the one it is at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "deals",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "deals:write"
            ]
          }
        ],
        "description": "Needs Deals (read and change) in a scoped key or an app's token."
      }
    },
    "/cases": {
      "get": {
        "summary": "List cases",
        "operationId": "list_cases",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "1 to 100; 50 by default."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The previous page's next_cursor (asked with the same order)."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "oldest",
                "newest",
                "updated"
              ]
            },
            "description": "oldest (made first; the default), newest (made last first) or updated (changed last first) — each with a stable id."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose words match these, 1 to 200 characters, read as a search box reads them (\"two words\", -not, or): a contact's name and email, a company's name and domain, a deal's name, a case's subject and description."
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those changed at or after this time, in ISO 8601 (as 2026-11-01T09:30:00Z): updated_at, or for a contact never changed, when it was made."
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those of this member (their id), or none: whose they are — a case's assignee."
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Whose case it is; a case stays with its person."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Its status."
          }
        ],
        "responses": {
          "200": {
            "description": "A page, in the order asked (the order they were made, by default).",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Case"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "cases",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "cases:read"
            ]
          }
        ],
        "description": "Needs Cases (read) in a scoped key or an app's token."
      },
      "post": {
        "summary": "Make a case",
        "operationId": "create_case",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "cases",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "cases:write"
            ]
          }
        ],
        "description": "Needs Cases (read and change) in a scoped key or an app's token."
      }
    },
    "/cases/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a case",
        "operationId": "get_case",
        "responses": {
          "200": {
            "description": "It.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "cases",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "cases:read"
            ]
          }
        ],
        "description": "Needs Cases (read) in a scoped key or an app's token."
      },
      "patch": {
        "summary": "Change a case",
        "operationId": "update_case",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "description": "The version you read: \"7\", 7, W/\"7\", a list of them, or * for any. Another version is refused (412, version_mismatch) and nothing is changed; without it, the change is made whatever the version."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CaseWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed: only the fields sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Case"
                }
              }
            }
          },
          "404": {
            "description": "Not in this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "If-Match named a version the record is no longer at; error.current_version is the one it is at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "cases",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "cases:write"
            ]
          }
        ],
        "description": "Needs Cases (read and change) in a scoped key or an app's token."
      }
    },
    "/members": {
      "get": {
        "summary": "List members and their roles",
        "operationId": "list_members",
        "description": "Every member of the organization, with their role by its key and whether it is one of the organization's own. For a key whose maker may give members their roles, asked at every request. Needs Admin (read) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "Every member, by address.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Member"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The key's maker may not give members their roles now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:read"
            ]
          }
        ]
      }
    },
    "/custom_fields": {
      "get": {
        "summary": "List the organization's custom fields",
        "operationId": "list_custom_fields",
        "description": "Every live custom field on contacts, companies, deals and cases, with the key a record's `custom` names it by. For any key of the organization: a field holds no record's value. Needs Admin (read) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "Every field, by record type and order.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomField"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:read"
            ]
          }
        ]
      }
    },
    "/calls": {
      "get": {
        "summary": "List calls",
        "operationId": "list_calls",
        "description": "The organization's calls, oldest logged first (newest first with order=newest), a page at a time — to keep them in another system. Read only, on the Plus plan, for a key whose maker may see calls now; only the calls that member reaches (their own, or one on a record they see). Never a call's notes, and never its recording. Needs Calls (read) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "1 to 100; 50 by default."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The previous page's next_cursor."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only calls made at or after this moment, as 2026-10-28T09:00:00Z."
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only calls made before this moment, as 2026-10-28T09:00:00Z."
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "incoming",
                "outgoing"
              ]
            },
            "description": "incoming or outgoing."
          },
          {
            "name": "outcome",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "connected",
                "left_voicemail",
                "no_answer",
                "busy",
                "wrong_number",
                "callback_requested"
              ]
            },
            "description": "connected, left_voicemail, no_answer, busy, wrong_number or callback_requested."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "hand",
                "softphone",
                "inbound",
                "api"
              ]
            },
            "description": "hand (logged by a person), softphone (placed in ContactRoll), inbound (rang in to ContactRoll) or api (logged by another phone system through POST /calls)."
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Who was called, or who called."
          },
          {
            "name": "case_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The case it was logged on, if any."
          },
          {
            "name": "deal_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The deal it was logged on, if any."
          },
          {
            "name": "logged_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only the calls this member logged, answered or placed."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose order is this."
          }
        ],
        "responses": {
          "200": {
            "description": "A page, oldest logged first.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Call"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A query key that is not one of these, or a value it cannot hold.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key's maker may not see calls now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "A path under /calls: there is nothing there.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "A method other than GET or POST (Allow: GET, POST).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "calls",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "calls:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Log a call",
        "operationId": "log_call",
        "description": "Another phone system logs a call onto a contact: the one holding the number on their side (`to` on an outgoing call, `from` on an incoming one), or the contact_id sent. It is on the record as a call logged by the key's maker — on the contact's timeline, in GET /calls (source api) — and fires call.ended, as every call does. For a read-and-write key whose maker may log calls now, and a contact that member reaches. On the Plus plan. Needs Calls (read and change) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Logged.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Call"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown, or not a value a call holds (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not log calls now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "contact_id names no contact here that the key's maker reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "More than one contact holds the number (error.code ambiguous: send contact_id), or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "No contact here holds the number (error.code no_contact): add it to a contact, or send contact_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "calls",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "calls:write"
            ]
          }
        ]
      }
    },
    "/bulk/import": {
      "post": {
        "summary": "Import contacts, or a kind's records, as a job",
        "operationId": "bulk_import",
        "description": "Up to 100,000 contacts in one request (25 MB at most), on the Plus plan: JSON, or a CSV file (content-type text/csv) with a header line naming its columns — email, name, company, status, plan_tier, signup_date, phone (a mobile number, E.164), work_phone, and any custom field's key (cf_…); an empty cell is left out, a column nobody named is refused. The job runs on its own, 500 rows a minute or so, with the import's rules: an email once a file, a person already here skipped or filled in. A checkbox takes yes or no, a multi-select \"a; b\". For a read-and-write key whose maker may import contacts now. 2 jobs at a time. With record_type custom_records and object_type (a kind's key, JSON only), every row is made as POST /objects/{key}/records makes one — {name, owner_id, custom}, each refused in its own words — for a key whose maker may add that kind's records now. Needs Admin (read and change) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          },
          {
            "name": "existing",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "skip",
                "fill"
              ]
            },
            "description": "For a CSV file: skip (the default) leaves the people already here as they are; fill fills in their blank fields only."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rows"
                ],
                "additionalProperties": false,
                "properties": {
                  "record_type": {
                    "type": "string",
                    "enum": [
                      "contacts",
                      "custom_records"
                    ],
                    "default": "contacts"
                  },
                  "existing": {
                    "type": "string",
                    "enum": [
                      "skip",
                      "fill"
                    ],
                    "default": "skip"
                  },
                  "rows": {
                    "type": "array",
                    "maxItems": 100000,
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "email": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "company": {
                              "type": "string",
                              "description": "A company found by name, or made once."
                            },
                            "status": {
                              "type": "string"
                            },
                            "plan_tier": {
                              "type": "string"
                            },
                            "signup_date": {
                              "type": "string",
                              "description": "A date, like 2026-10-04."
                            },
                            "phones": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "e164": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "custom": {
                              "type": "object",
                              "propertyNames": {
                                "pattern": "^cf_[0-9a-f]{16}$"
                              },
                              "additionalProperties": true
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "name"
                          ],
                          "additionalProperties": false,
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "owner_id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uuid"
                            },
                            "custom": {
                              "type": "object",
                              "propertyNames": {
                                "pattern": "^cf_[0-9a-f]{16}$"
                              },
                              "additionalProperties": true
                            }
                          }
                        }
                      ]
                    }
                  },
                  "object_type": {
                    "type": "string",
                    "description": "With record_type custom_records: the kind's key."
                  }
                },
                "example": {
                  "record_type": "contacts",
                  "existing": "skip",
                  "rows": [
                    {
                      "email": "pat@example.com",
                      "name": "Pat Doe",
                      "company": "Acme Ltd"
                    }
                  ]
                }
              }
            },
            "text/csv": {
              "schema": {
                "type": "string"
              },
              "example": "email,name,company,phone\r\npat@example.com,Pat Doe,Acme Ltd,+14155550123\r\n"
            }
          }
        },
        "responses": {
          "202": {
            "description": "The job, queued.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "Location": {
                "schema": {
                  "type": "string"
                },
                "description": "The job's address: /api/v1/bulk/jobs/{id}."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkJob"
                }
              }
            }
          },
          "400": {
            "description": "Not rows, a column or field nobody named, or existing that is not skip or fill.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a maker who may not import contacts now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "2 bulk jobs under way already (Retry-After), or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Over 25 MB, or more rows than the plan takes (100,000 on Plus).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:write"
            ]
          }
        ]
      }
    },
    "/bulk/export": {
      "post": {
        "summary": "Export records as a job",
        "operationId": "bulk_export",
        "description": "Every contact, company, deal or case the key's maker may see, as the API shows each one, read a page at a time from the job's /results (up to 100,000). On the Plus plan. A kind's records: record_type custom_records, with object_type. Needs Admin (read and change) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "record_type"
                ],
                "additionalProperties": false,
                "properties": {
                  "record_type": {
                    "type": "string",
                    "enum": [
                      "contacts",
                      "companies",
                      "deals",
                      "cases",
                      "custom_records"
                    ]
                  },
                  "object_type": {
                    "type": "string",
                    "description": "With record_type custom_records: the kind's key."
                  }
                },
                "example": {
                  "record_type": "deals"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The job, queued.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "Location": {
                "schema": {
                  "type": "string"
                },
                "description": "The job's address: /api/v1/bulk/jobs/{id}."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkJob"
                }
              }
            }
          },
          "400": {
            "description": "A record type that is not one of these.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A maker who may not see these records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "2 bulk jobs under way already (Retry-After).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:write"
            ]
          }
        ]
      }
    },
    "/bulk/jobs": {
      "get": {
        "summary": "List this key's bulk jobs",
        "operationId": "list_bulk_jobs",
        "responses": {
          "200": {
            "description": "This key's jobs, newest first (50 at most), and no other key's.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BulkJob"
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "The member who made this key has left this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:read"
            ]
          }
        ],
        "description": "Needs Admin (read) in a scoped key or an app's token."
      }
    },
    "/bulk/jobs/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a bulk job",
        "operationId": "get_bulk_job",
        "responses": {
          "200": {
            "description": "How far it is.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkJob"
                }
              }
            }
          },
          "404": {
            "description": "No job of this key's with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The member who made this key has left this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:read"
            ]
          }
        ],
        "description": "Needs Admin (read) in a scoped key or an app's token."
      }
    },
    "/bulk/jobs/{id}/errors": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a bulk job's failed rows",
        "operationId": "bulk_job_errors",
        "description": "A page of up to 1,000, in row order. As a CSV file: row, email, error. Needs Admin (read) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "The last row number you have: the previous page's next_after."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1000
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "csv"
              ]
            },
            "description": "csv: the page as a CSV file, the next page's mark in ContactRoll-Next-After."
          }
        ],
        "responses": {
          "200": {
            "description": "A page.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ContactRoll-Next-After": {
                "schema": {
                  "type": "string"
                },
                "description": "With format=csv: the next page's after, if there is one."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "row": {
                            "type": "integer"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "error": {
                            "type": "string"
                          },
                          "values": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "description": "The row as it was sent (left out of a CSV)."
                          }
                        }
                      }
                    },
                    "next_after": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "job": {
                      "$ref": "#/components/schemas/BulkJob"
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "after or limit that is not a number in range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No job of this key's with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The member who made this key has left this organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:read"
            ]
          }
        ]
      }
    },
    "/bulk/jobs/{id}/results": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read an export's records",
        "operationId": "bulk_job_results",
        "description": "A page of up to 1,000, in row order. As a CSV file: each record's plain fields, then its custom fields as custom.<key>. Each record as the key's maker sees it now: one since narrowed out of their reach is left out, a field since hidden from them is not in it; the next page is by row number. Needs Admin (read) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "The last row number you have: the previous page's next_after."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1000
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "csv"
              ]
            },
            "description": "csv: the page as a CSV file, the next page's mark in ContactRoll-Next-After."
          }
        ],
        "responses": {
          "200": {
            "description": "A page.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ContactRoll-Next-After": {
                "schema": {
                  "type": "string"
                },
                "description": "With format=csv: the next page's after, if there is one."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_after": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "job": {
                      "$ref": "#/components/schemas/BulkJob"
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "after or limit that is not a number in range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No job of this key's with that id, or an import (it has no results).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The member who made this key has left this organization, or (results) may no longer see these records: the job is stopped, and the reason said.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "admin",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "admin:read"
            ]
          }
        ]
      }
    },
    "/me": {
      "get": {
        "summary": "Who this key is",
        "operationId": "get_me",
        "description": "The key's organization, the key, and what it may do now — its maker's permissions and reach, asked at every request. A test of a key that changes nothing.",
        "responses": {
          "200": {
            "description": "The key.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "405": {
            "description": "A method other than GET (Allow: GET).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": []
          }
        ]
      }
    },
    "/hooks": {
      "get": {
        "summary": "List this key's hooks",
        "operationId": "list_hooks",
        "responses": {
          "200": {
            "description": "This key's hooks, and no other key's.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Hook"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key's maker may not set up outgoing webhooks now (the integrations.webhooks permission, which the Owner and the Administrator hold), or has left the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "webhooks",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "webhooks:read"
            ]
          }
        ],
        "description": "Needs Webhooks (read) in a scoped key or an app's token."
      },
      "post": {
        "summary": "Subscribe a REST hook",
        "operationId": "subscribe_hook",
        "description": "A hook hears one event and is sent each one about a record the key's maker reaches, signed as every webhook is (ContactRoll-Signature). It goes when the key is revoked, when its target answers 410 Gone, and after 20 failed tries in a row. A read-and-write key; 25 hooks a key at most. No Idempotency-Key is kept. The key's maker must be one who may set up outgoing webhooks; a hook whose maker may not now is held (sent nothing) until they may again. Needs Webhooks (read and change) in a scoped key or an app's token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_url",
                  "event"
                ],
                "additionalProperties": false,
                "properties": {
                  "target_url": {
                    "type": "string",
                    "description": "An https address on a public host."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "contact.created",
                      "contact.updated",
                      "company.created",
                      "company.updated",
                      "deal.created",
                      "deal.updated",
                      "case.created",
                      "case.updated",
                      "call.ended",
                      "call.recorded",
                      "custom_record.created",
                      "custom_record.updated",
                      "custom_record.deleted"
                    ]
                  }
                },
                "example": {
                  "target_url": "https://hooks.zapier.com/hooks/standard/1/abc/",
                  "event": "contact.created"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Subscribed; the signing secret, once.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hook"
                }
              }
            }
          },
          "400": {
            "description": "An event that is not one of these, an address that is not public https, or a field nobody named.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, a key whose maker may not set up outgoing webhooks now, or a key whose maker has left.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "25 hooks on this key already.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "The signing secret could not be made; nothing was.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "webhooks",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/hooks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "summary": "Unsubscribe a REST hook",
        "operationId": "unsubscribe_hook",
        "responses": {
          "200": {
            "description": "Gone.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "hook"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "deleted": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No hook of this key's with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key's maker may not set up outgoing webhooks now (the integrations.webhooks permission, which the Owner and the Administrator hold), or has left the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "webhooks",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "webhooks:write"
            ]
          }
        ],
        "description": "Needs Webhooks (read and change) in a scoped key or an app's token."
      }
    },
    "/stages": {
      "get": {
        "summary": "List pipeline stages",
        "operationId": "list_stages",
        "description": "Every stage of every pipeline, in their order: the stage_id a deal takes. Needs Deals (read) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "The stages.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Stage"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "deals",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "deals:read"
            ]
          }
        ]
      }
    },
    "/notes": {
      "post": {
        "summary": "Add a note",
        "operationId": "create_note",
        "description": "A note on one contact, company, deal or case the key's maker reaches — theirs, and told to nobody. Needs Contacts (read and change) in a scoped key or an app's token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "body"
                ],
                "additionalProperties": false,
                "properties": {
                  "contact_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "company_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "deal_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "case_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "Plain text, 1 to 10,000 characters."
                  }
                },
                "example": {
                  "contact_id": "7a0d7c4e-2b7e-4a51-9e0a-6d3c1b2a9f10",
                  "body": "Called back; sending a quote on Monday."
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Added.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Note"
                }
              }
            }
          },
          "400": {
            "description": "Not exactly one record, or no words.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a maker who may not write notes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such record that the key's maker reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ]
      }
    },
    "/objects": {
      "get": {
        "summary": "List the organization's own kinds of record",
        "operationId": "list_object_types",
        "description": "The kinds of record the organization made for itself (Settings, Objects) that the key's maker may see, in their order: each with its key, its names, its icon, its name field's label, what this key may do with its records, and its fields. On the Plus plan. Needs Contacts (read) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "The kinds.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ObjectType"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Anything in the query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ]
      }
    },
    "/objects/{key}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^obj_[0-9a-f]{12}$"
          },
          "description": "The kind's key, from GET /objects."
        }
      ],
      "get": {
        "summary": "Read one kind of record",
        "operationId": "get_object_type",
        "responses": {
          "200": {
            "description": "The kind.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectType"
                }
              }
            }
          },
          "404": {
            "description": "No kind with that key here that the key's maker may see (GET /objects lists them), or no such record of it within the maker's reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ],
        "description": "Needs Contacts (read) in a scoped key or an app's token."
      }
    },
    "/objects/{key}/records": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^obj_[0-9a-f]{12}$"
          },
          "description": "The kind's key, from GET /objects."
        }
      ],
      "get": {
        "summary": "List a kind's records",
        "operationId": "list_custom_records",
        "description": "The kind's records within the key's maker's reach, a page at a time, newest first unless asked otherwise. Needs Contacts (read) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "1 to 100; 50 by default."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The previous page's next_cursor (asked with the same order)."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "updated"
              ],
              "default": "newest"
            },
            "description": "newest (made last first; the default), oldest (made first) or updated (changed last first) — each with a stable id."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose name holds these characters (1 to 200, case aside): a part of a name, as typed."
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only those whose name is this, whole (case aside)."
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Only those this member owns."
          }
        ],
        "responses": {
          "200": {
            "description": "A page.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomRecord"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A query key that is not one of these, or a value it cannot hold.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not see this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No kind with that key here that the key's maker may see (GET /objects lists them), or no such record of it within the maker's reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Make a record of a kind",
        "operationId": "create_custom_record",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomRecordWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              },
              "Location": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's address: /api/v1/objects/{key}/records/{id}."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRecord"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "The kind holds as many records as the plan allows (the number is in the message).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not add this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No kind with that key here that the key's maker may see (GET /objects lists them), or no such record of it within the maker's reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "An Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      }
    },
    "/objects/{key}/records/{id}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^obj_[0-9a-f]{12}$"
          },
          "description": "The kind's key, from GET /objects."
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a record of a kind",
        "operationId": "get_custom_record",
        "responses": {
          "200": {
            "description": "It.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRecord"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not see this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No kind with that key here that the key's maker may see (GET /objects lists them), or no such record of it within the maker's reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ],
        "description": "Needs Contacts (read) in a scoped key or an app's token."
      },
      "patch": {
        "summary": "Change a record of a kind",
        "operationId": "update_custom_record",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "description": "The version you read: \"7\", 7, W/\"7\", a list of them, or * for any. Another version is refused (412, version_mismatch) and nothing is changed; without it, the change is made whatever the version."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomRecordWrite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed: only the fields sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "The record's version. It arrives weak, W/\"7\" (Supabase's gateway weakens it); send it back as If-Match, weak or not."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRecord"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not change this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No kind with that key here that the key's maker may see (GET /objects lists them), or no such record of it within the maker's reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "An Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "If-Match named a version the record is no longer at; error.current_version is the one it is at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      },
      "delete": {
        "summary": "Delete a record of a kind",
        "operationId": "delete_custom_record",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "description": "The version you read: \"7\", 7, W/\"7\", a list of them, or * for any. Another version is refused (412, version_mismatch) and nothing is changed; without it, the change is made whatever the version."
          }
        ],
        "description": "The record and its links go; the contacts, companies, deals and cases it was linked to stay. Needs Contacts (read and change) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "Gone.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "custom_record"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "type": {
                      "type": "string"
                    },
                    "deleted": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not delete this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No kind with that key here that the key's maker may see (GET /objects lists them), or no such record of it within the maker's reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "If-Match named a version the record is no longer at; error.current_version is the one it is at.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ]
      }
    },
    "/objects/{key}/records/{id}/links": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^obj_[0-9a-f]{12}$"
          },
          "description": "The kind's key, from GET /objects."
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "List a record's links",
        "operationId": "list_custom_record_links",
        "description": "Its links to contacts, companies, deals and cases, but those to a record the key's maker does not reach. Needs Contacts (read) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "Its links, oldest first.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomRecordLink"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not see this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No kind with that key here that the key's maker may see (GET /objects lists them), or no such record of it within the maker's reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Link a record to a contact, a company, a deal or a case",
        "operationId": "link_custom_record",
        "description": "A change of the record (its kind's edit, within the maker's reach), to a record of this organization the key's maker reaches. Linking it again to the same record changes the role. Needs Contacts (read and change) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomRecordLinkWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Linked.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRecordLink"
                }
              }
            }
          },
          "200": {
            "description": "Linked already: its role is the one sent.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRecordLink"
                }
              }
            }
          },
          "400": {
            "description": "Not exactly one record, a field nobody named, or a role over 60 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not change this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such record here, or none the key's maker reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ]
      }
    },
    "/objects/{key}/records/{id}/links/{link_id}": {
      "parameters": [
        {
          "name": "key",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^obj_[0-9a-f]{12}$"
          },
          "description": "The kind's key, from GET /objects."
        },
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "link_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "delete": {
        "summary": "Unlink a record",
        "operationId": "unlink_custom_record",
        "responses": {
          "200": {
            "description": "Gone.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "link"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "deleted": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not change this kind's records now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such link on this record that the key's maker reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      }
    },
    "/relationships": {
      "get": {
        "summary": "List the organization's relationship types",
        "operationId": "list_relationship_types",
        "description": "How the organization's kinds of record relate (Settings, Data model): each type's two kinds, its names each way, one-to-many or many-to-many, what deleting does, and its attributes. On the Plus plan. Needs Contacts (read) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "The types.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RelationshipType"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ]
      }
    },
    "/relationships/{type}": {
      "parameters": [
        {
          "name": "type",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The relationship type's id, from GET /relationships."
        }
      ],
      "get": {
        "summary": "Read one relationship type",
        "operationId": "get_relationship_type",
        "responses": {
          "200": {
            "description": "The type.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipType"
                }
              }
            }
          },
          "404": {
            "description": "No relationship type with that id here.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ],
        "description": "Needs Contacts (read) in a scoped key or an app's token."
      }
    },
    "/relationships/{type}/links": {
      "parameters": [
        {
          "name": "type",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The relationship type's id, from GET /relationships."
        }
      ],
      "get": {
        "summary": "List a relationship's links",
        "operationId": "list_relationship_links",
        "description": "Newest first, 100 at most; with record_id, the links of that record on either side. Only links whose two records the key's maker reaches. Needs Contacts (read) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "record_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The links.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RelationshipLink"
                      }
                    },
                    "next_cursor": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A record_id that is not an id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No relationship type with that id here.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Relate two records",
        "operationId": "relate_records",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from_id",
                  "to_id"
                ],
                "properties": {
                  "from_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "to_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "example": {
                  "from_id": "7a0d7c4e-2b7e-4a51-9e0a-6d3c1b2a9f10",
                  "to_id": "1b2c3d4e-5f60-4a71-8b92-a3b4c5d6e7f8",
                  "attributes": {
                    "role": "Lead"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Related.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipLink"
                }
              }
            }
          },
          "400": {
            "description": "A missing id, an attribute the type has not, or a loop of a kind to itself.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a maker who may not change the \"from\" records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such record here, or one the key's maker does not reach.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Already related, or the \"to\" record already has its one on a one-to-many type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      }
    },
    "/relationships/{type}/links/{link_id}": {
      "parameters": [
        {
          "name": "type",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "description": "The relationship type's id, from GET /relationships."
        },
        {
          "name": "link_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a link",
        "operationId": "get_relationship_link",
        "responses": {
          "200": {
            "description": "The link.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipLink"
                }
              }
            }
          },
          "404": {
            "description": "No such link that the key's maker reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ],
        "description": "Needs Contacts (read) in a scoped key or an app's token."
      },
      "patch": {
        "summary": "Change a link's attributes",
        "operationId": "update_relationship_link",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "attributes"
                ],
                "properties": {
                  "attributes": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelationshipLink"
                }
              }
            }
          },
          "400": {
            "description": "An attribute the type has not, or a value not its type's.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a maker who may not change the records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such link that the key's maker reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      },
      "delete": {
        "summary": "Remove a link",
        "operationId": "unrelate_records",
        "responses": {
          "200": {
            "description": "Gone.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "relationship_link"
                    },
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "deleted": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a maker who may not change the records.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such link that the key's maker reaches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      }
    },
    "/tasks": {
      "get": {
        "summary": "List tasks",
        "operationId": "list_tasks",
        "description": "Oldest first, a page at a time. A key reads the tasks its maker reads now (their own, the ones they made, or those on a record their role reaches) and changes the ones its maker may change. Needs Contacts (read) in a scoped key or an app's token.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "1 to 100; 50 by default."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The previous page's next_cursor."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "done"
              ]
            },
            "description": "open or done."
          },
          {
            "name": "owner_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The member it is for (the key's maker when made without one)."
          },
          {
            "name": "contact_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The contact it is on, if any."
          },
          {
            "name": "company_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The company it is on, if any."
          },
          {
            "name": "deal_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The deal it is on, if any."
          },
          {
            "name": "case_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The case it is on, if any."
          }
        ],
        "responses": {
          "200": {
            "description": "A page.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Task"
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key's maker may not see tasks now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ]
      },
      "post": {
        "summary": "Make a task",
        "operationId": "create_task",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "description": "On exactly one contact, company, deal or case the key's maker reaches, made as the key's maker. Needs Contacts (read and change) in a scoped key or an app's token.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskWrite"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Made.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key, or a key whose maker may not add tasks now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The record it would be on is not one the key's maker reaches here.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ]
      }
    },
    "/tasks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Read a task",
        "operationId": "get_task",
        "description": "A key reads the tasks its maker reads now (their own, the ones they made, or those on a record their role reaches) and changes the ones its maker may change. Needs Contacts (read) in a scoped key or an app's token.",
        "responses": {
          "200": {
            "description": "The task.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No task the key's maker reads has that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Outside what the key may reach (insufficient_scope).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:read"
            ]
          }
        ]
      },
      "patch": {
        "summary": "Change a task",
        "operationId": "change_task",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The same key and request within 24 hours is answered with the first answer (Idempotent-Replayed: true)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskChange"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "string"
                },
                "description": "The requests a minute that apply: the key's own number, or its plan's where that is lower (Standard 120, Plus 600)."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                },
                "description": "What is left of this minute."
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "string"
                },
                "description": "When this minute ends, in epoch seconds."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "No live key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Over the key's rate; see Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "A field is unknown or not a value it can hold (named in error.fields).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A read key may not write.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A conflict, or an Idempotency-Key reused for another request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No task the key's maker may change has that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "write"
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "contacts:write"
            ]
          }
        ],
        "description": "Needs Contacts (read and change) in a scoped key or an app's token."
      }
    }
  },
  "webhooks": {
    "contact.created": {
      "post": {
        "summary": "A contact was made: by a person, an import, a form, the API or an email that arrived.",
        "operationId": "event_contact_created",
        "description": "A contact was made: by a person, an import, a form, the API or an email that arrived. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "contact.updated": {
      "post": {
        "summary": "One of a contact's fields changed.",
        "operationId": "event_contact_updated",
        "description": "One of a contact's fields changed. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "contact.merged": {
      "post": {
        "summary": "Two contacts became one: the one kept, and the id of the one merged into it.",
        "operationId": "event_contact_merged",
        "description": "Two contacts became one: the one kept, and the id of the one merged into it. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "contact.deleted": {
      "post": {
        "summary": "A contact was put in Trash.",
        "operationId": "event_contact_deleted",
        "description": "A contact was put in Trash. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "contact.restored": {
      "post": {
        "summary": "A contact was taken out of Trash.",
        "operationId": "event_contact_restored",
        "description": "A contact was taken out of Trash. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "contact.erased": {
      "post": {
        "summary": "A person was erased at their request: only their id is sent.",
        "operationId": "event_contact_erased",
        "description": "A person was erased at their request: only their id is sent. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "contact.unsubscribed": {
      "post": {
        "summary": "A person unsubscribed from the organization's marketing email.",
        "operationId": "event_contact_unsubscribed",
        "description": "A person unsubscribed from the organization's marketing email. In the Marketing area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "marketing",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "company.created": {
      "post": {
        "summary": "A company was made.",
        "operationId": "event_company_created",
        "description": "A company was made. In the Companies area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "companies",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "company.updated": {
      "post": {
        "summary": "One of a company's fields changed.",
        "operationId": "event_company_updated",
        "description": "One of a company's fields changed. In the Companies area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "companies",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "company.merged": {
      "post": {
        "summary": "Two companies became one: the one kept, and the id of the one merged into it.",
        "operationId": "event_company_merged",
        "description": "Two companies became one: the one kept, and the id of the one merged into it. In the Companies area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "companies",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "company.deleted": {
      "post": {
        "summary": "A company was put in Trash.",
        "operationId": "event_company_deleted",
        "description": "A company was put in Trash. In the Companies area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "companies",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "company.restored": {
      "post": {
        "summary": "A company was taken out of Trash.",
        "operationId": "event_company_restored",
        "description": "A company was taken out of Trash. In the Companies area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "companies",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "deal.created": {
      "post": {
        "summary": "A deal was made.",
        "operationId": "event_deal_created",
        "description": "A deal was made. In the Deals area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "deals",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "deal.updated": {
      "post": {
        "summary": "One of a deal's fields changed, its stage among them.",
        "operationId": "event_deal_updated",
        "description": "One of a deal's fields changed, its stage among them. In the Deals area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "deals",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "deal.deleted": {
      "post": {
        "summary": "A deal was put in Trash.",
        "operationId": "event_deal_deleted",
        "description": "A deal was put in Trash. In the Deals area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "deals",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "deal.restored": {
      "post": {
        "summary": "A deal was taken out of Trash.",
        "operationId": "event_deal_restored",
        "description": "A deal was taken out of Trash. In the Deals area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "deals",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "case.created": {
      "post": {
        "summary": "A case was opened: by an email, a call, a chat, a form, a person or the API.",
        "operationId": "event_case_created",
        "description": "A case was opened: by an email, a call, a chat, a form, a person or the API. In the Cases area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "cases",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "case.updated": {
      "post": {
        "summary": "One of a case's fields changed: its status, priority or who it is assigned to.",
        "operationId": "event_case_updated",
        "description": "One of a case's fields changed: its status, priority or who it is assigned to. In the Cases area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "cases",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "case.replied": {
      "post": {
        "summary": "A reply was added to a case, by the customer or the team (an internal note is never sent).",
        "operationId": "event_case_replied",
        "description": "A reply was added to a case, by the customer or the team (an internal note is never sent). In the Cases area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "cases",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "case.deleted": {
      "post": {
        "summary": "A case was put in Trash.",
        "operationId": "event_case_deleted",
        "description": "A case was put in Trash. In the Cases area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "cases",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "case.restored": {
      "post": {
        "summary": "A case was taken out of Trash.",
        "operationId": "event_case_restored",
        "description": "A case was taken out of Trash. In the Cases area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "cases",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "call.ended": {
      "post": {
        "summary": "A call ended, or was logged: its direction, number, length and outcome.",
        "operationId": "event_call_ended",
        "description": "A call ended, or was logged: its direction, number, length and outcome. In the Calls area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "calls",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "call.recorded": {
      "post": {
        "summary": "A call's recording was made: the call's id and the recording's length, never the sound.",
        "operationId": "event_call_recorded",
        "description": "A call's recording was made: the call's id and the recording's length, never the sound. In the Calls area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "calls",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "call.voicemail": {
      "post": {
        "summary": "A caller left a voicemail: the call's id and its length, never the sound.",
        "operationId": "event_call_voicemail",
        "description": "A caller left a voicemail: the call's id and its length, never the sound. In the Calls area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "calls",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "custom_record.created": {
      "post": {
        "summary": "A record of one of the organization's own kinds was made (its type is the kind's key).",
        "operationId": "event_custom_record_created",
        "description": "A record of one of the organization's own kinds was made (its type is the kind's key). In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "custom_record.updated": {
      "post": {
        "summary": "A record of one of the organization's own kinds changed.",
        "operationId": "event_custom_record_updated",
        "description": "A record of one of the organization's own kinds changed. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "custom_record.deleted": {
      "post": {
        "summary": "A record of one of the organization's own kinds was put in Trash.",
        "operationId": "event_custom_record_deleted",
        "description": "A record of one of the organization's own kinds was put in Trash. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "custom_record.restored": {
      "post": {
        "summary": "A record of one of the organization's own kinds was taken out of Trash.",
        "operationId": "event_custom_record_restored",
        "description": "A record of one of the organization's own kinds was taken out of Trash. In the Contacts area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "contacts",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    },
    "member.role_changed": {
      "post": {
        "summary": "A member's role changed: the role by its key, and whether it is one of the organization's own.",
        "operationId": "event_member_role_changed",
        "description": "A member's role changed: the role by its key, and whether it is one of the organization's own. In the Admin area: a REST hook made with a key hears it only while the key reads that area. Each delivery is signed (ContactRoll-Signature: a v1 for each secret in force — two in the day after a secret is replaced) and sent again on failure, each wait twice the one before, give or take half; a 401, 403, 404 or 410 stops it at once. Every attempt is in the endpoint's delivery log, with Send again, and every delivery stopped for good is a dead letter, sent again one by one or all at once.",
        "x-contactroll-area": {
          "area": "admin",
          "needs": "read"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx says it arrived."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "crapi_…, made under Settings, API keys, with the areas it may reach (a key made before scopes reaches every area)."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "An organization's own app (Settings, Connected apps), acting as the member who connected it, in the areas they said yes to.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.contactroll.com/mcp/authorize",
            "tokenUrl": "https://app.contactroll.com/api/oauth/token",
            "refreshUrl": "https://app.contactroll.com/api/oauth/token",
            "scopes": {
              "contacts:read": "Read contacts: contacts, their notes and tasks, and the organization's own kinds of record (/contacts, /notes, /tasks, /objects).",
              "contacts:write": "Read and change contacts: contacts, their notes and tasks, and the organization's own kinds of record (/contacts, /notes, /tasks, /objects).",
              "companies:read": "Read companies: companies (/companies).",
              "companies:write": "Read and change companies: companies (/companies).",
              "deals:read": "Read deals: deals and the pipeline's stages (/deals, /stages).",
              "deals:write": "Read and change deals: deals and the pipeline's stages (/deals, /stages).",
              "cases:read": "Read cases: support cases (/cases).",
              "cases:write": "Read and change cases: support cases (/cases).",
              "calls:read": "Read calls: calls, and logging a call from another phone system (/calls).",
              "calls:write": "Read and change calls: calls, and logging a call from another phone system (/calls).",
              "marketing:read": "Read marketing: the events of a person's marketing email (contact.unsubscribed).",
              "marketing:write": "Read and change marketing: the events of a person's marketing email (contact.unsubscribed).",
              "flows:read": "Read flows: nothing in the API yet.",
              "flows:write": "Read and change flows: nothing in the API yet.",
              "webhooks:read": "Read webhooks: the key's own REST hooks (/hooks).",
              "webhooks:write": "Read and change webhooks: the key's own REST hooks (/hooks).",
              "admin:read": "Read admin: the organization's members, custom fields and bulk jobs (/members, /custom_fields, /bulk), and member.role_changed.",
              "admin:write": "Read and change admin: the organization's members, custom fields and bulk jobs (/members, /custom_fields, /bulk), and member.role_changed."
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "status"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "ambiguous",
                  "busy",
                  "conflict",
                  "forbidden",
                  "idempotency_conflict",
                  "insufficient_scope",
                  "internal",
                  "invalid",
                  "method_not_allowed",
                  "no_contact",
                  "not_found",
                  "plan",
                  "rate_limited",
                  "read_only",
                  "too_large",
                  "unauthorized",
                  "unavailable",
                  "version_mismatch"
                ]
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "integer"
              },
              "fields": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "current_version": {
                "type": "integer",
                "description": "On a 412 (version_mismatch): the record's version now."
              }
            }
          }
        }
      },
      "Contact": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Its id.",
            "type": [
              "string",
              "null"
            ]
          },
          "object": {
            "description": "What it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A name.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "One address; unique in the organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "Its status.",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "A company of this organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "description": "A product of this organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "description": "Your app's own id for the record: one record's in the organization (a contact's within its product, where it has one). A letter or a digit, then letters, digits and _ . : @ | + -, 128 at most.",
            "type": [
              "string",
              "null"
            ]
          },
          "stripe_customer": {
            "description": "Their Stripe customer id (needs product_id).",
            "type": [
              "string",
              "null"
            ]
          },
          "plan_tier": {
            "description": "Their plan's name.",
            "type": [
              "string",
              "null"
            ]
          },
          "signup_date": {
            "description": "A date, like 2026-10-04.",
            "type": [
              "string",
              "null"
            ]
          },
          "last_seen_at": {
            "description": "When their app last saw them.",
            "type": [
              "string",
              "null"
            ]
          },
          "lifecycle": {
            "description": "trial, activated, at_risk or churned — read only.",
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "description": "Their time zone, like America/Chicago: marketing email waits for their daytime.",
            "type": [
              "string",
              "null"
            ]
          },
          "is_caller": {
            "description": "A caller with no address yet — read only.",
            "type": "boolean"
          },
          "version": {
            "description": "A whole number the database moves on every change of the record (a contact's companies and phone numbers included): send it back as If-Match on a PATCH to change only what you read. Read only.",
            "type": "integer"
          },
          "created_at": {
            "description": "When it was made.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "When it last changed.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom": {
            "description": "The organization's own fields, each by its key (cf_…, from GET /custom_fields): text, a number, an amount's minor units as digits, a date, a choice, a list of choices, true or false, an address or a phone number in E.164.",
            "type": "object",
            "additionalProperties": true
          },
          "companies": {
            "description": "Every company they belong to, the primary first: {company_id, role (their role there, or null), primary (true for the one company_id names)} — read only.",
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "company_id",
                "role",
                "primary"
              ],
              "properties": {
                "company_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "primary": {
                  "type": "boolean"
                },
                "started_on": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                },
                "ended_on": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                }
              }
            }
          },
          "lead_score": {
            "description": "Their lead score, worked out from the organization's lead-scoring rules — read only; null where nobody is scored.",
            "type": [
              "integer",
              "null"
            ]
          },
          "lead_score_at": {
            "description": "When their lead score was last worked out — read only.",
            "type": [
              "string",
              "null"
            ]
          },
          "marketing": {
            "description": "Whether they agreed to marketing email, and whether they are unsubscribed — read only.",
            "type": "object",
            "properties": {
              "consented": {
                "type": "boolean"
              },
              "suppressed": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ContactWrite": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "One address; unique in the organization."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its status."
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A company of this organization."
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A product of this organization."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your app's own id for the record: one record's in the organization (a contact's within its product, where it has one). A letter or a digit, then letters, digits and _ . : @ | + -, 128 at most."
          },
          "stripe_customer": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their Stripe customer id (needs product_id)."
          },
          "plan_tier": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their plan's name."
          },
          "signup_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "A date, like 2026-10-04."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Their time zone, like America/Chicago: marketing email waits for their daytime."
          },
          "marketing_consent": {
            "type": "object",
            "description": "Records their agreement to marketing email: {\"source\": one of signup_form, double_opt_in, import, verbal, contract, \"evidence\": what the person did, and where}. Never lifts an unsubscribe.",
            "required": [
              "source",
              "evidence"
            ],
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "signup_form",
                  "double_opt_in",
                  "import",
                  "verbal",
                  "contract"
                ]
              },
              "evidence": {
                "type": "string",
                "maxLength": 2000
              }
            },
            "additionalProperties": false
          },
          "custom": {
            "type": "object",
            "description": "Some of the organization's own fields, each by its key (cf_…, from GET /custom_fields), its value its type's; null clears one. A new record holds every required field.",
            "propertyNames": {
              "pattern": "^cf_[0-9a-f]{16}$"
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "example": {
          "email": "pat@example.com",
          "name": "Pat Doe",
          "marketing_consent": {
            "source": "signup_form",
            "evidence": "Ticked the box on /pricing on 2026-10-01"
          }
        }
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Its id.",
            "type": [
              "string",
              "null"
            ]
          },
          "object": {
            "description": "What it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A name.",
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "description": "A domain name, like example.com; unique in the organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "description": "Up to 5,000 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "description": "Your app's own id for the record: one record's in the organization (a contact's within its product, where it has one). A letter or a digit, then letters, digits and _ . : @ | + -, 128 at most.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "A whole number the database moves on every change of the record (a contact's companies and phone numbers included): send it back as If-Match on a PATCH to change only what you read. Read only.",
            "type": "integer"
          },
          "customer": {
            "description": "The company as your customer, or null where it is not one: {status (active, at_risk or churned), status_by (person, health or won_deal), since, contract ({amount_minor as text, currency, period: month, quarter or year}, or null), renewal_on, success_owner_id, churned_on, churn_reason} — read only.",
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "active",
                  "at_risk",
                  "churned",
                  null
                ]
              },
              "status_by": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "since": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "contract": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount_minor": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "period": {
                    "type": "string",
                    "enum": [
                      "month",
                      "quarter",
                      "year"
                    ]
                  }
                }
              },
              "renewal_on": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "success_owner_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "churned_on": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "churn_reason": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "created_at": {
            "description": "When it was made.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "When it last changed.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom": {
            "description": "The organization's own fields, each by its key (cf_…, from GET /custom_fields): text, a number, an amount's minor units as digits, a date, a choice, a list of choices, true or false, an address or a phone number in E.164.",
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CompanyWrite": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A name."
          },
          "domain": {
            "type": [
              "string",
              "null"
            ],
            "description": "A domain name, like example.com; unique in the organization."
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Up to 5,000 characters."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your app's own id for the record: one record's in the organization (a contact's within its product, where it has one). A letter or a digit, then letters, digits and _ . : @ | + -, 128 at most."
          },
          "custom": {
            "type": "object",
            "description": "Some of the organization's own fields, each by its key (cf_…, from GET /custom_fields), its value its type's; null clears one. A new record holds every required field.",
            "propertyNames": {
              "pattern": "^cf_[0-9a-f]{16}$"
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "example": {
          "name": "Acme Ltd",
          "domain": "acme.example"
        }
      },
      "Deal": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Its id.",
            "type": [
              "string",
              "null"
            ]
          },
          "object": {
            "description": "What it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A name.",
            "type": [
              "string",
              "null"
            ]
          },
          "amount_minor": {
            "description": "The amount in the currency's minor units, as a string of digits (\"250000\" is 2,500.00).",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "description": "Three capital letters; the organization's by default.",
            "type": [
              "string",
              "null"
            ]
          },
          "stage_id": {
            "description": "A pipeline stage of this organization; the first open stage by default.",
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "description": "The stage's name.",
            "type": [
              "string",
              "null"
            ]
          },
          "stage_kind": {
            "description": "open, won or lost.",
            "type": [
              "string",
              "null"
            ]
          },
          "expected_close_on": {
            "description": "A date.",
            "type": [
              "string",
              "null"
            ]
          },
          "owner_id": {
            "description": "A member of this organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "A company of this organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "lost_reason": {
            "description": "Required to move a deal to a lost stage.",
            "type": [
              "string",
              "null"
            ]
          },
          "closed_on": {
            "description": "When it was won or lost.",
            "type": [
              "string",
              "null"
            ]
          },
          "contact_ids": {
            "description": "Its contacts — read only.",
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "contacts": {
            "description": "A deal's people: each contact_id, whether they are its primary contact, and their role on it — one of the organization's roles by name, or null. Written, each is added to the deal or has its place on it changed (role, primary); a person left out stays on the deal.",
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "contact_id",
                "primary",
                "role"
              ],
              "properties": {
                "contact_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "primary": {
                  "type": "boolean"
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "version": {
            "description": "A whole number the database moves on every change of the record (a contact's companies and phone numbers included): send it back as If-Match on a PATCH to change only what you read. Read only.",
            "type": "integer"
          },
          "created_at": {
            "description": "When it was made.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "When it last changed.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom": {
            "description": "The organization's own fields, each by its key (cf_…, from GET /custom_fields): text, a number, an amount's minor units as digits, a date, a choice, a list of choices, true or false, an address or a phone number in E.164.",
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "DealWrite": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "A name."
          },
          "amount_minor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The amount in the currency's minor units, as a string of digits (\"250000\" is 2,500.00)."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Three capital letters; the organization's by default."
          },
          "stage_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A pipeline stage of this organization; the first open stage by default."
          },
          "expected_close_on": {
            "type": [
              "string",
              "null"
            ],
            "description": "A date."
          },
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A member of this organization."
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A company of this organization."
          },
          "lost_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required to move a deal to a lost stage."
          },
          "contacts": {
            "type": "array",
            "maxItems": 50,
            "description": "A deal's people: each contact_id, whether they are its primary contact, and their role on it — one of the organization's roles by name, or null. Written, each is added to the deal or has its place on it changed (role, primary); a person left out stays on the deal.",
            "items": {
              "type": "object",
              "required": [
                "contact_id"
              ],
              "additionalProperties": false,
              "properties": {
                "contact_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "primary": {
                  "type": "boolean"
                }
              }
            }
          },
          "custom": {
            "type": "object",
            "description": "Some of the organization's own fields, each by its key (cf_…, from GET /custom_fields), its value its type's; null clears one. A new record holds every required field.",
            "propertyNames": {
              "pattern": "^cf_[0-9a-f]{16}$"
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "example": {
          "name": "Acme renewal",
          "amount_minor": "250000",
          "currency": "USD"
        }
      },
      "Case": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Its id.",
            "type": [
              "string",
              "null"
            ]
          },
          "object": {
            "description": "What it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "number": {
            "description": "Its number in this organization.",
            "type": "integer"
          },
          "contact_id": {
            "description": "Whose case it is; a case stays with its person.",
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "description": "A product of this organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "assignee_id": {
            "description": "A member of this organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "subject": {
            "description": "1 to 300 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Up to 20,000 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "description": "low, normal, high or urgent.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "Its status.",
            "type": [
              "string",
              "null"
            ]
          },
          "channel": {
            "description": "How it began.",
            "type": [
              "string",
              "null"
            ]
          },
          "awaiting": {
            "description": "Who it waits on.",
            "type": [
              "string",
              "null"
            ]
          },
          "snoozed_until": {
            "description": "Until when it is snoozed.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "A whole number the database moves on every change of the record (a contact's companies and phone numbers included): send it back as If-Match on a PATCH to change only what you read. Read only.",
            "type": "integer"
          },
          "created_at": {
            "description": "When it was made.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "When it last changed.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom": {
            "description": "The organization's own fields, each by its key (cf_…, from GET /custom_fields): text, a number, an amount's minor units as digits, a date, a choice, a list of choices, true or false, an address or a phone number in E.164.",
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CaseWrite": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Whose case it is; a case stays with its person."
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "1 to 300 characters."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Up to 20,000 characters."
          },
          "priority": {
            "type": [
              "string",
              "null"
            ],
            "description": "low, normal, high or urgent."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its status."
          },
          "assignee_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A member of this organization."
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "A product of this organization."
          },
          "custom": {
            "type": "object",
            "description": "Some of the organization's own fields, each by its key (cf_…, from GET /custom_fields), its value its type's; null clears one. A new record holds every required field.",
            "propertyNames": {
              "pattern": "^cf_[0-9a-f]{16}$"
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "example": {
          "contact_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
          "subject": "Invoice question",
          "priority": "high"
        }
      },
      "Member": {
        "type": "object",
        "properties": {
          "object": {
            "description": "What it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Its id.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "One address; unique in the organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "Their role, by its key: a ready-made role's, or one of the organization's own (custom_…).",
            "type": [
              "string",
              "null"
            ]
          },
          "role_label": {
            "description": "The role's name, as people read it.",
            "type": [
              "string",
              "null"
            ]
          },
          "role_custom": {
            "description": "Whether the role is one of the organization's own.",
            "type": "boolean"
          },
          "joined_at": {
            "description": "When they joined the organization.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CustomField": {
        "type": "object",
        "properties": {
          "object": {
            "description": "What it is.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Its id.",
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "description": "The field's key, as a record's `custom` names it.",
            "type": [
              "string",
              "null"
            ]
          },
          "record_type": {
            "description": "contacts, companies, deals or cases.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A name.",
            "type": [
              "string",
              "null"
            ]
          },
          "help": {
            "description": "Its help text.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "text, long_text, number, money, date, dropdown, multi_select, checkbox, url, email or phone.",
            "type": [
              "string",
              "null"
            ]
          },
          "required": {
            "description": "Whether a person or a key must fill it in.",
            "type": "boolean"
          },
          "options": {
            "description": "A dropdown's or a multi-select's choices.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "description": "Three capital letters; the organization's by default.",
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "description": "Its place in the order.",
            "type": "integer"
          },
          "target_type": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "formula": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "rollup": {
            "description": "",
            "type": [
              "string",
              "null"
            ]
          },
          "object_type": {
            "description": "For a field on one of the organization's own kinds of record (record_type custom_records): the kind's key; null otherwise.",
            "type": [
              "string",
              "null"
            ]
          },
          "target_object_type": {
            "description": "For a lookup to one of the organization's own kinds: that kind's key; null otherwise.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Call": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Its id.",
            "type": "string"
          },
          "object": {
            "description": "What it is: call.",
            "type": "string"
          },
          "contact_id": {
            "description": "Who was called, or who called.",
            "type": [
              "string",
              "null"
            ]
          },
          "case_id": {
            "description": "The case it was logged on, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "deal_id": {
            "description": "The deal it was logged on, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "direction": {
            "description": "incoming or outgoing.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "e164": {
            "description": "The number, in E.164, like +14155550142.",
            "type": [
              "string",
              "null"
            ]
          },
          "called_at": {
            "description": "When the call was made.",
            "type": [
              "string",
              "null"
            ]
          },
          "seconds": {
            "description": "How long it lasted, in seconds.",
            "type": [
              "integer",
              "null"
            ]
          },
          "outcome": {
            "description": "connected, left_voicemail, no_answer, busy, wrong_number or callback_requested.",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "description": "hand (logged by a person), softphone (placed in ContactRoll), inbound (rang in to ContactRoll) or api (logged by another phone system through POST /calls).",
            "type": [
              "string",
              "null"
            ]
          },
          "logged_by": {
            "description": "The member who logged it, or who answered or placed it.",
            "type": [
              "string",
              "null"
            ]
          },
          "logged_at": {
            "description": "When it was logged: the list's order.",
            "type": [
              "string",
              "null"
            ]
          },
          "recorded": {
            "description": "Whether a recording of it is kept. The recording itself is never in the API.",
            "type": "boolean"
          },
          "recording_url": {
            "description": "Where another phone system keeps its recording, as it said when it logged the call (an https address); null otherwise. ContactRoll never fetches it.",
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CallWrite": {
        "type": "object",
        "required": [
          "direction",
          "from",
          "to",
          "started_at",
          "outcome"
        ],
        "properties": {
          "direction": {
            "description": "incoming or outgoing.",
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ]
          },
          "from": {
            "description": "The number the call came from, in E.164, like +14155550123.",
            "type": "string",
            "pattern": "^\\+[1-9][0-9]{6,14}$"
          },
          "to": {
            "description": "The number the call went to, in E.164.",
            "type": "string",
            "pattern": "^\\+[1-9][0-9]{6,14}$"
          },
          "started_at": {
            "description": "When the call began, as 2026-10-29T09:00:00Z; not in the future.",
            "type": "string",
            "format": "date-time"
          },
          "duration": {
            "description": "How long it lasted, in whole seconds, 0 to 86400.",
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 86400
          },
          "outcome": {
            "description": "connected, left_voicemail, no_answer, busy, wrong_number or callback_requested.",
            "type": "string",
            "enum": [
              "connected",
              "left_voicemail",
              "no_answer",
              "busy",
              "wrong_number",
              "callback_requested"
            ]
          },
          "recording_url": {
            "description": "Where your phone system keeps the recording: an https address, 2,048 characters at most, with no name or password in it. ContactRoll shows it as a link and never fetches it.",
            "type": [
              "string",
              "null"
            ]
          },
          "contact_id": {
            "description": "Whose call it was. Without it, the call goes to the one contact holding the number on their side — `to` on an outgoing call, `from` on an incoming one.",
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "example": {
          "direction": "outgoing",
          "from": "+16155550100",
          "to": "+14155550142",
          "started_at": "2026-10-29T15:04:05Z",
          "duration": 312,
          "outcome": "connected",
          "recording_url": "https://phones.example.com/recordings/RE123"
        }
      },
      "BulkJob": {
        "type": "object",
        "properties": {
          "object": {
            "type": [
              "string",
              "null"
            ],
            "description": "What it is: bulk_job."
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its id."
          },
          "kind": {
            "type": "string",
            "enum": [
              "import",
              "export"
            ],
            "description": "import or export."
          },
          "record_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "contacts (an import); contacts, companies, deals or cases (an export); custom_records, a kind's (either)."
          },
          "object_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "A job of custom_records: the kind's key."
          },
          "existing": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "skip",
              "fill",
              null
            ],
            "description": "An import's rule for people already here: skip or fill."
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "description": "queued, running, done or failed."
          },
          "total": {
            "type": "integer",
            "description": "Rows in the file (an import), or records written so far (an export)."
          },
          "done": {
            "type": "integer",
            "description": "Rows imported, or records written."
          },
          "failed": {
            "type": "integer",
            "description": "Rows that could not be imported: read them at errors_url."
          },
          "skipped": {
            "type": "integer",
            "description": "People already here, left as they were."
          },
          "pending": {
            "type": "integer",
            "description": "Rows still to do."
          },
          "tries": {
            "type": "integer",
            "description": "How many times a part of it has been tried."
          },
          "why": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why a job failed, in words."
          },
          "truncated": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "An export that stopped at 100,000 records."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it was asked for."
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it began."
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it ended."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the job and its rows are deleted: seven days after it ends."
          },
          "errors_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its failed rows, a page at a time."
          },
          "results_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "An export's records, a page at a time."
          }
        }
      },
      "Me": {
        "type": "object",
        "properties": {
          "object": {
            "const": "me"
          },
          "organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "key": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "prefix": {
                "type": "string"
              },
              "scope": {
                "type": "string",
                "enum": [
                  "read",
                  "read_write"
                ]
              },
              "rate_per_minute": {
                "type": "integer"
              }
            }
          },
          "permissions": {
            "type": "object",
            "description": "For contacts, companies, deals, cases and calls: view, edit (false for a read key) and reach (all, my_team, mine or none: the records the key's maker sees); for notes: edit; for hooks: edit (a read-and-write key whose maker may set up outgoing webhooks).",
            "additionalProperties": true
          }
        }
      },
      "Hook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "object": {
            "const": "hook"
          },
          "event": {
            "type": "string",
            "enum": [
              "contact.created",
              "contact.updated",
              "company.created",
              "company.updated",
              "deal.created",
              "deal.updated",
              "case.created",
              "case.updated",
              "call.ended",
              "call.recorded",
              "custom_record.created",
              "custom_record.updated",
              "custom_record.deleted"
            ]
          },
          "target_url": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "secret_prefix": {
            "type": "string",
            "description": "The signing secret's first twelve characters."
          },
          "signing_secret": {
            "type": "string",
            "description": "The whole signing secret (whsec_…): in the answer to a subscription only, once."
          }
        }
      },
      "Stage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "object": {
            "const": "stage"
          },
          "name": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "open",
              "won",
              "lost"
            ]
          },
          "position": {
            "type": "integer"
          },
          "probability": {
            "type": [
              "integer",
              "null"
            ]
          },
          "pipeline_id": {
            "type": "string",
            "format": "uuid"
          },
          "pipeline": {
            "type": "string",
            "description": "The pipeline's name."
          }
        }
      },
      "Note": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "object": {
            "const": "note"
          },
          "body": {
            "type": "string"
          },
          "contact_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "deal_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "case_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "author_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The key's maker: a key writes with their rights."
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "ObjectType": {
        "type": "object",
        "properties": {
          "object": {
            "description": "What it is.",
            "type": "string"
          },
          "key": {
            "description": "The kind's key (obj_ and 12 characters): its name in every path under /objects. It never changes.",
            "type": "string"
          },
          "singular": {
            "description": "The kind's name for one record, as people read it (\"Property\").",
            "type": "string"
          },
          "plural": {
            "description": "Its name for several (\"Properties\").",
            "type": "string"
          },
          "icon": {
            "description": "The icon it is drawn with.",
            "type": "string"
          },
          "name_label": {
            "description": "What its records' name field is called (\"Address\").",
            "type": "string"
          },
          "position": {
            "description": "Its place in the organization's order.",
            "type": "integer"
          },
          "permissions": {
            "description": "What this key may do with the kind's records now: view, create, edit and delete — the key's maker's role's, and false for every change on a read key.",
            "type": "object",
            "properties": {
              "view": {
                "type": "boolean"
              },
              "create": {
                "type": "boolean"
              },
              "edit": {
                "type": "boolean"
              },
              "delete": {
                "type": "boolean"
              }
            }
          },
          "fields": {
            "description": "The kind's own custom fields (as GET /custom_fields gives each), but those hidden from the key's maker's role.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomField"
            }
          },
          "created_at": {
            "description": "When it was made.",
            "type": "string"
          },
          "updated_at": {
            "description": "When it last changed.",
            "type": "string"
          }
        }
      },
      "CustomRecord": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Its id.",
            "type": "string"
          },
          "object": {
            "description": "What it is.",
            "type": "string"
          },
          "type": {
            "description": "The kind's key.",
            "type": "string"
          },
          "name": {
            "description": "Its name: 1 to 200 characters on one line.",
            "type": "string"
          },
          "owner_id": {
            "description": "A member of this organization, or null (nobody).",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "A whole number the database moves on every change of the record: send it back as If-Match on a PATCH or a DELETE to act only on what you read. Read only.",
            "type": "integer"
          },
          "created_at": {
            "description": "When it was made.",
            "type": "string"
          },
          "updated_at": {
            "description": "When it last changed.",
            "type": "string"
          },
          "custom": {
            "description": "The kind's own fields, each by its key (cf_…, from the kind's fields): as the key's maker's role may see them.",
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CustomRecordWrite": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Its name: 1 to 200 characters on one line."
          },
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "A member of this organization, or null (nobody)."
          },
          "custom": {
            "type": "object",
            "description": "Some of the kind's own fields, each by its key (cf_…, from GET /objects/{key}), its value its type's; null clears one. A new record holds every required field.",
            "propertyNames": {
              "pattern": "^cf_[0-9a-f]{16}$"
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "example": {
          "name": "12 Elm Street",
          "custom": {
            "cf_0123456789abcdef": 3
          }
        }
      },
      "CustomRecordLink": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Its id.",
            "type": "string"
          },
          "object": {
            "description": "What it is.",
            "type": "string"
          },
          "record_id": {
            "description": "The record it links.",
            "type": "string"
          },
          "type": {
            "description": "The kind's key.",
            "type": "string"
          },
          "kind": {
            "description": "contact, company, deal or case: what it links the record to.",
            "type": "string",
            "enum": [
              "contact",
              "company",
              "deal",
              "case"
            ]
          },
          "contact_id": {
            "description": "The contact it links to, if it is a contact.",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "The company it links to, if it is a company.",
            "type": [
              "string",
              "null"
            ]
          },
          "deal_id": {
            "description": "The deal it links to, if it is a deal.",
            "type": [
              "string",
              "null"
            ]
          },
          "case_id": {
            "description": "The case it links to, if it is a case.",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "What the record is to the other one (\"Tenant\"), up to 60 characters; or null.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "When it was made.",
            "type": "string"
          }
        }
      },
      "CustomRecordLinkWrite": {
        "type": "object",
        "additionalProperties": false,
        "description": "Exactly one of contact_id, company_id, deal_id and case_id: a record of this organization the key's maker reaches.",
        "properties": {
          "contact_id": {
            "type": "string",
            "format": "uuid",
            "description": "The contact it links to, if it is a contact."
          },
          "company_id": {
            "type": "string",
            "format": "uuid",
            "description": "The company it links to, if it is a company."
          },
          "deal_id": {
            "type": "string",
            "format": "uuid",
            "description": "The deal it links to, if it is a deal."
          },
          "case_id": {
            "type": "string",
            "format": "uuid",
            "description": "The case it links to, if it is a case."
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 60,
            "description": "What the record is to the other one (\"Tenant\"), up to 60 characters; or null."
          }
        },
        "example": {
          "contact_id": "7a0d7c4e-2b7e-4a51-9e0a-6d3c1b2a9f10",
          "role": "Tenant"
        }
      },
      "RelationshipType": {
        "type": "object",
        "properties": {
          "object": {
            "const": "relationship_type"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Its name read from the \"from\" side (a project's \"Contacts\")."
          },
          "inverse_name": {
            "type": "string",
            "description": "Its name read from the \"to\" side (a contact's \"Projects\")."
          },
          "from_kind": {
            "type": "string",
            "enum": [
              "contacts",
              "companies",
              "deals",
              "cases",
              "custom_records"
            ]
          },
          "from_object_type": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "to_kind": {
            "type": "string",
            "enum": [
              "contacts",
              "companies",
              "deals",
              "cases",
              "custom_records"
            ]
          },
          "to_object_type": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "cardinality": {
            "type": "string",
            "enum": [
              "one_to_many",
              "many_to_many"
            ],
            "description": "one_to_many: each \"to\" record has at most one \"from\" record of this type."
          },
          "on_delete": {
            "type": "string",
            "enum": [
              "clear",
              "block",
              "cascade"
            ],
            "description": "What deleting the \"from\" record does: its links go with it, it is refused while they exist, or the linked records go to Trash with it."
          },
          "attributes": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The attributes a link carries: {key, label, type, options}."
          },
          "archived": {
            "type": "boolean",
            "description": "An archived type keeps its links and takes no new one."
          }
        }
      },
      "RelationshipLink": {
        "type": "object",
        "properties": {
          "object": {
            "const": "relationship_link"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type_id": {
            "type": "string",
            "format": "uuid"
          },
          "from_id": {
            "type": "string",
            "format": "uuid"
          },
          "to_id": {
            "type": "string",
            "format": "uuid"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Its id."
          },
          "object": {
            "type": [
              "string",
              "null"
            ],
            "description": "What it is: task."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "What is to be done: 1 to 200 characters."
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "call, meeting, email or todo (todo when made without one)."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "open or done."
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ],
            "description": "The day it is due, as 2026-11-04."
          },
          "due_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "The time it is due, as 14:30, or null."
          },
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member it is for (the key's maker when made without one)."
          },
          "contact_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The contact it is on, if any."
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company it is on, if any."
          },
          "deal_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The deal it is on, if any."
          },
          "case_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The case it is on, if any."
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it was marked done — read only."
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member who made it — read only."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it was made."
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it last changed."
          }
        }
      },
      "TaskWrite": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "What is to be done: 1 to 200 characters."
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ],
            "description": "The day it is due, as 2026-11-04."
          },
          "due_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "The time it is due, as 14:30, or null."
          },
          "kind": {
            "type": "string",
            "enum": [
              "call",
              "meeting",
              "email",
              "todo"
            ],
            "description": "call, meeting, email or todo (todo when made without one)."
          },
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member it is for (the key's maker when made without one)."
          },
          "contact_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The contact it is on, if any."
          },
          "company_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The company it is on, if any."
          },
          "deal_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The deal it is on, if any."
          },
          "case_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The case it is on, if any."
          }
        },
        "required": [
          "title",
          "due_on"
        ],
        "additionalProperties": false,
        "description": "On exactly one of contact_id, company_id, deal_id or case_id.",
        "example": {
          "title": "Call about the renewal",
          "due_on": "2026-11-04",
          "contact_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301"
        }
      },
      "TaskChange": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "What is to be done: 1 to 200 characters."
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ],
            "description": "The day it is due, as 2026-11-04."
          },
          "due_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "The time it is due, as 14:30, or null."
          },
          "kind": {
            "type": "string",
            "enum": [
              "call",
              "meeting",
              "email",
              "todo"
            ],
            "description": "call, meeting, email or todo (todo when made without one)."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "done"
            ],
            "description": "open or done."
          },
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member it is for (the key's maker when made without one)."
          }
        },
        "additionalProperties": false,
        "example": {
          "status": "done"
        }
      },
      "Event": {
        "type": "object",
        "required": [
          "id",
          "type",
          "api_version",
          "created_at",
          "organization_id",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The event's id: the same on a delivery sent again."
          },
          "api_version": {
            "type": "string",
            "enum": [
              "2026-11-01"
            ],
            "description": "The payload's version, also in the ContactRoll-Webhook-Version header."
          },
          "type": {
            "type": "string",
            "description": "The event's name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "The record as the API answers it, or its id."
          }
        }
      }
    }
  }
}
