{
  "openapi": "3.1.0",
  "info": {
    "title": "Metal API",
    "version": "1.0.0",
    "description": "REST API for Metal, the AI context layer for financial firms. Manage companies, deals, people, documents, activities, enrichments, scores, screenings, lists, workflows, and more. All endpoints are versioned under /v1, return JSON, and are scoped to the organization that owns your API key.",
    "contact": {
      "name": "Metal Support",
      "email": "support@metal.ai",
      "url": "https://www.metal.ai"
    }
  },
  "servers": [
    {
      "url": "https://api.metal.ai",
      "description": "Production"
    }
  ],
  "security": [
    {
      "MetalClientId": [],
      "MetalApiKey": []
    }
  ],
  "tags": [
    { "name": "API keys", "description": "Check which API key a request is using." },
    { "name": "Companies", "description": "Manage and enrich companies." },
    { "name": "Deals", "description": "Track opportunities through your pipeline." },
    { "name": "People", "description": "Manage contacts and relationships." },
    { "name": "Documents", "description": "Search and retrieve ingested documents." },
    { "name": "Activities", "description": "Log and search meetings, calls, and other interactions." },
    { "name": "Enrichments", "description": "Read and write enriched property values on resources." },
    { "name": "Scores", "description": "Score companies and deals against scoring frameworks." },
    { "name": "Screenings", "description": "Run and manage AI-powered company screenings." },
    { "name": "Lists", "description": "Organize and enrich resources in bulk." },
    { "name": "Tags", "description": "Label companies, deals, and lists." },
    { "name": "Industries", "description": "Manage your organization's industry taxonomy." },
    { "name": "Sectors", "description": "Manage sectors within an industry." },
    { "name": "Subsectors", "description": "Manage subsectors within a sector." },
    { "name": "Workflows", "description": "Run and monitor AI workflows." },
    { "name": "Data", "description": "Query time-series metrics and observations." },
    { "name": "Teams", "description": "Manage deal teams and their members." },
    { "name": "Workspaces", "description": "Organize documents and data by workspace." },
    { "name": "Inference", "description": "Run single LLM completions scoped to your organization." }
  ],
  "paths": {
    "/v1/companies": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "List companies",
        "description": "Returns companies in your organization, newest first. Supports pagination and sorting. Top-level `website` and `linkedinUrl` use the resolved observation value when available, with the native company field as a fallback.",
        "operationId": "listCompanies",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Lt"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Direction"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of companies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Company"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Create a company",
        "description": "Creates a company. Only `canonicalName` is required.",
        "operationId": "createCompany",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/CompanyResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/companies/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CompanyId"
        }
      ],
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company",
        "description": "Retrieves a single company by id.",
        "operationId": "getCompany",
        "responses": {
          "200": {
            "$ref": "#/components/responses/CompanyResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Update a company",
        "description": "Updates an existing company. Provide the fields you want to change.",
        "operationId": "updateCompany",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CompanyResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Companies"
        ],
        "summary": "Delete a company",
        "description": "Deletes a company by id.",
        "operationId": "deleteCompany",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/companies/search": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Search companies",
        "description": "Returns companies ranked by relevance to a query.",
        "operationId": "searchCompanies",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchLimit400"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked company results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Company"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/PaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/companies/{id}/enrich": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Enrich a company",
        "description": "Triggers asynchronous enrichment for a company. Metal gathers candidate values from your documents, providers, and the web, then ranks them into one value per attribute. Poll the company and inspect its `enrichment` field for values and citations.",
        "operationId": "enrichCompany",
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Enrichment was accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The company id."
                        },
                        "status": {
                          "type": "string",
                          "description": "Enrichment status, e.g. \"started\"."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/deals": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List deals",
        "description": "Returns deals in your organization, newest first.",
        "operationId": "listDeals",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Lt"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Direction"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of deals.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deal"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Create a deal",
        "description": "Creates a deal. Provide a `name` and, typically, the target `companyId`.",
        "operationId": "createDeal",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/DealResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/deals/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/DealId"
        }
      ],
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get a deal",
        "description": "Retrieves a single deal by id.",
        "operationId": "getDeal",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DealResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Deals"
        ],
        "summary": "Update a deal",
        "description": "Updates an existing deal.",
        "operationId": "updateDeal",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/DealResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Deals"
        ],
        "summary": "Delete a deal",
        "description": "Deletes a deal by id.",
        "operationId": "deleteDeal",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/deals/search": {
      "post": {
        "tags": [
          "Deals"
        ],
        "summary": "Search deals",
        "description": "Returns deals ranked by relevance to a query.",
        "operationId": "searchDeals",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchLimit400Clamped"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked deal results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deal"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/PaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/people": {
      "get": {
        "tags": [
          "People"
        ],
        "summary": "List people",
        "description": "Returns people in your organization, newest first.",
        "operationId": "listPeople",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Lt"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/Direction"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of people.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Person"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Create a person",
        "description": "Creates a person. Provide at least a name; link to a company with `company`.\n\n**Email matching.** If the request includes an email, Metal checks it against the `email` and personal email of the contacts Metal can match — people created in Metal or synced from a connected CRM — before creating anything. The comparison ignores case.\n\n- **One eligible match:** Metal creates no new person. The response returns the existing person with `reused: true`. Metal may fill empty fields on that person, such as `currentTitle` or `linkedinUrl`, with values from your request. Fields that already have values are not overwritten. A person synced from your CRM is returned unchanged.\n- **Several matches:** If more than one match is eligible, Metal creates the new person but holds it for duplicate review. A held person is not written to your CRM until that review is resolved.\n- **No match, or only ineligible matches:** Metal creates the person as usual.\n\nAn existing person with the same external reference always takes precedence over an email match.\n\nThe response status is `201` in every case. `reused: true` means the request matched an existing person by email and Metal returned that person. A create that matches an existing external reference also returns that person, with `reused` omitted, so an absent `reused` does not prove a new person was created.",
        "operationId": "createPerson",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/PersonCreatedResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/people/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PersonId"
        }
      ],
      "get": {
        "tags": [
          "People"
        ],
        "summary": "Get a person",
        "description": "Retrieves a single person by id.",
        "operationId": "getPerson",
        "responses": {
          "200": {
            "$ref": "#/components/responses/PersonResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "People"
        ],
        "summary": "Update a person",
        "description": "Updates an existing person.",
        "operationId": "updatePerson",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PersonUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PersonResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "People"
        ],
        "summary": "Delete a person",
        "description": "Deletes a person by id.",
        "operationId": "deletePerson",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/people/search": {
      "post": {
        "tags": [
          "People"
        ],
        "summary": "Search people",
        "description": "Returns people ranked by relevance to a query.",
        "operationId": "searchPeople",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchLimit400"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked people results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Person"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/PaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/documents/search": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Search documents",
        "description": "Searches across the content of documents ingested into Metal, ranked by relevance.",
        "operationId": "searchDocuments",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchLimit400"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked document results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Document"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/PaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/lists": {
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "List lists",
        "description": "Returns the lists in your organization that you can access. Use `filter` to narrow results to lists you own, lists shared with you, or firmwide lists, and `q` to search by name. The response does not include a total count. Keep requesting pages until `metadata.hasMore` is `false`. `page` is capped at 100; to iterate further, use the `lt` cursor.",
        "operationId": "listLists",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Lt"
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Restrict results to one group of lists. `my-lists` returns lists you own. `shared-with-me` returns lists shared directly with you. `firmwide` returns lists that are not private. Any other non-empty value returns `400`.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "my-lists",
                "shared-with-me",
                "firmwide"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive substring match on the list name. Combines with `filter` when both are set.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of lists.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/List"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/ListPaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Create a list",
        "description": "Creates a new list.",
        "operationId": "createList",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The list's display name."
                  },
                  "resourceType": {
                    "type": "string",
                    "description": "The type of resource the list holds, e.g. \"company\".",
                    "example": "company"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/ListResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/lists/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ListId"
        }
      ],
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "Get a list",
        "description": "Retrieves a single list by id, including its column configuration.",
        "operationId": "getList",
        "responses": {
          "200": {
            "$ref": "#/components/responses/ListResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Lists"
        ],
        "summary": "Update a list",
        "description": "Updates a list's metadata.",
        "operationId": "updateList",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The list's display name."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ListResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "summary": "Delete a list",
        "description": "Deletes a list by id.",
        "operationId": "deleteList",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/lists/{id}/entries": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ListId"
        }
      ],
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "List entries",
        "description": "Returns the entries (rows) in a list.",
        "operationId": "listListEntries",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of entries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Add an entry",
        "description": "Adds a resource to a list as a new entry.",
        "operationId": "createListEntry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resourceId": {
                    "type": "string",
                    "description": "The id of the resource to add (for example, a company id)."
                  },
                  "resourceType": {
                    "type": "string",
                    "description": "The type of the resource, e.g. \"company\".",
                    "example": "company"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created entry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListEntry"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/workflows": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "List workflows",
        "description": "Returns the workflows in your organization.",
        "operationId": "listWorkflows",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of workflows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workflow"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Workflows"
        ],
        "summary": "Create a workflow",
        "description": "Creates a new workflow definition.",
        "operationId": "createWorkflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The workflow's display name."
                  },
                  "description": {
                    "type": "string",
                    "description": "A description of what the workflow does."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/WorkflowResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/workflows/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/WorkflowId"
        }
      ],
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "Get a workflow",
        "description": "Retrieves a single workflow definition by id.",
        "operationId": "getWorkflow",
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Workflows"
        ],
        "summary": "Update a workflow",
        "description": "Updates a workflow definition.",
        "operationId": "updateWorkflow",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WorkflowResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Workflows"
        ],
        "summary": "Delete a workflow",
        "description": "Deletes a workflow by id.",
        "operationId": "deleteWorkflow",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/workflows/{id}/runs": {
      "parameters": [
        {
          "$ref": "#/components/parameters/WorkflowId"
        }
      ],
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "List workflow runs",
        "description": "Returns runs for a workflow, newest first.",
        "operationId": "listWorkflowRuns",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of workflow runs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowRun"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "Workflows"
        ],
        "summary": "Trigger a workflow run",
        "description": "Starts a new run of the workflow with the provided input. Runs are asynchronous; poll the run to track completion.",
        "operationId": "createWorkflowRun",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "The input payload the workflow expects."
                  },
                  "dryRun": {
                    "type": "boolean",
                    "default": false,
                    "description": "When true, the run validates gated tool calls (write and destructive tools) against their input schema instead of executing them. Read-only tools still run so the agent can gather context, and permission prompts are skipped."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created run.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/workflow-runs/{id}": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "Get a workflow run",
        "description": "Retrieves a single workflow run by id, including its status and output.",
        "operationId": "getWorkflowRun",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The workflow run id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The workflow run.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "tags": [
          "Workflows"
        ],
        "summary": "Update a workflow run",
        "description": "Partially updates a workflow run. Use this endpoint to rename a run by setting `title` (1–120 characters). You must be able to open the run.",
        "operationId": "updateWorkflowRun",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowRunId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowRunUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated run.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/keys/current": {
      "get": {
        "tags": [
          "API keys"
        ],
        "summary": "Get current API key",
        "description": "Returns metadata for the API key used to authenticate this request.",
        "operationId": "getCurrentKey",
        "responses": {
          "200": {
            "description": "The current API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ApiKey"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/companies/ids={ids}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get companies by ids",
        "description": "Retrieves up to 300 companies in a single request. Pass the optional `fields` query parameter to hydrate only the listed enrichment observations. Top-level `website` and `linkedinUrl` use the resolved observation value when available, with the native company field as a fallback. Omit `fields` to hydrate all available observations. For a compact MCP projection of selected fields, use `get_companies`.",
        "operationId": "getCompaniesByIds",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdsPath"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated enrichment observation keys to hydrate. Use exact public field names such as `website`, `linkedinUrl`, and `sector`.",
            "schema": {
              "type": "string"
            },
            "example": "website,linkedinUrl,sector"
          }
        ],
        "responses": {
          "200": {
            "description": "The matching companies.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Company"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/v1/companies/externalId={externalId}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company by external id",
        "description": "Retrieves a company using your own external identifier.",
        "operationId": "getCompanyByExternalId",
        "parameters": [
          {
            "$ref": "#/components/parameters/ExternalIdPath"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CompanyResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/companies/externalReference={ref}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get a company by external reference",
        "description": "Retrieves a company by its external source reference.",
        "operationId": "getCompanyByExternalReference",
        "parameters": [
          {
            "$ref": "#/components/parameters/ExternalReferencePath"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CompanyResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/companies/{id}/financial-metrics": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "List company financial metrics",
        "description": "Returns financial metrics extracted for a company.",
        "operationId": "listCompanyFinancialMetrics",
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          }
        ],
        "responses": {
          "200": {
            "description": "Financial metrics for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinancialMetric"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/companies/email-touchpoints/aggregate": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Aggregate company email touchpoints",
        "description": "Returns outbound and inbound Exchange email counts, plus the latest outbound and inbound dates, for up to 100 companies over a date range of up to 365 days. Both `start` and `end` are floored to UTC midnight, and the interval is half-open: `start` is inclusive and `end` is exclusive. Results are aggregate numbers only and are scoped to your organization, so they include emails the caller can't open individually. No subjects, bodies, or addresses are returned. Results are cached and can be up to about an hour old. **Outbound** and **inbound** are directional email touchpoints as defined for [company email touchpoints](/help/integrations/exchange#company-email-touchpoints); an inbound count is not a confirmed reply.",
        "operationId": "aggregateCompanyEmailTouchpoints",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyEmailTouchpointsRequest"
              },
              "example": {
                "companyIds": [
                  "665f1c2a9b1e4a0012a3b4c5"
                ],
                "start": "2026-01-01T00:00:00Z",
                "end": "2026-04-01T00:00:00Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email touchpoint counts for each requested company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyEmailTouchpointsResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/deals/ids={ids}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get deals by ids",
        "description": "Retrieves multiple deals in a single request.",
        "operationId": "getDealsByIds",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdsPath"
          }
        ],
        "responses": {
          "200": {
            "description": "The matching deals.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deal"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/deals/externalId={externalId}": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "Get a deal by external id",
        "description": "Retrieves a deal using your own external identifier.",
        "operationId": "getDealByExternalId",
        "parameters": [
          {
            "$ref": "#/components/parameters/ExternalIdPath"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DealResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/companies/{id}/deals": {
      "get": {
        "tags": [
          "Deals"
        ],
        "summary": "List deals for a company",
        "description": "Returns deals associated with a company.",
        "operationId": "listCompanyDeals",
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "Deals for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deal"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/people/ids={ids}": {
      "get": {
        "tags": [
          "People"
        ],
        "summary": "Get people by ids",
        "description": "Retrieves multiple people in a single request.",
        "operationId": "getPeopleByIds",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdsPath"
          }
        ],
        "responses": {
          "200": {
            "description": "The matching people.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Person"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/people/externalReference={ref}": {
      "get": {
        "tags": [
          "People"
        ],
        "summary": "Get a person by external reference",
        "description": "Retrieves a person by their external source reference.",
        "operationId": "getPersonByExternalReference",
        "parameters": [
          {
            "$ref": "#/components/parameters/ExternalReferencePath"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PersonResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/companies/{id}/people": {
      "get": {
        "tags": [
          "People"
        ],
        "summary": "List people for a company",
        "description": "Returns people linked to a company.",
        "operationId": "listCompanyPeople",
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "People linked to the company.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Person"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/documents/ids={ids}": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get documents by ids",
        "description": "Retrieves multiple documents in a single request.",
        "operationId": "getDocumentsByIds",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdsPath"
          }
        ],
        "responses": {
          "200": {
            "description": "The matching documents.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Document"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/lists/{id}/entries/bulk-tags": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ListId"
        }
      ],
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Add or remove tags in bulk",
        "description": "Adds or removes tags on many list entries in one request. Metal applies the change per entry and to every tags column on the list. On lists with write-back enabled, the tags are also written to the underlying records when that record type supports tag write-back: funds, limited partners, and fundraising processes.",
        "operationId": "bulkTagListEntries",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkTagRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result for each entry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BulkTagResponse"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "You do not have access to the list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "error": "forbidden"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/lists/{id}/entries/{entryId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ListId"
        },
        {
          "$ref": "#/components/parameters/EntryId"
        }
      ],
      "get": {
        "tags": [
          "Lists"
        ],
        "summary": "Get a list entry",
        "description": "Retrieves a single entry from a list.",
        "operationId": "getListEntry",
        "responses": {
          "200": {
            "description": "Retrieves a single entry from a list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListEntry"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Lists"
        ],
        "summary": "Update a list entry",
        "description": "Updates an entry in a list.",
        "operationId": "updateListEntry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListEntryUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an entry in a list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ListEntry"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Lists"
        ],
        "summary": "Delete a list entry",
        "description": "Removes an entry from a list.",
        "operationId": "deleteListEntry",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/lists/{id}/enrich": {
      "post": {
        "tags": [
          "Lists"
        ],
        "summary": "Enrich a list",
        "description": "Triggers enrichment for all entries in a list.",
        "operationId": "enrichList",
        "parameters": [
          {
            "$ref": "#/components/parameters/ListId"
          }
        ],
        "responses": {
          "200": {
            "description": "Enrichment was accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/workflow-runs": {
      "get": {
        "tags": [
          "Workflows"
        ],
        "summary": "List all workflow runs",
        "description": "Returns workflow runs across your organization, newest first.",
        "operationId": "listAllWorkflowRuns",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of all workflow runs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowRun"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/workflow-runs/{id}/cancel": {
      "post": {
        "tags": [
          "Workflows"
        ],
        "summary": "Cancel a workflow run",
        "description": "Cancels a running or queued workflow run.",
        "operationId": "cancelWorkflowRun",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowRunId"
          }
        ],
        "responses": {
          "200": {
            "description": "The run was cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/workflow-runs/{id}/retry": {
      "post": {
        "tags": [
          "Workflows"
        ],
        "summary": "Retry a workflow run",
        "description": "Retries a failed workflow run. The retry inherits the source run's `dryRun` setting, so retrying a dry run produces another dry run.",
        "operationId": "retryWorkflowRun",
        "parameters": [
          {
            "$ref": "#/components/parameters/WorkflowRunId"
          }
        ],
        "responses": {
          "200": {
            "description": "The retry was accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/activities": {
      "get": {
        "tags": [
          "Activity"
        ],
        "summary": "List activities",
        "description": "Returns activities in your organization.",
        "operationId": "listActivities",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of activities.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Activity"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Activity"
        ],
        "summary": "Create an activity",
        "description": "Creates a new activity.",
        "operationId": "createActivity",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivityCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new activity.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Activity"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/activities/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ActivityId"
        }
      ],
      "get": {
        "tags": [
          "Activity"
        ],
        "summary": "Get an activity",
        "description": "Retrieves a single activity by id.",
        "operationId": "getActivity",
        "responses": {
          "200": {
            "description": "Retrieves a single activity by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Activity"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Activity"
        ],
        "summary": "Update an activity",
        "description": "Updates an existing activity. To add or remove `participants` or `relatedResources` entries without replacing the whole list, pass an object with `addToSet` or `pull` instead of an array. Activities created from mailbox ingestion reject `participants` and `relatedResources` edits with 400, because mailbox ingestion maintains those links.",
        "operationId": "updateActivity",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActivityUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing activity.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Activity"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Activity"
        ],
        "summary": "Delete an activity",
        "description": "Deletes an activity by id.",
        "operationId": "deleteActivity",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/activities/search": {
      "post": {
        "tags": [
          "Activities"
        ],
        "summary": "Search activities",
        "description": "Returns activities ranked by relevance to a query.",
        "operationId": "searchActivities",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchLimit400Clamped"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked activities results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Activity"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/PaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/companies/{id}/activities": {
      "get": {
        "tags": [
          "Activities"
        ],
        "summary": "List activities for a company",
        "description": "Returns activities linked to a company.",
        "operationId": "listCompanyActivities",
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "Activities for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Activity"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/people/{id}/activities": {
      "get": {
        "tags": [
          "Activities"
        ],
        "summary": "List activities for a person",
        "description": "Returns activities linked to a person, newest first. An activity is included when the person is a participant or a related resource. Results are scoped to your organization and limited to activities your API key can access. Exchange calendar bookkeeping (invites, attendee responses, and cancellations) is excluded. When the person has no matching activities, `data` is `null`.",
        "operationId": "listPersonActivities",
        "parameters": [
          {
            "$ref": "#/components/parameters/PersonId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/ActivityFeedLimit"
          },
          {
            "name": "startedBefore",
            "in": "query",
            "required": false,
            "description": "Only return activities that started before this RFC3339 timestamp, for example `2026-10-01T00:00:00Z`. Pass the current time to keep future-dated meetings out of a most-recent view.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Activities for the person.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "description": "Activities linked to the person, or `null` when there are none.",
                      "items": {
                        "$ref": "#/components/schemas/Activity"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/enrichments": {
      "post": {
        "tags": [
          "Enrichments"
        ],
        "summary": "Create an enrichment",
        "description": "Records an enriched property value on a resource.",
        "operationId": "createEnrichment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrichmentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Records an enriched property value on a resource.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Enrichment"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/enrichments/resources/{resourceType}/{resourceId}": {
      "get": {
        "tags": [
          "Enrichments"
        ],
        "summary": "List enrichments for a resource",
        "description": "Returns all enrichment values for a resource.",
        "operationId": "listResourceEnrichments",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResourceType"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          }
        ],
        "responses": {
          "200": {
            "description": "Enrichment values for the resource.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Enrichment"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/enrichments/resources/{resourceType}/{resourceId}/{property}": {
      "get": {
        "tags": [
          "Enrichments"
        ],
        "summary": "Get enrichment for a property",
        "description": "Returns the top enrichment value for a specific property on a resource.",
        "operationId": "getResourceEnrichmentProperty",
        "parameters": [
          {
            "$ref": "#/components/parameters/ResourceType"
          },
          {
            "$ref": "#/components/parameters/ResourceId"
          },
          {
            "$ref": "#/components/parameters/PropertyName"
          }
        ],
        "responses": {
          "200": {
            "description": "The enrichment value.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Enrichment"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/enrichments/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EnrichmentId"
        }
      ],
      "delete": {
        "tags": [
          "Enrichments"
        ],
        "summary": "Delete an enrichment",
        "description": "Deletes an enrichment value by id.",
        "operationId": "deleteEnrichment",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/scores": {
      "get": {
        "tags": [
          "Scores"
        ],
        "summary": "List scores",
        "description": "Returns scores in your organization.",
        "operationId": "listScores",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of scores.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Score"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Scores"
        ],
        "summary": "Create a score",
        "description": "Records a score against a scoring framework.",
        "operationId": "createScore",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoreCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Records a score against a scoring framework.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Score"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/scores/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScoreId"
        }
      ],
      "get": {
        "tags": [
          "Scores"
        ],
        "summary": "Get a score",
        "description": "Retrieves a single score by id.",
        "operationId": "getScore",
        "responses": {
          "200": {
            "description": "Retrieves a single score by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Score"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Scores"
        ],
        "summary": "Delete a score",
        "description": "Deletes a score by id.",
        "operationId": "deleteScore",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/companies/{id}/scores": {
      "get": {
        "tags": [
          "Scores"
        ],
        "summary": "List scores for a company",
        "description": "Returns scores associated with a company.",
        "operationId": "listCompanyScores",
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "Scores for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Score"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/scoring-frameworks": {
      "get": {
        "tags": [
          "Scores"
        ],
        "summary": "List scoring frameworks",
        "description": "Returns scoring frameworks in your organization.",
        "operationId": "listScoringFrameworks",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of scoring frameworks.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ScoringFramework"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/scoring-frameworks/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScoringFrameworkId"
        }
      ],
      "get": {
        "tags": [
          "Scores"
        ],
        "summary": "Get a scoring framework",
        "description": "Retrieves a scoring framework by id.",
        "operationId": "getScoringFramework",
        "responses": {
          "200": {
            "description": "Retrieves a scoring framework by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ScoringFramework"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/screenings": {
      "get": {
        "tags": [
          "Screening"
        ],
        "summary": "List screenings",
        "description": "Returns screenings in your organization.",
        "operationId": "listScreenings",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of screenings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Screening"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Screening"
        ],
        "summary": "Create a screening",
        "description": "Creates a new screening.",
        "operationId": "createScreening",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScreeningCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new screening.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Screening"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/screenings/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScreeningId"
        }
      ],
      "get": {
        "tags": [
          "Screening"
        ],
        "summary": "Get a screening",
        "description": "Retrieves a single screening by id.",
        "operationId": "getScreening",
        "responses": {
          "200": {
            "description": "Retrieves a single screening by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Screening"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Screening"
        ],
        "summary": "Update a screening",
        "description": "Updates an existing screening.",
        "operationId": "updateScreening",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScreeningUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing screening.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Screening"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Screening"
        ],
        "summary": "Delete a screening",
        "description": "Deletes a screening by id.",
        "operationId": "deleteScreening",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/screenings/search": {
      "post": {
        "tags": [
          "Screenings"
        ],
        "summary": "Search screenings",
        "description": "Returns screenings ranked by relevance to a query.",
        "operationId": "searchScreenings",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchLimit20Default"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked screenings results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Screening"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/PaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/companies/{id}/screenings": {
      "get": {
        "tags": [
          "Screenings"
        ],
        "summary": "List screenings for a company",
        "description": "Returns screenings associated with a company.",
        "operationId": "listCompanyScreenings",
        "parameters": [
          {
            "$ref": "#/components/parameters/CompanyId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "Screenings for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Screening"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/deals/{id}/screenings": {
      "get": {
        "tags": [
          "Screenings"
        ],
        "summary": "List screenings for a deal",
        "description": "Returns screenings associated with a deal.",
        "operationId": "listDealScreenings",
        "parameters": [
          {
            "$ref": "#/components/parameters/DealId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "Screenings for the deal.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Screening"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/tags": {
      "get": {
        "tags": [
          "Tag"
        ],
        "summary": "List tags",
        "description": "Returns tags in your organization.",
        "operationId": "listTags",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of tags.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tag"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Tag"
        ],
        "summary": "Create a tag",
        "description": "Creates a new tag.",
        "operationId": "createTag",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new tag.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Tag"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/tags/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TagId"
        }
      ],
      "get": {
        "tags": [
          "Tag"
        ],
        "summary": "Get a tag",
        "description": "Retrieves a single tag by id.",
        "operationId": "getTag",
        "responses": {
          "200": {
            "description": "Retrieves a single tag by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Tag"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Tag"
        ],
        "summary": "Update a tag",
        "description": "Updates an existing tag.",
        "operationId": "updateTag",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing tag.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Tag"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Tag"
        ],
        "summary": "Delete a tag",
        "description": "Deletes a tag by id.",
        "operationId": "deleteTag",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/teams": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "List teams",
        "description": "Returns teams in your organization.",
        "operationId": "listTeams",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of teams.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Team"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Team"
        ],
        "summary": "Create a team",
        "description": "Creates a new team.",
        "operationId": "createTeam",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new team.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/teams/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TeamId"
        }
      ],
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get a team",
        "description": "Retrieves a single team by id.",
        "operationId": "getTeam",
        "responses": {
          "200": {
            "description": "Retrieves a single team by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Team"
        ],
        "summary": "Update a team",
        "description": "Updates an existing team.",
        "operationId": "updateTeam",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing team.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Team"
        ],
        "summary": "Delete a team",
        "description": "Deletes a team by id.",
        "operationId": "deleteTeam",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/teams/{id}/members": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "List team members",
        "description": "Returns users who are members of a team.",
        "operationId": "listTeamMembers",
        "parameters": [
          {
            "$ref": "#/components/parameters/TeamId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "Members of the team.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/workspaces": {
      "get": {
        "tags": [
          "Workspace"
        ],
        "summary": "List workspaces",
        "description": "Returns workspaces in your organization.",
        "operationId": "listWorkspaces",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workspace"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Workspace"
        ],
        "summary": "Create a workspace",
        "description": "Creates a new workspace.",
        "operationId": "createWorkspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workspace"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/workspaces/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/WorkspaceId"
        }
      ],
      "get": {
        "tags": [
          "Workspace"
        ],
        "summary": "Get a workspace",
        "description": "Retrieves a single workspace by id.",
        "operationId": "getWorkspace",
        "responses": {
          "200": {
            "description": "Retrieves a single workspace by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workspace"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Workspace"
        ],
        "summary": "Update a workspace",
        "description": "Updates an existing workspace.",
        "operationId": "updateWorkspace",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workspace"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Workspace"
        ],
        "summary": "Delete a workspace",
        "description": "Deletes a workspace by id.",
        "operationId": "deleteWorkspace",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/workspaces/search": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Search workspaces",
        "description": "Returns workspaces ranked by relevance to a query.",
        "operationId": "searchWorkspaces",
        "parameters": [
          {
            "$ref": "#/components/parameters/SearchPage"
          },
          {
            "$ref": "#/components/parameters/SearchLimit400"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked workspaces results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Workspace"
                      }
                    },
                    "metadata": {
                      "$ref": "#/components/schemas/PaginationMetadata"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/industries": {
      "get": {
        "tags": [
          "Industry"
        ],
        "summary": "List industries",
        "description": "Returns industries in your organization.",
        "operationId": "listIndustrys",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of industries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Industry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Industry"
        ],
        "summary": "Create an industry",
        "description": "Creates a new industry.",
        "operationId": "createIndustry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndustryCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new industry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Industry"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/industries/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/IndustryId"
        }
      ],
      "get": {
        "tags": [
          "Industry"
        ],
        "summary": "Get an industry",
        "description": "Retrieves a single industry by id.",
        "operationId": "getIndustry",
        "responses": {
          "200": {
            "description": "Retrieves a single industry by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Industry"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Industry"
        ],
        "summary": "Update an industry",
        "description": "Updates an existing industry.",
        "operationId": "updateIndustry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IndustryUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing industry.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Industry"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Industry"
        ],
        "summary": "Delete an industry",
        "description": "Deletes an industry by id.",
        "operationId": "deleteIndustry",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/sectors": {
      "get": {
        "tags": [
          "Sector"
        ],
        "summary": "List sectors",
        "description": "Returns sectors in your organization.",
        "operationId": "listSectors",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of sectors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Sector"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Sector"
        ],
        "summary": "Create a sector",
        "description": "Creates a new sector.",
        "operationId": "createSector",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SectorCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new sector.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Sector"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/sectors/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SectorId"
        }
      ],
      "get": {
        "tags": [
          "Sector"
        ],
        "summary": "Get a sector",
        "description": "Retrieves a single sector by id.",
        "operationId": "getSector",
        "responses": {
          "200": {
            "description": "Retrieves a single sector by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Sector"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Sector"
        ],
        "summary": "Update a sector",
        "description": "Updates an existing sector.",
        "operationId": "updateSector",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SectorUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing sector.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Sector"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Sector"
        ],
        "summary": "Delete a sector",
        "description": "Deletes a sector by id.",
        "operationId": "deleteSector",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/subsectors": {
      "get": {
        "tags": [
          "Subsector"
        ],
        "summary": "List subsectors",
        "description": "Returns subsectors in your organization.",
        "operationId": "listSubsectors",
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "A list of subsectors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Subsector"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Subsector"
        ],
        "summary": "Create a subsector",
        "description": "Creates a new subsector.",
        "operationId": "createSubsector",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubsectorCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Creates a new subsector.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Subsector"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/subsectors/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SubsectorId"
        }
      ],
      "get": {
        "tags": [
          "Subsector"
        ],
        "summary": "Get a subsector",
        "description": "Retrieves a single subsector by id.",
        "operationId": "getSubsector",
        "responses": {
          "200": {
            "description": "Retrieves a single subsector by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Subsector"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Subsector"
        ],
        "summary": "Update a subsector",
        "description": "Updates an existing subsector.",
        "operationId": "updateSubsector",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubsectorUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updates an existing subsector.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Subsector"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Subsector"
        ],
        "summary": "Delete a subsector",
        "description": "Deletes a subsector by id.",
        "operationId": "deleteSubsector",
        "responses": {
          "200": {
            "$ref": "#/components/responses/DeletedResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/data/series": {
      "get": {
        "tags": [
          "Data"
        ],
        "summary": "Get a metric series",
        "description": "Returns a time series of metric observations for a resource and key.",
        "operationId": "getDataSeries",
        "parameters": [
          {
            "$ref": "#/components/parameters/DataResource"
          },
          {
            "$ref": "#/components/parameters/DataKey"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "The metric series.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DataSeries"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/data/observations": {
      "get": {
        "tags": [
          "Data"
        ],
        "summary": "Get an observation",
        "description": "Resolves the best observation value for a resource and key.",
        "operationId": "getObservation",
        "parameters": [
          {
            "$ref": "#/components/parameters/DataResource"
          },
          {
            "$ref": "#/components/parameters/DataKey"
          }
        ],
        "responses": {
          "200": {
            "description": "The resolved observation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Observation"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/v1/data/metrics": {
      "get": {
        "tags": [
          "Data"
        ],
        "summary": "List available metrics",
        "description": "Returns the metric keys available for a resource.",
        "operationId": "listDataMetrics",
        "parameters": [
          {
            "$ref": "#/components/parameters/DataResource"
          }
        ],
        "responses": {
          "200": {
            "description": "Available metric keys.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/data/metric-series": {
      "post": {
        "tags": [
          "Data"
        ],
        "summary": "Query a metric series",
        "description": "Returns a metric time series with advanced period and candidate filters.",
        "operationId": "queryMetricSeries",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetricSeriesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The metric series.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DataSeries"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/data/observations/batch": {
      "post": {
        "tags": [
          "Data"
        ],
        "summary": "Batch resolve observations",
        "description": "Resolves up to 32 observations in a single request.",
        "operationId": "batchResolveObservations",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ObservationBatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resolved observations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Observation"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/inference": {
      "post": {
        "tags": [
          "Inference"
        ],
        "summary": "Run an LLM completion",
        "description": "Runs a single LLM completion: one prompt in, one text (or schema-constrained JSON) result out. No tools and no agent loop. The completion runs under your API key's organization and its rate limits.\n\nAccepted requests respond with `200 text/event-stream`. Each frame is a data-only `data: {json}` line. Every frame includes `operation`. `content` and `metadata` are omitted when empty. Metal sends a `HEARTBEAT` frame every 10 seconds while the completion runs, then exactly one terminal frame:\n\n- `HEARTBEAT`: `{\"operation\":\"HEARTBEAT\"}`.\n- `COMPLETE`: `content` is a JSON string containing `{\"data\":{\"text\":\"...\"}}`. `metadata` is omitted.\n- `ERROR`: `content` is the error message and `metadata.errorCode` classifies the failure: `deadline_exceeded`, `canceled`, `completion_failed`, `internal_runtime_state`, `no_choices`, or `panic`.\n\nRead the stream until the terminal frame and ignore `HEARTBEAT` frames. Validation failures that happen before the stream starts (missing `prompt`, malformed `jsonSchema`, unlisted `model`, or `timeoutSeconds` outside 0 to 180) return a plain JSON `400`. Omit `timeoutSeconds` or send `0` to use the 60-second default.",
        "operationId": "createInference",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceRequest"
              },
              "example": {
                "prompt": "Summarize this company in two sentences.",
                "systemPrompt": "You are a concise investment analyst.",
                "maxOutputTokens": 512,
                "jsonSchema": {
                  "type": "object",
                  "properties": {
                    "narrative": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "narrative"
                  ]
                },
                "timeoutSeconds": 90
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Server-sent event stream. `HEARTBEAT` frames every 10 seconds, followed by one terminal `COMPLETE` or `ERROR` frame. `content` and `metadata` are omitted when empty.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/InferenceStreamEvent"
                },
                "example": "data: {\"operation\":\"HEARTBEAT\"}\n\ndata: {\"operation\":\"COMPLETE\",\"content\":\"{\\\"data\\\":{\\\"text\\\":\\\"{\\\\\\\"narrative\\\\\\\":\\\\\\\"...\\\\\\\"}\\\"}}\"}\n\n"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "MetalClientId": {
        "type": "apiKey",
        "in": "header",
        "name": "x-metal-client-id",
        "description": "The Client ID of your API key.",
        "x-default": "<client-id>"
      },
      "MetalApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-metal-api-key",
        "description": "The secret value of your API key.",
        "x-default": "<api-key>"
      }
    },
    "parameters": {
      "Page": {
        "name": "page",
        "in": "query",
        "description": "Page number, starting at 1 (max 100).",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 1,
          "minimum": 1,
          "maximum": 100
        }
      },
      "ActivityFeedLimit": {
        "name": "limit",
        "in": "query",
        "description": "Items per page (1 to 100).",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 100,
          "minimum": 1,
          "maximum": 100
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Items per page (1 to 1000).",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 100,
          "minimum": 1,
          "maximum": 1000
        }
      },
      "SearchPage": {
        "name": "page",
        "in": "query",
        "description": "Page number, starting at 1. The deep offset `(page - 1) * limit` cannot exceed 10,000.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 1,
          "minimum": 1
        }
      },
      "SearchLimit400Clamped": {
        "name": "limit",
        "in": "query",
        "description": "Results per page. Requests above 400 are clamped to 400.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 100,
          "minimum": 1,
          "maximum": 400
        }
      },
      "SearchLimit400": {
        "name": "limit",
        "in": "query",
        "description": "Results per page. The maximum supported page size is 400.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 100,
          "minimum": 1,
          "maximum": 400
        }
      },
      "SearchLimit20Default": {
        "name": "limit",
        "in": "query",
        "description": "Results per page. The maximum supported page size is 400.",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 20,
          "minimum": 1,
          "maximum": 400
        }
      },
      "Lt": {
        "name": "lt",
        "in": "query",
        "description": "Cursor: return items whose id is less than this value (use the last id from the previous page).",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "Sort": {
        "name": "sort",
        "in": "query",
        "description": "Field to sort by. Defaults to id.",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "Direction": {
        "name": "direction",
        "in": "query",
        "description": "Sort direction.",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "desc"
        }
      },
      "CompanyId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The company id.",
        "schema": {
          "type": "string"
        }
      },
      "DealId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The deal id.",
        "schema": {
          "type": "string"
        }
      },
      "PersonId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The person id.",
        "schema": {
          "type": "string"
        }
      },
      "ListId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The list id.",
        "schema": {
          "type": "string"
        }
      },
      "WorkflowId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The workflow id.",
        "schema": {
          "type": "string"
        }
      },
      "EntryId": {
        "name": "entryId",
        "in": "path",
        "required": true,
        "description": "The list entry id.",
        "schema": {
          "type": "string"
        }
      },
      "ActivityId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The activity id.",
        "schema": {
          "type": "string"
        }
      },
      "ScreeningId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The screening id.",
        "schema": {
          "type": "string"
        }
      },
      "ScoreId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The score id.",
        "schema": {
          "type": "string"
        }
      },
      "ScoringFrameworkId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The scoring framework id.",
        "schema": {
          "type": "string"
        }
      },
      "TagId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The tag id.",
        "schema": {
          "type": "string"
        }
      },
      "TeamId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The team id.",
        "schema": {
          "type": "string"
        }
      },
      "WorkspaceId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The workspace id.",
        "schema": {
          "type": "string"
        }
      },
      "IndustryId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The industry id.",
        "schema": {
          "type": "string"
        }
      },
      "SectorId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The sector id.",
        "schema": {
          "type": "string"
        }
      },
      "SubsectorId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The subsector id.",
        "schema": {
          "type": "string"
        }
      },
      "EnrichmentId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The enrichment value id.",
        "schema": {
          "type": "string"
        }
      },
      "ResourceType": {
        "name": "resourceType",
        "in": "path",
        "required": true,
        "description": "The resource type, e.g. \"companies\".",
        "schema": {
          "type": "string"
        }
      },
      "ResourceId": {
        "name": "resourceId",
        "in": "path",
        "required": true,
        "description": "The resource id.",
        "schema": {
          "type": "string"
        }
      },
      "PropertyName": {
        "name": "property",
        "in": "path",
        "required": true,
        "description": "The enrichment property name.",
        "schema": {
          "type": "string"
        }
      },
      "WorkflowRunId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The workflow run id.",
        "schema": {
          "type": "string"
        }
      },
      "IdsPath": {
        "name": "ids",
        "in": "path",
        "required": true,
        "description": "Comma-separated resource ids.",
        "schema": {
          "type": "string"
        }
      },
      "ExternalIdPath": {
        "name": "externalId",
        "in": "path",
        "required": true,
        "description": "The external id.",
        "schema": {
          "type": "string"
        }
      },
      "ExternalReferencePath": {
        "name": "ref",
        "in": "path",
        "required": true,
        "description": "The external reference id.",
        "schema": {
          "type": "string"
        }
      },
      "DataResource": {
        "name": "resource",
        "in": "query",
        "required": true,
        "description": "Resource reference as \"type:id\", e.g. \"company:665f1c2a9b1e4a0012a3b4c5\".",
        "schema": {
          "type": "string"
        }
      },
      "DataKey": {
        "name": "key",
        "in": "query",
        "required": true,
        "description": "Property key as \"namespace:key\", e.g. \"metric:revenue\".",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key credentials.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "invalid api key or clientId"
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request body or parameters are invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Invalid request body"
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource does not exist in your organization.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "not found"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "The request could not be processed (for example, a plan limit was reached).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Key limit reached"
            }
          }
        }
      },
      "DeletedResponse": {
        "description": "The resource was deleted.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CompanyResponse": {
        "description": "A company.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            }
          }
        }
      },
      "DealResponse": {
        "description": "A deal.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/Deal"
                }
              }
            }
          }
        }
      },
      "PersonCreatedResponse": {
        "description": "The created person, or the existing person Metal returned.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/PersonCreated"
                }
              }
            }
          }
        }
      },
      "PersonResponse": {
        "description": "A person.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/Person"
                }
              }
            }
          }
        }
      },
      "ListResponse": {
        "description": "A list.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          }
        }
      },
      "WorkflowResponse": {
        "description": "A workflow.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/Workflow"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "InferenceRequest": {
        "type": "object",
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string",
            "description": "The user prompt."
          },
          "systemPrompt": {
            "type": "string",
            "description": "Optional system prompt, sent before the user prompt."
          },
          "model": {
            "type": "string",
            "description": "Optional model ID. Metal rejects IDs that are not in its registered model list. Omit to use the platform default."
          },
          "maxOutputTokens": {
            "type": "integer",
            "minimum": 1,
            "description": "Maximum number of tokens the model can generate."
          },
          "reasoningEffort": {
            "type": "string",
            "description": "Reasoning effort for models that support it."
          },
          "jsonSchema": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON Schema for structured output. The model is constrained to emit JSON matching the schema. The returned `text` is that JSON as a string, so parse and validate it yourself."
          },
          "temperature": {
            "type": "number",
            "description": "Sampling temperature."
          },
          "timeoutSeconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 180,
            "default": 60,
            "description": "Completion deadline in seconds. Omit or send `0` to use the 60-second default. Otherwise the value must be from 1 to 180."
          }
        }
      },
      "InferenceStreamEvent": {
        "type": "object",
        "description": "One server-sent event frame, sent as `data: {json}`. `content` and `metadata` are omitted when empty.",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "type": "string",
            "enum": [
              "HEARTBEAT",
              "COMPLETE",
              "ERROR"
            ],
            "description": "Frame type. `COMPLETE` and `ERROR` are terminal."
          },
          "content": {
            "type": "string",
            "description": "Omitted on `HEARTBEAT`. For `COMPLETE`, a JSON string containing `{\"data\":{\"text\":\"...\"}}`. For `ERROR`, the error message."
          },
          "metadata": {
            "type": "object",
            "description": "Omitted when empty, including on `HEARTBEAT` and `COMPLETE` frames.",
            "properties": {
              "errorCode": {
                "type": "string",
                "enum": [
                  "deadline_exceeded",
                  "canceled",
                  "completion_failed",
                  "internal_runtime_state",
                  "no_choices",
                  "panic"
                ],
                "description": "Present on `ERROR` frames. Classifies the failure."
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "A human-readable error message."
          }
        }
      },
      "ListPaginationMetadata": {
        "type": "object",
        "description": "Pagination details returned by `GET /v1/lists`.",
        "properties": {
          "page": {
            "type": "integer",
            "description": "The page number returned."
          },
          "limit": {
            "type": "integer",
            "description": "The page size used for this request."
          },
          "hasMore": {
            "type": "boolean",
            "description": "`true` when another page of results is available."
          }
        }
      },
      "PaginationMetadata": {
        "type": "object",
        "description": "Pagination details returned by search endpoints.",
        "properties": {
          "page": {
            "type": "integer",
            "example": 1
          },
          "limit": {
            "type": "integer",
            "example": 20
          },
          "totalCount": {
            "type": "integer",
            "example": 134
          },
          "totalPages": {
            "type": "integer",
            "example": 7
          }
        }
      },
      "SearchRequest": {
        "type": "object",
        "description": "Search text, structured filters, and ranking options. Pass pagination through the `page` and `limit` query parameters.",
        "properties": {
          "text": {
            "type": "string",
            "description": "Free-text query ranked against the resource's searchable fields.",
            "example": "industrial automation suppliers"
          },
          "filters": {
            "$ref": "#/components/schemas/SearchFilters"
          },
          "sort": {
            "type": "array",
            "description": "Ordered sort fields.",
            "items": {
              "$ref": "#/components/schemas/SearchSortField"
            }
          },
          "hybrid": {
            "type": "boolean",
            "description": "Enables hybrid semantic and keyword ranking on endpoints that support it.",
            "default": false
          },
          "fuzzy": {
            "type": "boolean",
            "description": "Enables approximate text matching on supported keyword-search paths. Document search and company hybrid search ignore this flag; activity search uses it only when `fullText` is false.",
            "default": false
          },
          "fullText": {
            "type": "boolean",
            "description": "Enables word-level matching on endpoints that support it.",
            "default": false
          }
        }
      },
      "SearchFilters": {
        "type": "object",
        "description": "Structured predicates grouped with `and` and `or`.",
        "properties": {
          "and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchFilterClause"
            }
          },
          "or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchFilterClause"
            }
          }
        }
      },
      "SearchFilterClause": {
        "type": "object",
        "description": "A field predicate or nested boolean group.",
        "properties": {
          "field": {
            "type": "string",
            "description": "Indexed field to filter. Available fields vary by resource."
          },
          "operator": {
            "type": "string",
            "description": "Filter operator, such as `eq`, `neq`, `match`, `in`, `nin`, `gt`, `gte`, `lt`, `lte`, `exists`, or `missing`."
          },
          "value": {
            "description": "Comparison value. Omit it for `exists` and `missing`."
          },
          "and": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchFilterClause"
            }
          },
          "or": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchFilterClause"
            }
          }
        }
      },
      "SearchSortField": {
        "type": "object",
        "required": [
          "field",
          "order"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          }
        }
      },
      "Reference": {
        "type": "object",
        "description": "A reference to another resource, such as a user or team.",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "The referenced resource type, e.g. \"user\" or \"team\"."
          }
        }
      },
      "Location": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "country": {
            "type": "string"
          }
        }
      },
      "ExternalReference": {
        "type": "object",
        "description": "A structured reference to a record in an external source system.",
        "properties": {
          "source": {
            "type": "string",
            "description": "The external system, e.g. a CRM provider."
          },
          "id": {
            "type": "string",
            "description": "The record id in the external system."
          }
        }
      },
      "CompanyEmailTouchpointsRequest": {
        "type": "object",
        "required": [
          "companyIds",
          "start",
          "end"
        ],
        "properties": {
          "companyIds": {
            "type": "array",
            "description": "IDs of companies in your organization. Duplicate IDs return one row.",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "string"
            }
          },
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the interval (inclusive), in RFC 3339 format. Floored to UTC midnight."
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "description": "End of the interval (exclusive), in RFC 3339 format. Floored to UTC midnight. After flooring, it must be later than the floored `start` and no more than 365 days after it; equal floored bounds return `400`."
          }
        }
      },
      "CompanyEmailTouchpointsResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "format": "date-time",
                "description": "Normalized start of the interval."
              },
              "end": {
                "type": "string",
                "format": "date-time",
                "description": "Normalized end of the interval."
              },
              "computedAt": {
                "type": "string",
                "format": "date-time",
                "description": "When Metal computed the result."
              },
              "companies": {
                "type": "array",
                "description": "One row per requested company, sorted by ID. Companies with no touchpoints return zero counts and null dates.",
                "items": {
                  "$ref": "#/components/schemas/CompanyEmailTouchpoint"
                }
              },
              "totals": {
                "description": "Distinct message counts across all requested companies. An email linked to several companies counts once here, so totals can be lower than the sum of the rows.",
                "$ref": "#/components/schemas/CompanyEmailTouchpointTotals"
              }
            }
          }
        }
      },
      "CompanyEmailTouchpoint": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string"
          },
          "outboundCount": {
            "type": "integer"
          },
          "inboundCount": {
            "type": "integer"
          },
          "lastOutboundAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastInboundAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CompanyEmailTouchpointTotals": {
        "type": "object",
        "description": "Distinct message counts across all requested companies. An email linked to several companies counts once here, so totals can be lower than the sum of the rows.",
        "properties": {
          "distinctOutboundCount": {
            "type": "integer"
          },
          "distinctInboundCount": {
            "type": "integer"
          }
        }
      },
      "Company": {
        "type": "object",
        "description": "A company record. Many attributes are populated by enrichment: Metal gathers candidate values from your documents, data providers, and the web, then ranks and reconciles them into the single value shown here. See the Enrichment and Reconciliation & ranking guides. The `enrichment` field exposes the discovered values and citations behind each reconciled attribute.",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "canonicalName": {
            "type": "string",
            "example": "Acme Industrials"
          },
          "alternativeNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "website": {
            "type": "string",
            "description": "On reads, the resolved observation value when available, otherwise the native company website.",
            "example": "https://acme.example"
          },
          "linkedinUrl": {
            "type": "string",
            "description": "On reads, the resolved observation value when available, otherwise the native company LinkedIn URL.",
            "example": "https://www.linkedin.com/company/acme-industrials"
          },
          "description": {
            "type": "string"
          },
          "shortDescription": {
            "type": "string"
          },
          "sector": {
            "type": "string",
            "example": "Industrials"
          },
          "subsector": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "companyType": {
            "type": "string",
            "enum": [
              "operating",
              "investor",
              "lender",
              "investment_bank",
              "advisor",
              "sponsor",
              "service_provider"
            ],
            "example": "operating"
          },
          "origin": { "type": "string", "enum": ["user", "crm", "agent", "screening"] },
          "externalId": { "type": "string" },
          "externalReference": { "$ref": "#/components/schemas/ExternalReference" },
          "tags": { "type": "array", "items": { "type": "string" } },
          "assignees": { "type": "array", "items": { "$ref": "#/components/schemas/Reference" } },
          "custom": { "type": "object", "additionalProperties": true, "description": "Organization-defined custom fields." },
          "employeeCount": { "type": "integer", "description": "Enriched. Approximate headcount, used as a size proxy.", "example": 450 },
          "ownershipStatus": { "type": "string", "description": "Enriched. Ownership status, e.g. \"private\", \"public\", or \"sponsor-owned\".", "example": "private" },
          "lastValuation": { "type": "number", "description": "Enriched. Most recent known valuation." },
          "lastRoundDate": { "type": "string", "format": "date", "description": "Enriched. Date of the most recent funding round." },
          "lastAmountRaised": { "type": "number", "description": "Enriched. Amount raised in the most recent round." },
          "totalMoneyRaised": { "type": "number", "description": "Enriched. Total capital raised to date." },
          "lastFinancials": { "type": "object", "additionalProperties": true, "description": "Enriched. Most recent reported financials (such as revenue)." },
          "enrichment": { "$ref": "#/components/schemas/EnrichmentProvenance" },
          "lastEnrichedAt": { "type": "string", "format": "date-time", "description": "When enrichment last completed and wrote values." },
          "lastEnrichmentStartedAt": { "type": "string", "format": "date-time", "description": "When the most recent enrichment run began. If newer than `lastEnrichedAt`, a run is in progress." },
          "createdAt": { "type": "string", "format": "date-time" },
          "updatedAt": { "type": "string", "format": "date-time" }
        }
      },
      "CompanyCreate": {
        "type": "object",
        "required": [
          "canonicalName"
        ],
        "properties": {
          "canonicalName": {
            "type": "string",
            "description": "The company's primary name.",
            "example": "Northwind Components"
          },
          "alternativeNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "website": {
            "type": "string",
            "example": "https://northwind.example"
          },
          "description": {
            "type": "string"
          },
          "shortDescription": {
            "type": "string"
          },
          "sector": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "companyType": {
            "type": "string",
            "enum": [
              "operating",
              "investor",
              "lender",
              "investment_bank",
              "advisor",
              "sponsor",
              "service_provider"
            ]
          },
          "externalId": {
            "type": "string",
            "description": "Your own identifier for reconciling with external systems."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "custom": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "CompanyUpdate": {
        "type": "object",
        "description": "Fields to update on a company. Provide only what you want to change.",
        "properties": {
          "canonicalName": {
            "type": "string"
          },
          "alternativeNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "website": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "shortDescription": {
            "type": "string"
          },
          "sector": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "companyType": {
            "type": "string",
            "enum": [
              "operating",
              "investor",
              "lender",
              "investment_bank",
              "advisor",
              "sponsor",
              "service_provider"
            ]
          },
          "externalId": {
            "type": "string"
          },
          "custom": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "Deal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "name": {
            "type": "string",
            "example": "Project Atlas"
          },
          "companyId": {
            "type": "string",
            "description": "The target company's id."
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "CLOSED",
              "PASSED_DEAD"
            ],
            "description": "Internal lifecycle status.",
            "example": "ACTIVE"
          },
          "stage": {
            "type": "string",
            "enum": [
              "SOURCED",
              "SCREENED",
              "IOI_TERM_SHEET",
              "DUE_DILIGENCE",
              "IC_MEETING",
              "DEAL_CLOSING",
              "PORTFOLIO_COMPANY",
              "REALIZED",
              "PASSED",
              "DEAD"
            ],
            "description": "Pipeline stage.",
            "example": "DUE_DILIGENCE"
          },
          "externalStatus": {
            "type": "string",
            "description": "Your firm's custom status label, when configured."
          },
          "externalStage": {
            "type": "string",
            "description": "Your firm's custom stage label, when configured."
          },
          "acquisitionType": {
            "type": "string",
            "enum": ["add_on", "platform"],
            "readOnly": true,
            "description": "Derived, read-only classification of the deal. `add_on` if the deal has a platform company (an add-on acquisition under an existing portfolio company), otherwise `platform`. Computed on read from the deal's platform company; cannot be set via create, update, or any other write endpoint.",
            "example": "platform"
          },
          "owners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          "sector": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "notes": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "DealCreate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "Project Atlas"
          },
          "companyId": {
            "type": "string",
            "description": "The target company's id."
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "CLOSED",
              "PASSED_DEAD"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "SOURCED",
              "SCREENED",
              "IOI_TERM_SHEET",
              "DUE_DILIGENCE",
              "IC_MEETING",
              "DEAL_CLOSING",
              "PORTFOLIO_COMPANY",
              "REALIZED",
              "PASSED",
              "DEAD"
            ]
          },
          "sector": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "notes": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          }
        }
      },
      "DealUpdate": {
        "type": "object",
        "description": "Fields to update on a deal.",
        "properties": {
          "name": {
            "type": "string"
          },
          "companyId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "CLOSED",
              "PASSED_DEAD"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "SOURCED",
              "SCREENED",
              "IOI_TERM_SHEET",
              "DUE_DILIGENCE",
              "IC_MEETING",
              "DEAL_CLOSING",
              "PORTFOLIO_COMPANY",
              "REALIZED",
              "PASSED",
              "DEAD"
            ]
          },
          "sector": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "Person": {
        "type": "object",
        "description": "A person record. Attributes such as `currentTitle`, `currentCompanyName`, and `linkedinUrl` can be populated by enrichment; the `enrichment` field exposes the discovered values and citations behind each reconciled attribute. See the Enrichment and Reconciliation & ranking guides.",
        "properties": {
          "id": { "type": "string", "example": "665f1c2a9b1e4a0012a3b4c5" },
          "firstName": { "type": "string", "example": "Jordan" },
          "lastName": { "type": "string", "example": "Rivera" },
          "email": { "type": "string", "example": "jordan@example.com" },
          "currentTitle": { "type": "string", "description": "May be enriched.", "example": "Chief Executive Officer" },
          "currentCompanyName": { "type": "string", "description": "May be enriched." },
          "company": { "type": "string", "description": "The linked company's id." },
          "linkedinUrl": { "type": "string", "description": "May be enriched." },
          "phoneNumber": { "type": "string" },
          "location": { "$ref": "#/components/schemas/Location" },
          "externalId": { "type": "string" },
          "externalReference": { "$ref": "#/components/schemas/ExternalReference" },
          "enrichment": { "$ref": "#/components/schemas/EnrichmentProvenance" },
          "createdAt": { "type": "string", "format": "date-time" },
          "updatedAt": { "type": "string", "format": "date-time" }
        }
      },
      "PersonCreated": {
        "description": "A person returned by `POST /v1/people`. Adds `reused` to the standard person.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Person"
          },
          {
            "type": "object",
            "properties": {
              "reused": {
                "type": "boolean",
                "description": "`true` when the request matched an existing person by email and Metal returned that person instead of creating a new one. Omitted when Metal created a person, and also omitted when Metal returned an existing person that matched by external reference. This field is never stored on the person.",
                "example": true
              }
            }
          }
        ]
      },
      "PersonCreate": {
        "type": "object",
        "required": [
          "firstName",
          "lastName"
        ],
        "properties": {
          "firstName": {
            "type": "string",
            "example": "Jordan"
          },
          "lastName": {
            "type": "string",
            "example": "Rivera"
          },
          "email": {
            "type": "string",
            "example": "jordan@example.com"
          },
          "currentTitle": {
            "type": "string"
          },
          "currentCompanyName": {
            "type": "string"
          },
          "company": {
            "type": "string",
            "description": "The id of the company to link this person to."
          },
          "linkedinUrl": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "externalId": {
            "type": "string"
          }
        }
      },
      "PersonUpdate": {
        "type": "object",
        "description": "Fields to update on a person. Provide only what you want to change.",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "currentTitle": {
            "type": "string"
          },
          "currentCompanyName": {
            "type": "string"
          },
          "company": {
            "type": "string",
            "description": "The id of the company to link this person to."
          },
          "linkedinUrl": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "externalId": {
            "type": "string"
          }
        }
      },
      "Document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "name": {
            "type": "string",
            "example": "Q4 board deck.pdf"
          },
          "type": {
            "type": "string",
            "description": "The classified document type."
          },
          "companyId": {
            "type": "string",
            "description": "The company the document is attached to, if any."
          },
          "dealId": {
            "type": "string",
            "description": "The deal the document is attached to, if any."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DiscoveredValue": {
        "type": "object",
        "description": "A single value Metal discovered for a field, with its provenance. Metal ranks and reconciles these into the value shown on the field. See the Reconciliation & ranking guide.",
        "properties": {
          "value": { "description": "The discovered value. Type matches the underlying field." },
          "source": { "type": "string", "description": "Where the value came from, e.g. \"CIM\", \"Market Report\", \"Web Search\", \"Third Party Data\", or \"User Updated\".", "example": "CIM" },
          "confidence": { "type": "number", "description": "Confidence in the value, as a percentage (0–100).", "example": 100 },
          "pinned": { "type": "boolean", "description": "Whether this value is pinned as the displayed value, overriding ranking.", "example": true },
          "discoveredAt": { "type": "string", "format": "date-time", "description": "When the value was discovered." }
        }
      },
      "EnrichmentProvenance": {
        "type": "object",
        "description": "Maps an enriched field name to the list of values Metal discovered for it. The resolved (top-ranked or pinned) value is reflected on the field itself; this object exposes the alternatives and their citations.",
        "additionalProperties": {
          "type": "array",
          "items": { "$ref": "#/components/schemas/DiscoveredValue" }
        },
        "example": {
          "subsector": [
            { "value": "Self-Funded Health Insurance / Third Party Administrator (TPA)", "source": "CIM", "confidence": 100, "pinned": true, "discoveredAt": "2026-02-14T10:00:00Z" },
            { "value": "Third-Party Administrators (TPAs)", "source": "Market Report", "confidence": 57, "pinned": false, "discoveredAt": "2026-01-20T10:00:00Z" }
          ]
        }
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "name": {
            "type": "string",
            "example": "Production sync"
          },
          "keyLastFour": {
            "type": "string",
            "example": "here"
          },
          "clientId": {
            "type": "string",
            "example": "ci_your_client_id_here"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "List": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "name": {
            "type": "string",
            "example": "Q3 sourcing targets"
          },
          "resourceType": {
            "type": "string",
            "example": "company"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BulkTagRequest": {
        "type": "object",
        "required": [
          "entryIds",
          "tagIds",
          "operation"
        ],
        "properties": {
          "entryIds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1000,
            "description": "Entry ids to change. Accepts 1 to 1,000 ids; duplicates are ignored.",
            "items": {
              "type": "string"
            },
            "example": [
              "665f1c2a9b1e4a0012a3b4d1",
              "665f1c2a9b1e4a0012a3b4d2"
            ]
          },
          "tagIds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "description": "Tag ids to add or remove. Accepts 1 to 100 ids; duplicates are ignored.",
            "items": {
              "type": "string"
            },
            "example": [
              "665f1c2a9b1e4a0012a3b4e1"
            ]
          },
          "operation": {
            "type": "string",
            "enum": [
              "add",
              "remove"
            ],
            "description": "Whether to add or remove the tags."
          }
        }
      },
      "BulkTagResult": {
        "type": "object",
        "properties": {
          "entryId": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4d1"
          },
          "status": {
            "type": "string",
            "enum": [
              "updated",
              "noOp",
              "notFound",
              "error"
            ],
            "description": "The outcome for this entry. `error` means the entry could not be changed, for example because the underlying record is not editable or its record type does not support tag write-back."
          },
          "message": {
            "type": "string",
            "description": "Why the entry was not changed. Present on `notFound` and `error` results."
          }
        }
      },
      "BulkTagResponse": {
        "type": "object",
        "properties": {
          "updatedCount": {
            "type": "integer",
            "description": "Entries where at least one tags column changed."
          },
          "noOpCount": {
            "type": "integer",
            "description": "Entries that already had (for `add`) or already lacked (for `remove`) every tag."
          },
          "notFoundCount": {
            "type": "integer",
            "description": "Entry ids that are not in this list."
          },
          "errorCount": {
            "type": "integer",
            "description": "Entries whose change failed."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkTagResult"
            }
          },
          "affectedResources": {
            "type": "array",
            "description": "Records updated through write-back. Omitted when write-back is off or nothing changed.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "example": "fund"
                },
                "id": {
                  "type": "string",
                  "example": "665f1c2a9b1e4a0012a3b4c6"
                }
              }
            }
          }
        }
      },
      "ListEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "resourceId": {
            "type": "string",
            "description": "The id of the resource this entry references."
          },
          "resourceType": {
            "type": "string",
            "example": "company"
          }
        }
      },
      "Workflow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "name": {
            "type": "string",
            "example": "Target screening"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkflowRunUpdate": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "New title for the run. Must be 1–120 characters.",
            "minLength": 1,
            "maxLength": 120,
            "example": "Acme diligence memo"
          }
        },
        "required": [
          "title"
        ]
      },
      "WorkflowRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c6"
          },
          "workflowId": {
            "type": "string",
            "example": "665f1c2a9b1e4a0012a3b4c5"
          },
          "status": {
            "type": "string",
            "description": "Run status, e.g. \"queued\", \"running\", \"completed\", or \"failed\".",
            "example": "running"
          },
          "title": {
            "type": "string",
            "description": "Short, editable label identifying the run. Metal generates the title when the run is created and it can be renamed via PATCH /v1/workflow-runs/{id}. Capped at 120 characters. Older runs created before titles were introduced may omit this field.",
            "maxLength": 120,
            "example": "Acme diligence memo"
          },
          "input": {
            "type": "object",
            "additionalProperties": true
          },
          "output": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Activity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "subject": {
            "type": "string",
            "example": "Intro call with management"
          },
          "type": {
            "type": "string",
            "example": "Meeting"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          "deals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "relatedResources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ActivityCreate": {
        "type": "object",
        "required": [
          "subject"
        ],
        "properties": {
          "subject": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          "deals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          },
          "isPrivate": {
            "type": "boolean"
          }
        }
      },
      "ActivityUpdate": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": "string",
            "format": "date-time"
          },
          "participants": {
            "description": "Either a plain array or an object with `addToSet`, `pull`, or `set`. A plain array replaces the whole list, the same as `set`. `addToSet` adds entries that are not already present as an identical element; because elements are compared whole, the same record sent in a different shape can still be added. `pull` removes entries matched on `id` and `type`. `set` cannot be combined with `addToSet` or `pull`. Each `id` must be a valid 24-character hex ID, and `type` must be one of `user`, `company`, `person`, `activity`, or `limited_partner`. Each `company` or `limited_partner` added through `set`, `addToSet`, or a plain array must exist in your organization, or the request returns 404. The list can hold at most 50 entries after the update.",
            "$ref": "#/components/schemas/ReferenceListUpdate"
          },
          "relatedResources": {
            "description": "Either a plain array or an object with `addToSet`, `pull`, or `set`. A plain array replaces the whole list, the same as `set`. `addToSet` adds entries that are not already present as an identical element; because elements are compared whole, the same record sent in a different shape can still be added. `pull` removes entries matched on `id` and `type`. `set` cannot be combined with `addToSet` or `pull`. Each `id` must be a valid 24-character hex ID, and `type` must be one of `fund`, `limited_partner`, `fundraising_process`, `deal_investor_participation`, `person`, `activity`, or `company`. The list can hold at most 50 entries after the update.",
            "$ref": "#/components/schemas/ReferenceListUpdate"
          },
          "isPrivate": {
            "type": "boolean"
          }
        }
      },
      "ReferenceListUpdate": {
        "description": "Either a plain array of references or an object with `addToSet`, `pull`, or `set`.",
        "oneOf": [
          {
            "type": "array",
            "title": "Replace list",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          {
            "type": "object",
            "title": "Add or remove entries",
            "properties": {
              "addToSet": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Reference"
                },
                "description": "Entries to add. An element identical to one already present is not added."
              },
              "pull": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Reference"
                },
                "description": "Entries to remove, matched on `id` and `type`."
              },
              "set": {
                "type": "array",
                "maxItems": 50,
                "items": {
                  "$ref": "#/components/schemas/Reference"
                },
                "description": "Replaces the whole list. Cannot be combined with `addToSet` or `pull`."
              }
            }
          }
        ]
      },
      "Enrichment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "property": {
            "type": "string",
            "description": "The enriched property name."
          },
          "value": {
            "description": "The enriched value."
          },
          "provider": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          },
          "capturedOn": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EnrichmentCreate": {
        "type": "object",
        "required": [
          "resourceType",
          "resourceId",
          "property",
          "value",
          "source",
          "sourceId"
        ],
        "properties": {
          "resourceType": {
            "type": "string",
            "example": "company"
          },
          "resourceId": {
            "type": "string"
          },
          "property": {
            "type": "string",
            "example": "description"
          },
          "value": {
            "description": "The value to store."
          },
          "provider": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "rationale": {
            "type": "string"
          }
        }
      },
      "Score": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "frameworkId": {
            "type": "string"
          },
          "frameworkName": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "screeningId": {
            "type": "string"
          },
          "finalScore": {
            "type": "number",
            "example": 78.5
          },
          "elementScores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ElementScore"
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ElementScore": {
        "type": "object",
        "properties": {
          "elementId": {
            "type": "string"
          },
          "elementName": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "reasoning": {
            "type": "string"
          },
          "confidence": {
            "type": "number"
          }
        }
      },
      "ScoreCreate": {
        "type": "object",
        "required": [
          "frameworkName",
          "elementScores",
          "finalScore"
        ],
        "properties": {
          "frameworkId": {
            "type": "string"
          },
          "frameworkName": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "screeningId": {
            "type": "string"
          },
          "elementScores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ElementScore"
            }
          },
          "finalScore": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ScoringFramework": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "qualitative",
              "quantitative",
              "hybrid"
            ]
          },
          "isStandard": {
            "type": "boolean"
          },
          "elements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScoringElement"
            }
          },
          "aggregationMethod": {
            "type": "string",
            "enum": [
              "weighted_average",
              "sum",
              "max",
              "min",
              "custom"
            ]
          },
          "entityType": {
            "type": "string",
            "enum": [
              "company",
              "person",
              "deal",
              "screening"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ScoringElement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          },
          "scoringLogic": {
            "type": "string"
          },
          "dataRequirements": {
            "type": "string"
          }
        }
      },
      "Screening": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "deal": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "example": "completed"
          },
          "industry": {
            "type": "string"
          },
          "sector": {
            "type": "string"
          },
          "subsector": {
            "type": "string"
          },
          "dataEntities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ScreeningCreate": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string"
          },
          "deal": {
            "type": "string"
          },
          "dataEntities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workspace": {
            "type": "string"
          },
          "skipSections": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ScreeningUpdate": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string"
          },
          "deal": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "Tag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "company",
              "deal",
              "list"
            ]
          },
          "value": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TagCreate": {
        "type": "object",
        "required": [
          "type",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "company",
              "deal",
              "list"
            ]
          },
          "value": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "TagUpdate": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "company",
              "deal",
              "list"
            ]
          },
          "value": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        }
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "Industrials team"
          },
          "members": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalId": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "industries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          "sectors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reference"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TeamCreate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalId": {
            "type": "string"
          }
        }
      },
      "TeamUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalId": {
            "type": "string"
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "PasswordDiscovery": {
        "type": "object",
        "description": "Automatic password discovery for password-protected files in this workspace.",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Turn automatic password discovery on or off."
          },
          "hint": {
            "type": "string",
            "maxLength": 1000,
            "description": "Optional free text telling Metal where passwords live, for example \"Passwords are in the Readme.txt of each deal folder\". Don't put an actual password in the hint — it is returned in workspace read responses."
          }
        }
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "example": "Project Atlas workspace"
          },
          "source": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "isPersonal": {
            "type": "boolean"
          },
          "passwordDiscovery": {
            "$ref": "#/components/schemas/PasswordDiscovery"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkspaceCreate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "passwordDiscovery": {
            "$ref": "#/components/schemas/PasswordDiscovery",
            "description": "If `enabled` is omitted, discovery stays off."
          }
        }
      },
      "WorkspaceUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "isPrivate": {
            "type": "boolean"
          },
          "passwordDiscovery": {
            "$ref": "#/components/schemas/PasswordDiscovery",
            "description": "Partial update: omitted fields are left unchanged. Omit hint to keep the current hint; send an empty string to clear it."
          }
        }
      },
      "Industry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IndustryCreate": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "IndustryUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "Sector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "industryId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SectorCreate": {
        "type": "object",
        "required": [
          "industryId",
          "name"
        ],
        "properties": {
          "industryId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "SectorUpdate": {
        "type": "object",
        "properties": {
          "industryId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "Subsector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "sectorId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SubsectorCreate": {
        "type": "object",
        "required": [
          "sectorId",
          "name"
        ],
        "properties": {
          "sectorId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "SubsectorUpdate": {
        "type": "object",
        "properties": {
          "sectorId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "externalReference": {
            "$ref": "#/components/schemas/ExternalReference"
          }
        }
      },
      "DataSeries": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "points": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "Observation": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "value": {
            "description": "The resolved observation value."
          },
          "provenance": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "MetricSeriesRequest": {
        "type": "object",
        "required": [
          "resource",
          "key"
        ],
        "properties": {
          "resource": {
            "type": "string",
            "example": "company:665f1c2a9b1e4a0012a3b4c5"
          },
          "key": {
            "type": "string",
            "example": "metric:revenue"
          },
          "dealContext": {
            "type": "string"
          },
          "policy": {
            "type": "string"
          },
          "period": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ObservationBatchRequest": {
        "type": "object",
        "required": [
          "requests"
        ],
        "properties": {
          "requests": {
            "type": "array",
            "minItems": 1,
            "maxItems": 32,
            "items": {
              "type": "object",
              "required": [
                "resource",
                "key"
              ],
              "properties": {
                "resource": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "dealContext": {
                  "type": "string"
                },
                "policy": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "FinancialMetric": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "period": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "ListEntryUpdate": {
        "type": "object",
        "properties": {
          "resourceId": {
            "type": "string"
          },
          "resourceType": {
            "type": "string"
          }
        }
      }
    }
  }
}
