{
  "openapi": "3.2.0",
  "info": {
    "description": "REST API for Cavyro. All endpoints live under `/api/v1`.\n\n## Authentication\n\nCreate an API token in the Cavyro app (**Settings → API Tokens**) and send it\nas a bearer token on every request:\n\n```\nAuthorization: Bearer <your-api-token>\n```\n\nWorkspace-scoped endpoints additionally require the `X-Workspace-Id` header\nidentifying the workspace you are acting in.\n\nAPI tokens expire (7, 30 or 90 days, chosen at creation) and can be revoked at\nany time from the app.\n\n## Collections & pagination\n\nCollection endpoints share a common query contract — `page`, `limit`,\n`sort`, `direction`, plus per-route filters — and return pagination metadata\nin the `page-limit`, `current-page`, `total-count` and `total-pages`\nresponse headers.\n\n## Errors\n\nErrors use a consistent envelope:\n\n```json\n{ \"error\": \"<human message>\", \"code\": \"<machine_code>\" }\n```\n\n## Webhooks\n\nSubscribe to domain events (deals, contacts, companies) via\n`POST /api/v1/webhook_subscriptions` — payloads, headers and the signature\nscheme are documented in the **Webhooks** section below.\n",
    "title": "Cavyro API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.cavyro.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/v1/attachments/{id}": {
      "delete": {
        "operationId": "delete-attachments-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Delete an attachment",
        "tags": [
          "Attachments"
        ]
      }
    },
    "/api/v1/attachments/{id}/download": {
      "get": {
        "operationId": "get-attachments-by-id-download",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "302": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Found"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Download an attachment",
        "tags": [
          "Attachments"
        ]
      }
    },
    "/api/v1/automations": {
      "get": {
        "operationId": "get-automations",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "type": "null"
                      },
                      "description": {
                        "type": "null"
                      },
                      "discarded_at": {
                        "type": "null"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "graph": {
                        "properties": {
                          "edges": {
                            "items": {
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "target": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "source",
                                "target"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "nodes": {
                            "items": {
                              "properties": {
                                "config": {
                                  "properties": {
                                    "action_type": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "params": {
                                      "properties": {
                                        "message_template": {
                                          "type": "string"
                                        },
                                        "recipient_kind": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "message_template",
                                        "recipient_kind"
                                      ],
                                      "type": [
                                        "object",
                                        "null"
                                      ]
                                    },
                                    "trigger_type": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "type": "object"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "position": {
                                  "properties": {
                                    "x": {
                                      "type": "integer"
                                    },
                                    "y": {
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "x",
                                    "y"
                                  ],
                                  "type": "object"
                                },
                                "type": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "config",
                                "id",
                                "position",
                                "type"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "schema_version": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "edges",
                          "nodes",
                          "schema_version"
                        ],
                        "type": "object"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "last_run_at": {
                        "type": "null"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "run_counts": {
                        "properties": {
                          "failed": {
                            "type": "integer"
                          },
                          "succeeded": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "failed",
                          "succeeded"
                        ],
                        "type": "object"
                      },
                      "trigger_type": {
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "version_number": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "created_at",
                      "created_by",
                      "description",
                      "discarded_at",
                      "enabled",
                      "graph",
                      "id",
                      "last_run_at",
                      "name",
                      "run_counts",
                      "trigger_type",
                      "updated_at",
                      "version_number"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List automations",
        "tags": [
          "Automations"
        ]
      },
      "post": {
        "operationId": "post-automations",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "automation": {
                    "properties": {
                      "graph": {
                        "properties": {
                          "edges": {
                            "items": {
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "target": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "source",
                                "target"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "nodes": {
                            "items": {
                              "properties": {
                                "config": {
                                  "properties": {
                                    "action_type": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "params": {
                                      "properties": {
                                        "message_template": {
                                          "type": "string"
                                        },
                                        "recipient_kind": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "message_template",
                                        "recipient_kind"
                                      ],
                                      "type": [
                                        "object",
                                        "null"
                                      ]
                                    },
                                    "trigger_type": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "type": "object"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "position": {
                                  "properties": {
                                    "x": {
                                      "type": "integer"
                                    },
                                    "y": {
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "x",
                                    "y"
                                  ],
                                  "type": "object"
                                },
                                "type": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "config",
                                "id",
                                "position",
                                "type"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "schema_version": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "edges",
                          "nodes",
                          "schema_version"
                        ],
                        "type": "object"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "graph",
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "automation"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "graph": {
                      "properties": {
                        "edges": {
                          "items": {
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "source": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "source",
                              "target"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "items": {
                            "properties": {
                              "config": {
                                "properties": {
                                  "action_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "params": {
                                    "properties": {
                                      "message_template": {
                                        "type": "string"
                                      },
                                      "recipient_kind": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "message_template",
                                      "recipient_kind"
                                    ],
                                    "type": [
                                      "object",
                                      "null"
                                    ]
                                  },
                                  "trigger_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "type": "object"
                              },
                              "id": {
                                "type": "string"
                              },
                              "position": {
                                "properties": {
                                  "x": {
                                    "type": "integer"
                                  },
                                  "y": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "config",
                              "id",
                              "position",
                              "type"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "schema_version": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "edges",
                        "nodes",
                        "schema_version"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_run_at": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "run_counts": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "succeeded"
                      ],
                      "type": "object"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "version_number": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "description",
                    "discarded_at",
                    "enabled",
                    "graph",
                    "id",
                    "last_run_at",
                    "name",
                    "run_counts",
                    "trigger_type",
                    "updated_at",
                    "version_number"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "graph": {
                              "items": {
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "node_id": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "node_id"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "graph"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create an automation",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/catalog": {
      "get": {
        "operationId": "get-automations-catalog",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "actions": {
                      "items": {
                        "properties": {
                          "action_type": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "params": {
                            "items": {
                              "properties": {
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "format": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "label": {
                                  "example": "Acme",
                                  "type": "string"
                                },
                                "name": {
                                  "example": "Acme",
                                  "type": "string"
                                },
                                "option_help": {
                                  "properties": {
                                    "admins": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "contact": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "deal_assignees": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "discord": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "generic": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "slack": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "type": [
                                    "object",
                                    "null"
                                  ]
                                },
                                "option_labels": {
                                  "properties": {
                                    "discord": {
                                      "type": "string"
                                    },
                                    "generic": {
                                      "type": "string"
                                    },
                                    "slack": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "discord",
                                    "generic",
                                    "slack"
                                  ],
                                  "type": [
                                    "object",
                                    "null"
                                  ]
                                },
                                "option_links": {
                                  "properties": {
                                    "discord": {
                                      "type": "string"
                                    },
                                    "slack": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "discord",
                                    "slack"
                                  ],
                                  "type": [
                                    "object",
                                    "null"
                                  ]
                                },
                                "options": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": [
                                    "array",
                                    "null"
                                  ]
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "required_when": {
                                  "properties": {
                                    "in": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "param": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "in",
                                    "param"
                                  ],
                                  "type": [
                                    "object",
                                    "null"
                                  ]
                                },
                                "show_when": {
                                  "properties": {
                                    "in": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "param": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "in",
                                    "param"
                                  ],
                                  "type": [
                                    "object",
                                    "null"
                                  ]
                                },
                                "type": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "description",
                                "format",
                                "label",
                                "name",
                                "option_help",
                                "option_labels",
                                "option_links",
                                "options",
                                "required",
                                "required_when",
                                "show_when",
                                "type"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "subject_types": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "action_type",
                          "description",
                          "label",
                          "params",
                          "subject_types"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "array_operators": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "fields": {
                      "properties": {
                        "CalendarEvent": {
                          "items": {
                            "properties": {
                              "field_type": {
                                "type": "string"
                              },
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "example": "Acme",
                                "type": "string"
                              },
                              "options": {
                                "type": "null"
                              },
                              "options_source": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "field_type",
                              "key",
                              "label",
                              "options",
                              "options_source"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "Campaign": {
                          "items": {
                            "properties": {
                              "field_type": {
                                "type": "string"
                              },
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "example": "Acme",
                                "type": "string"
                              },
                              "options": {
                                "type": "null"
                              },
                              "options_source": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "field_type",
                              "key",
                              "label",
                              "options",
                              "options_source"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "Company": {
                          "items": {
                            "properties": {
                              "field_type": {
                                "type": "string"
                              },
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "example": "Acme",
                                "type": "string"
                              },
                              "options": {
                                "type": "null"
                              },
                              "options_source": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "field_type",
                              "key",
                              "label",
                              "options",
                              "options_source"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "Contact": {
                          "items": {
                            "properties": {
                              "field_type": {
                                "type": "string"
                              },
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "example": "Acme",
                                "type": "string"
                              },
                              "options": {
                                "type": "null"
                              },
                              "options_source": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "field_type",
                              "key",
                              "label",
                              "options",
                              "options_source"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "Deal": {
                          "items": {
                            "properties": {
                              "field_type": {
                                "type": "string"
                              },
                              "key": {
                                "type": "string"
                              },
                              "label": {
                                "example": "Acme",
                                "type": "string"
                              },
                              "options": {
                                "items": {
                                  "type": "string"
                                },
                                "type": [
                                  "array",
                                  "null"
                                ]
                              },
                              "options_source": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "field_type",
                              "key",
                              "label",
                              "options",
                              "options_source"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "CalendarEvent",
                        "Campaign",
                        "Company",
                        "Contact",
                        "Deal"
                      ],
                      "type": "object"
                    },
                    "operators_by_type": {
                      "properties": {
                        "boolean": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "date": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "multi_select": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "number": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "select": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "text": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "boolean",
                        "date",
                        "multi_select",
                        "number",
                        "select",
                        "text"
                      ],
                      "type": "object"
                    },
                    "options": {
                      "properties": {
                        "company_industries": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "company_regions": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "company_sizes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "members": {
                          "items": {
                            "properties": {
                              "display_name": {
                                "type": "string"
                              },
                              "email": {
                                "example": "ana@example.com",
                                "type": "string"
                              },
                              "id": {
                                "example": 42,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "display_name",
                              "email",
                              "id"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "pipelines": {
                          "items": {},
                          "type": "array"
                        },
                        "stages": {
                          "items": {},
                          "type": "array"
                        },
                        "tags": {
                          "items": {},
                          "type": "array"
                        }
                      },
                      "required": [
                        "company_industries",
                        "company_regions",
                        "company_sizes",
                        "members",
                        "pipelines",
                        "stages",
                        "tags"
                      ],
                      "type": "object"
                    },
                    "triggers": {
                      "items": {
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "fields": {
                            "items": {
                              "properties": {
                                "field_type": {
                                  "type": "string"
                                },
                                "key": {
                                  "type": "string"
                                },
                                "label": {
                                  "example": "Acme",
                                  "type": "string"
                                },
                                "options": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": [
                                    "array",
                                    "null"
                                  ]
                                },
                                "options_source": {
                                  "type": "null"
                                }
                              },
                              "required": [
                                "field_type",
                                "key",
                                "label",
                                "options",
                                "options_source"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "params": {
                            "items": {
                              "properties": {
                                "description": {
                                  "type": "string"
                                },
                                "format": {
                                  "type": "null"
                                },
                                "label": {
                                  "example": "Acme",
                                  "type": "string"
                                },
                                "name": {
                                  "example": "Acme",
                                  "type": "string"
                                },
                                "option_help": {
                                  "type": "null"
                                },
                                "option_labels": {
                                  "type": "null"
                                },
                                "option_links": {
                                  "type": "null"
                                },
                                "options": {
                                  "type": "null"
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "required_when": {
                                  "type": "null"
                                },
                                "show_when": {
                                  "type": "null"
                                },
                                "type": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "description",
                                "format",
                                "label",
                                "name",
                                "option_help",
                                "option_labels",
                                "option_links",
                                "options",
                                "required",
                                "required_when",
                                "show_when",
                                "type"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "subject_type": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "variables": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "description",
                          "fields",
                          "kind",
                          "label",
                          "params",
                          "subject_type",
                          "type",
                          "variables"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "valueless_operators": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "variables": {
                      "properties": {
                        "CalendarEvent": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "Campaign": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "Company": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "Contact": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "Deal": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "CalendarEvent",
                        "Campaign",
                        "Company",
                        "Contact",
                        "Deal"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "actions",
                    "array_operators",
                    "fields",
                    "operators_by_type",
                    "options",
                    "triggers",
                    "valueless_operators",
                    "variables"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get the automations catalog",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{automation_id}/runs": {
      "get": {
        "operationId": "get-automations-by-automation-id-runs",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {},
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List automation runs",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{automation_id}/runs/{id}": {
      "get": {
        "operationId": "get-automations-by-automation-id-runs-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "automation_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "automation_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "automation_version_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "depth": {
                      "type": "integer"
                    },
                    "error": {
                      "type": "null"
                    },
                    "finished_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "resume_at": {
                      "type": "null"
                    },
                    "started_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {
                        "properties": {
                          "action_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attempt": {
                            "type": "integer"
                          },
                          "error": {
                            "type": "null"
                          },
                          "finished_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "input": {
                            "properties": {
                              "message_template": {
                                "type": "string"
                              },
                              "recipient_kind": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "message_template",
                              "recipient_kind"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "node_id": {
                            "type": "string"
                          },
                          "node_type": {
                            "type": "string"
                          },
                          "output": {
                            "properties": {
                              "delivered_to": {
                                "items": {
                                  "type": "integer"
                                },
                                "type": [
                                  "array",
                                  "null"
                                ]
                              },
                              "message": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "result": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "rules": {
                                "items": {
                                  "properties": {
                                    "actual": {
                                      "type": "string"
                                    },
                                    "field": {
                                      "type": "string"
                                    },
                                    "operator": {
                                      "type": "string"
                                    },
                                    "result": {
                                      "type": "boolean"
                                    },
                                    "value": {
                                      "type": "null"
                                    }
                                  },
                                  "required": [
                                    "actual",
                                    "field",
                                    "operator",
                                    "result",
                                    "value"
                                  ],
                                  "type": "object"
                                },
                                "type": [
                                  "array",
                                  "null"
                                ]
                              },
                              "warnings": {
                                "items": {},
                                "type": [
                                  "array",
                                  "null"
                                ]
                              }
                            },
                            "type": "object"
                          },
                          "started_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "action_type",
                          "attempt",
                          "error",
                          "finished_at",
                          "id",
                          "input",
                          "node_id",
                          "node_type",
                          "output",
                          "started_at",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subject_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "subject_label": {
                      "type": "string"
                    },
                    "subject_type": {
                      "type": "string"
                    },
                    "test": {
                      "type": "boolean"
                    },
                    "trigger_event_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "automation_id",
                    "automation_version_id",
                    "created_at",
                    "depth",
                    "error",
                    "finished_at",
                    "id",
                    "resume_at",
                    "started_at",
                    "status",
                    "steps",
                    "subject_id",
                    "subject_label",
                    "subject_type",
                    "test",
                    "trigger_event_type"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get an automation run",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{id}": {
      "delete": {
        "operationId": "delete-automations-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Delete an automation",
        "tags": [
          "Automations"
        ]
      },
      "get": {
        "operationId": "get-automations-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "graph": {
                      "properties": {
                        "edges": {
                          "items": {
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "source": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "source",
                              "target"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "items": {
                            "properties": {
                              "config": {
                                "properties": {
                                  "action_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "params": {
                                    "properties": {
                                      "message_template": {
                                        "type": "string"
                                      },
                                      "recipient_kind": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "message_template",
                                      "recipient_kind"
                                    ],
                                    "type": [
                                      "object",
                                      "null"
                                    ]
                                  },
                                  "trigger_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "type": "object"
                              },
                              "id": {
                                "type": "string"
                              },
                              "position": {
                                "properties": {
                                  "x": {
                                    "type": "integer"
                                  },
                                  "y": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "config",
                              "id",
                              "position",
                              "type"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "schema_version": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "edges",
                        "nodes",
                        "schema_version"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_run_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "run_counts": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "succeeded"
                      ],
                      "type": "object"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "version_number": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "description",
                    "discarded_at",
                    "enabled",
                    "graph",
                    "id",
                    "last_run_at",
                    "name",
                    "run_counts",
                    "trigger_type",
                    "updated_at",
                    "version_number"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get an automation",
        "tags": [
          "Automations"
        ]
      },
      "patch": {
        "operationId": "patch-automations-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "automation": {
                    "properties": {
                      "graph": {
                        "properties": {
                          "edges": {
                            "items": {
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "source": {
                                  "type": "string"
                                },
                                "target": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "source",
                                "target"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "nodes": {
                            "items": {
                              "properties": {
                                "config": {
                                  "properties": {
                                    "action_type": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "params": {
                                      "properties": {
                                        "message_template": {
                                          "type": "string"
                                        },
                                        "recipient_kind": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "message_template",
                                        "recipient_kind"
                                      ],
                                      "type": [
                                        "object",
                                        "null"
                                      ]
                                    },
                                    "trigger_type": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "type": "object"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "position": {
                                  "properties": {
                                    "x": {
                                      "type": "integer"
                                    },
                                    "y": {
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "x",
                                    "y"
                                  ],
                                  "type": "object"
                                },
                                "type": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "config",
                                "id",
                                "position",
                                "type"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "schema_version": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "edges",
                          "nodes",
                          "schema_version"
                        ],
                        "type": "object"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "automation"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "graph": {
                      "properties": {
                        "edges": {
                          "items": {
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "source": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "source",
                              "target"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "items": {
                            "properties": {
                              "config": {
                                "properties": {
                                  "action_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "params": {
                                    "properties": {
                                      "message_template": {
                                        "type": "string"
                                      },
                                      "recipient_kind": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "message_template",
                                      "recipient_kind"
                                    ],
                                    "type": [
                                      "object",
                                      "null"
                                    ]
                                  },
                                  "trigger_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "type": "object"
                              },
                              "id": {
                                "type": "string"
                              },
                              "position": {
                                "properties": {
                                  "x": {
                                    "type": "integer"
                                  },
                                  "y": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "config",
                              "id",
                              "position",
                              "type"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "schema_version": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "edges",
                        "nodes",
                        "schema_version"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_run_at": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "run_counts": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "succeeded"
                      ],
                      "type": "object"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "version_number": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "description",
                    "discarded_at",
                    "enabled",
                    "graph",
                    "id",
                    "last_run_at",
                    "name",
                    "run_counts",
                    "trigger_type",
                    "updated_at",
                    "version_number"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update an automation",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{id}/activate": {
      "post": {
        "operationId": "post-automations-by-id-activate",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "graph": {
                      "properties": {
                        "edges": {
                          "items": {
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "source": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "source",
                              "target"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "items": {
                            "properties": {
                              "config": {
                                "properties": {
                                  "action_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "params": {
                                    "properties": {
                                      "message_template": {
                                        "type": "string"
                                      },
                                      "recipient_kind": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "message_template",
                                      "recipient_kind"
                                    ],
                                    "type": [
                                      "object",
                                      "null"
                                    ]
                                  },
                                  "trigger_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "type": "object"
                              },
                              "id": {
                                "type": "string"
                              },
                              "position": {
                                "properties": {
                                  "x": {
                                    "type": "integer"
                                  },
                                  "y": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "config",
                              "id",
                              "position",
                              "type"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "schema_version": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "edges",
                        "nodes",
                        "schema_version"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_run_at": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "run_counts": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "succeeded"
                      ],
                      "type": "object"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "version_number": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "description",
                    "discarded_at",
                    "enabled",
                    "graph",
                    "id",
                    "last_run_at",
                    "name",
                    "run_counts",
                    "trigger_type",
                    "updated_at",
                    "version_number"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Activate an automation",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{id}/deactivate": {
      "post": {
        "operationId": "post-automations-by-id-deactivate",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "graph": {
                      "properties": {
                        "edges": {
                          "items": {
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "source": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "source",
                              "target"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "items": {
                            "properties": {
                              "config": {
                                "properties": {
                                  "action_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "params": {
                                    "properties": {
                                      "message_template": {
                                        "type": "string"
                                      },
                                      "recipient_kind": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "message_template",
                                      "recipient_kind"
                                    ],
                                    "type": [
                                      "object",
                                      "null"
                                    ]
                                  },
                                  "trigger_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "type": "object"
                              },
                              "id": {
                                "type": "string"
                              },
                              "position": {
                                "properties": {
                                  "x": {
                                    "type": "integer"
                                  },
                                  "y": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "config",
                              "id",
                              "position",
                              "type"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "schema_version": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "edges",
                        "nodes",
                        "schema_version"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_run_at": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "run_counts": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "succeeded"
                      ],
                      "type": "object"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "version_number": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "description",
                    "discarded_at",
                    "enabled",
                    "graph",
                    "id",
                    "last_run_at",
                    "name",
                    "run_counts",
                    "trigger_type",
                    "updated_at",
                    "version_number"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Deactivate an automation",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{id}/discard": {
      "patch": {
        "operationId": "patch-automations-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Move an automation to the recycle bin",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{id}/restore": {
      "patch": {
        "operationId": "patch-automations-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "graph": {
                      "properties": {
                        "edges": {
                          "items": {
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "source": {
                                "type": "string"
                              },
                              "target": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "source",
                              "target"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "items": {
                            "properties": {
                              "config": {
                                "properties": {
                                  "action_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "params": {
                                    "properties": {
                                      "message_template": {
                                        "type": "string"
                                      },
                                      "recipient_kind": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "message_template",
                                      "recipient_kind"
                                    ],
                                    "type": [
                                      "object",
                                      "null"
                                    ]
                                  },
                                  "trigger_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "type": "object"
                              },
                              "id": {
                                "type": "string"
                              },
                              "position": {
                                "properties": {
                                  "x": {
                                    "type": "integer"
                                  },
                                  "y": {
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "x",
                                  "y"
                                ],
                                "type": "object"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "config",
                              "id",
                              "position",
                              "type"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "schema_version": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "edges",
                        "nodes",
                        "schema_version"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_run_at": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "run_counts": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "succeeded": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "succeeded"
                      ],
                      "type": "object"
                    },
                    "trigger_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "version_number": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "description",
                    "discarded_at",
                    "enabled",
                    "graph",
                    "id",
                    "last_run_at",
                    "name",
                    "run_counts",
                    "trigger_type",
                    "updated_at",
                    "version_number"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Restore an automation",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/automations/{id}/test_run": {
      "post": {
        "operationId": "post-automations-by-id-test-run",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "subject_id": {
                    "example": 7,
                    "type": "integer"
                  }
                },
                "required": [
                  "subject_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "automation_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "automation_version_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "depth": {
                      "type": "integer"
                    },
                    "error": {
                      "type": "null"
                    },
                    "finished_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "resume_at": {
                      "type": "null"
                    },
                    "started_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {
                        "properties": {
                          "action_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "attempt": {
                            "type": "integer"
                          },
                          "error": {
                            "type": "null"
                          },
                          "finished_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "input": {
                            "properties": {
                              "tag_id": {
                                "example": 7,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "tag_id"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "node_id": {
                            "type": "string"
                          },
                          "node_type": {
                            "type": "string"
                          },
                          "output": {
                            "properties": {
                              "preview": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "simulated": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "waited": {
                                "properties": {
                                  "amount": {
                                    "example": 2500,
                                    "type": "integer"
                                  },
                                  "unit": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "unit"
                                ],
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "would_add_tag": {
                                "properties": {
                                  "id": {
                                    "example": 42,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "example": "Acme",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "type": [
                                  "object",
                                  "null"
                                ]
                              }
                            },
                            "type": "object"
                          },
                          "started_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "action_type",
                          "attempt",
                          "error",
                          "finished_at",
                          "id",
                          "input",
                          "node_id",
                          "node_type",
                          "output",
                          "started_at",
                          "status"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subject_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "subject_label": {
                      "type": "null"
                    },
                    "subject_type": {
                      "type": "string"
                    },
                    "test": {
                      "type": "boolean"
                    },
                    "trigger_event_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "automation_id",
                    "automation_version_id",
                    "created_at",
                    "depth",
                    "error",
                    "finished_at",
                    "id",
                    "resume_at",
                    "started_at",
                    "status",
                    "steps",
                    "subject_id",
                    "subject_label",
                    "subject_type",
                    "test",
                    "trigger_event_type"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Test-run an automation",
        "tags": [
          "Automations"
        ]
      }
    },
    "/api/v1/calendar": {
      "get": {
        "operationId": "get-calendar",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "events": {
                      "items": {
                        "properties": {
                          "date": {
                            "example": "2026-01-15",
                            "type": "string"
                          },
                          "deal": {
                            "properties": {
                              "currency": {
                                "example": "EUR",
                                "type": "string"
                              },
                              "id": {
                                "example": 42,
                                "type": "integer"
                              },
                              "status": {
                                "type": "string"
                              },
                              "title": {
                                "example": "Acme",
                                "type": "string"
                              },
                              "value": {
                                "type": "null"
                              }
                            },
                            "required": [
                              "currency",
                              "id",
                              "status",
                              "title",
                              "value"
                            ],
                            "type": "object"
                          },
                          "event": {
                            "properties": {
                              "all_day": {
                                "type": "boolean"
                              },
                              "attendees_count": {
                                "type": "integer"
                              },
                              "contacts": {
                                "items": {
                                  "properties": {
                                    "email": {
                                      "example": "ana@example.com",
                                      "type": "string"
                                    },
                                    "first_name": {
                                      "example": "Ana",
                                      "type": "string"
                                    },
                                    "id": {
                                      "example": 42,
                                      "type": "integer"
                                    },
                                    "last_name": {
                                      "example": "Kovac",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "email",
                                    "first_name",
                                    "id",
                                    "last_name"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "ends_at": {
                                "example": "2026-01-15T09:30:00Z",
                                "type": "string"
                              },
                              "ends_on": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "id": {
                                "example": 42,
                                "type": "integer"
                              },
                              "location": {
                                "type": "null"
                              },
                              "meet_link": {
                                "type": "null"
                              },
                              "starts_at": {
                                "example": "2026-01-15T09:30:00Z",
                                "type": "string"
                              },
                              "starts_on": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "status": {
                                "type": "string"
                              },
                              "title": {
                                "example": "Acme",
                                "type": "string"
                              }
                            },
                            "required": [
                              "all_day",
                              "attendees_count",
                              "contacts",
                              "ends_at",
                              "ends_on",
                              "id",
                              "location",
                              "meet_link",
                              "starts_at",
                              "starts_on",
                              "status",
                              "title"
                            ],
                            "type": "object"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "date",
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "from": {
                      "type": "string"
                    },
                    "google_sync": {
                      "properties": {
                        "status": {
                          "type": "string"
                        },
                        "sync_error": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "synced_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "sync_error",
                        "synced_at"
                      ],
                      "type": "object"
                    },
                    "to": {
                      "type": "string"
                    },
                    "truncated": {
                      "properties": {
                        "closed": {
                          "type": "boolean"
                        },
                        "expected_close": {
                          "type": "boolean"
                        },
                        "meetings": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "closed",
                        "expected_close",
                        "meetings"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "events",
                    "from",
                    "google_sync",
                    "to",
                    "truncated"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get the calendar",
        "tags": [
          "Calendar"
        ]
      }
    },
    "/api/v1/calendar-events": {
      "post": {
        "operationId": "post-calendar-events",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "add_meet": {
                    "type": "boolean"
                  },
                  "attendees": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "deal_id": {
                    "example": 7,
                    "type": "integer"
                  },
                  "ends_at": {
                    "example": "2026-01-15T09:30:00Z",
                    "type": "string"
                  },
                  "send_invites": {
                    "type": "boolean"
                  },
                  "starts_at": {
                    "example": "2026-01-15T09:30:00Z",
                    "type": "string"
                  },
                  "time_zone": {
                    "type": "string"
                  },
                  "title": {
                    "example": "Acme",
                    "type": "string"
                  }
                },
                "required": [
                  "add_meet",
                  "attendees",
                  "deal_id",
                  "ends_at",
                  "send_invites",
                  "starts_at",
                  "time_zone",
                  "title"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contacts": {
                      "items": {
                        "properties": {
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "first_name": {
                            "example": "Ana",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "last_name": {
                            "example": "Kovac",
                            "type": "string"
                          },
                          "title": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "email",
                          "first_name",
                          "id",
                          "last_name",
                          "title"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "deals": {
                      "items": {},
                      "type": "array"
                    },
                    "event": {
                      "properties": {
                        "all_day": {
                          "type": "boolean"
                        },
                        "attendees": {
                          "items": {
                            "properties": {
                              "email": {
                                "example": "ana@example.com",
                                "type": "string"
                              },
                              "organizer": {
                                "type": "boolean"
                              },
                              "self": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "email",
                              "organizer",
                              "self"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "deal": {
                          "properties": {
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "title": {
                              "example": "Acme",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "title"
                          ],
                          "type": "object"
                        },
                        "description": {
                          "type": "null"
                        },
                        "ends_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "ends_on": {
                          "type": "null"
                        },
                        "google_event_id": {
                          "type": "string"
                        },
                        "html_link": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "location": {
                          "type": "null"
                        },
                        "manageable": {
                          "type": "boolean"
                        },
                        "meet_link": {
                          "type": "string"
                        },
                        "organizer_email": {
                          "type": "null"
                        },
                        "origin": {
                          "type": "string"
                        },
                        "starts_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "starts_on": {
                          "type": "null"
                        },
                        "status": {
                          "type": "string"
                        },
                        "title": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "all_day",
                        "attendees",
                        "deal",
                        "description",
                        "ends_at",
                        "ends_on",
                        "google_event_id",
                        "html_link",
                        "id",
                        "location",
                        "manageable",
                        "meet_link",
                        "organizer_email",
                        "origin",
                        "starts_at",
                        "starts_on",
                        "status",
                        "title"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "contacts",
                    "deals",
                    "event"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "feature": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "feature"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "ends_at": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "starts_at": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "ends_at",
                            "starts_at"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a calendar event",
        "tags": [
          "Calendar Events"
        ]
      }
    },
    "/api/v1/calendar-events/{calendar_event_id}/contacts": {
      "post": {
        "operationId": "post-calendar-events-by-calendar-event-id-contacts",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "calendar_event_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "display_name": {
                    "type": "string"
                  },
                  "email": {
                    "example": "ana@example.com",
                    "type": "string"
                  }
                },
                "required": [
                  "email"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contacts": {
                      "items": {
                        "properties": {
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "first_name": {
                            "example": "Ana",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "last_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "title": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "email",
                          "first_name",
                          "id",
                          "last_name",
                          "title"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "deals": {
                      "items": {},
                      "type": "array"
                    },
                    "event": {
                      "properties": {
                        "all_day": {
                          "type": "boolean"
                        },
                        "attendees": {
                          "items": {
                            "properties": {
                              "display_name": {
                                "type": "string"
                              },
                              "email": {
                                "example": "ana@example.com",
                                "type": "string"
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "deal": {
                          "type": "null"
                        },
                        "description": {
                          "type": "null"
                        },
                        "ends_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "ends_on": {
                          "type": "null"
                        },
                        "google_event_id": {
                          "type": "string"
                        },
                        "html_link": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "location": {
                          "type": "null"
                        },
                        "manageable": {
                          "type": "boolean"
                        },
                        "meet_link": {
                          "type": "null"
                        },
                        "organizer_email": {
                          "type": "null"
                        },
                        "origin": {
                          "type": "string"
                        },
                        "starts_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "starts_on": {
                          "type": "null"
                        },
                        "status": {
                          "type": "string"
                        },
                        "title": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "all_day",
                        "attendees",
                        "deal",
                        "description",
                        "ends_at",
                        "ends_on",
                        "google_event_id",
                        "html_link",
                        "id",
                        "location",
                        "manageable",
                        "meet_link",
                        "organizer_email",
                        "origin",
                        "starts_at",
                        "starts_on",
                        "status",
                        "title"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "contacts",
                    "deals",
                    "event"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "email": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "email"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a contact to a calendar event",
        "tags": [
          "Calendar Events"
        ]
      }
    },
    "/api/v1/calendar-events/{id}": {
      "delete": {
        "operationId": "delete-calendar-events-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Delete a calendar event",
        "tags": [
          "Calendar Events"
        ]
      },
      "get": {
        "operationId": "get-calendar-events-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contacts": {
                      "items": {
                        "properties": {
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "first_name": {
                            "example": "Ana",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "last_name": {
                            "example": "Kovac",
                            "type": "string"
                          },
                          "title": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "email",
                          "first_name",
                          "id",
                          "last_name",
                          "title"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "deals": {
                      "items": {
                        "properties": {
                          "contact_ids": {
                            "items": {
                              "type": "integer"
                            },
                            "type": "array"
                          },
                          "currency": {
                            "example": "EUR",
                            "type": "string"
                          },
                          "expected_close_date": {
                            "type": "null"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "stage_name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "value": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "contact_ids",
                          "currency",
                          "expected_close_date",
                          "id",
                          "stage_name",
                          "status",
                          "title",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "event": {
                      "properties": {
                        "all_day": {
                          "type": "boolean"
                        },
                        "attendees": {
                          "items": {
                            "properties": {
                              "display_name": {
                                "type": "string"
                              },
                              "email": {
                                "example": "ana@example.com",
                                "type": "string"
                              }
                            },
                            "required": [
                              "display_name",
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "deal": {
                          "type": "null"
                        },
                        "description": {
                          "type": "null"
                        },
                        "ends_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "ends_on": {
                          "type": "null"
                        },
                        "google_event_id": {
                          "type": "string"
                        },
                        "html_link": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "location": {
                          "type": "null"
                        },
                        "manageable": {
                          "type": "boolean"
                        },
                        "meet_link": {
                          "type": "null"
                        },
                        "organizer_email": {
                          "type": "null"
                        },
                        "origin": {
                          "type": "string"
                        },
                        "starts_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "starts_on": {
                          "type": "null"
                        },
                        "status": {
                          "type": "string"
                        },
                        "title": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "all_day",
                        "attendees",
                        "deal",
                        "description",
                        "ends_at",
                        "ends_on",
                        "google_event_id",
                        "html_link",
                        "id",
                        "location",
                        "manageable",
                        "meet_link",
                        "organizer_email",
                        "origin",
                        "starts_at",
                        "starts_on",
                        "status",
                        "title"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "contacts",
                    "deals",
                    "event"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a calendar event",
        "tags": [
          "Calendar Events"
        ]
      },
      "patch": {
        "operationId": "patch-calendar-events-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "attendees": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "ends_at": {
                    "example": "2026-01-15T09:30:00Z",
                    "type": "string"
                  },
                  "send_invites": {
                    "type": "boolean"
                  },
                  "starts_at": {
                    "example": "2026-01-15T09:30:00Z",
                    "type": "string"
                  },
                  "time_zone": {
                    "type": "string"
                  },
                  "title": {
                    "example": "Acme",
                    "type": "string"
                  }
                },
                "required": [
                  "attendees",
                  "ends_at",
                  "send_invites",
                  "starts_at",
                  "time_zone",
                  "title"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "deals": {
                      "items": {},
                      "type": "array"
                    },
                    "event": {
                      "properties": {
                        "all_day": {
                          "type": "boolean"
                        },
                        "attendees": {
                          "items": {
                            "properties": {
                              "email": {
                                "example": "ana@example.com",
                                "type": "string"
                              },
                              "organizer": {
                                "type": "boolean"
                              },
                              "self": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "email",
                              "organizer",
                              "self"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "deal": {
                          "properties": {
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "title": {
                              "example": "Acme",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "title"
                          ],
                          "type": "object"
                        },
                        "description": {
                          "type": "null"
                        },
                        "ends_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "ends_on": {
                          "type": "null"
                        },
                        "google_event_id": {
                          "type": "string"
                        },
                        "html_link": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "location": {
                          "type": "null"
                        },
                        "manageable": {
                          "type": "boolean"
                        },
                        "meet_link": {
                          "type": "string"
                        },
                        "organizer_email": {
                          "type": "null"
                        },
                        "origin": {
                          "type": "string"
                        },
                        "starts_at": {
                          "example": "2026-01-15T09:30:00Z",
                          "type": "string"
                        },
                        "starts_on": {
                          "type": "null"
                        },
                        "status": {
                          "type": "string"
                        },
                        "title": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "all_day",
                        "attendees",
                        "deal",
                        "description",
                        "ends_at",
                        "ends_on",
                        "google_event_id",
                        "html_link",
                        "id",
                        "location",
                        "manageable",
                        "meet_link",
                        "organizer_email",
                        "origin",
                        "starts_at",
                        "starts_on",
                        "status",
                        "title"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "contacts",
                    "deals",
                    "event"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Gone"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a calendar event",
        "tags": [
          "Calendar Events"
        ]
      }
    },
    "/api/v1/campaign_templates": {
      "get": {
        "operationId": "get-campaign-templates",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "builtin": {
                      "items": {
                        "properties": {
                          "builtin": {
                            "type": "boolean"
                          },
                          "channel": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "message_template": {
                            "type": "string"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "steps": {
                            "items": {
                              "properties": {
                                "delay_days": {
                                  "type": "integer"
                                },
                                "message_template": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "delay_days",
                                "message_template"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "builtin",
                          "channel",
                          "description",
                          "id",
                          "message_template",
                          "name",
                          "steps"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "templates": {
                      "items": {
                        "properties": {
                          "channel": {
                            "type": "string"
                          },
                          "created_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "created_by": {
                            "type": "null"
                          },
                          "description": {
                            "type": "null"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "message_template": {
                            "type": "string"
                          },
                          "message_template_b": {
                            "type": "null"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "steps": {
                            "items": {},
                            "type": "array"
                          },
                          "stop_on_reply": {
                            "type": "boolean"
                          },
                          "subject_template": {
                            "type": "null"
                          },
                          "subject_template_b": {
                            "type": "null"
                          },
                          "updated_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          }
                        },
                        "required": [
                          "channel",
                          "created_at",
                          "created_by",
                          "description",
                          "id",
                          "message_template",
                          "message_template_b",
                          "name",
                          "steps",
                          "stop_on_reply",
                          "subject_template",
                          "subject_template_b",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "builtin",
                    "templates"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "feature": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "feature"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          }
        },
        "summary": "List campaign templates",
        "tags": [
          "Campaign Templates"
        ]
      },
      "post": {
        "operationId": "post-campaign-templates",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "subject_template": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "subject_template"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a campaign template",
        "tags": [
          "Campaign Templates"
        ]
      }
    },
    "/api/v1/campaign_templates/{id}": {
      "delete": {
        "operationId": "delete-campaign-templates-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Delete a campaign template",
        "tags": [
          "Campaign Templates"
        ]
      },
      "get": {
        "operationId": "get-campaign-templates-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "channel": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "channel",
                    "created_at",
                    "created_by",
                    "description",
                    "id",
                    "message_template",
                    "message_template_b",
                    "name",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a campaign template",
        "tags": [
          "Campaign Templates"
        ]
      },
      "patch": {
        "operationId": "patch-campaign-templates-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "example": "Acme",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "channel": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "channel",
                    "created_at",
                    "created_by",
                    "description",
                    "id",
                    "message_template",
                    "message_template_b",
                    "name",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update a campaign template",
        "tags": [
          "Campaign Templates"
        ]
      }
    },
    "/api/v1/campaigns": {
      "get": {
        "operationId": "get-campaigns",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {},
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "feature": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "feature"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          }
        },
        "summary": "List campaigns",
        "tags": [
          "Campaigns"
        ]
      },
      "post": {
        "operationId": "post-campaigns",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "message_template": {
                    "type": "string"
                  },
                  "name": {
                    "example": "Acme",
                    "type": "string"
                  }
                },
                "required": [
                  "message_template",
                  "name"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "audience": {
                      "properties": {},
                      "type": "object"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "daily_limit": {
                      "type": "null"
                    },
                    "error_reason": {
                      "type": "null"
                    },
                    "fallback_timezone": {
                      "type": "null"
                    },
                    "gmail_connection_id": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "launched_at": {
                      "type": "null"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": "null"
                    },
                    "send_window": {
                      "type": "null"
                    },
                    "stats": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "skipped": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "pending",
                        "sent",
                        "skipped",
                        "total"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "audience",
                    "channel",
                    "completed_at",
                    "created_at",
                    "created_by",
                    "daily_limit",
                    "error_reason",
                    "fallback_timezone",
                    "gmail_connection_id",
                    "id",
                    "launched_at",
                    "message_template",
                    "message_template_b",
                    "name",
                    "scheduled_at",
                    "send_window",
                    "stats",
                    "status",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "feature": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "feature"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "attribution_window_days": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "daily_limit": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "gmail_connection": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{campaign_id}/recipients": {
      "get": {
        "operationId": "get-campaigns-by-campaign-id-recipients",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "campaign_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "attempts": {
                        "type": "integer"
                      },
                      "contact": {
                        "properties": {
                          "first_name": {
                            "example": "Ana",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "last_name": {
                            "example": "Kovac",
                            "type": "string"
                          }
                        },
                        "required": [
                          "first_name",
                          "id",
                          "last_name"
                        ],
                        "type": "object"
                      },
                      "current_step": {
                        "type": "integer"
                      },
                      "error_reason": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "next_send_at": {
                        "type": "null"
                      },
                      "replied_at": {
                        "type": "null"
                      },
                      "resolved_timezone": {
                        "type": "null"
                      },
                      "sent_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "telegram_peer_id": {
                        "type": "string"
                      },
                      "variant": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "attempts",
                      "contact",
                      "current_step",
                      "error_reason",
                      "id",
                      "next_send_at",
                      "replied_at",
                      "resolved_timezone",
                      "sent_at",
                      "status",
                      "telegram_peer_id",
                      "variant"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List recipients for a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}": {
      "delete": {
        "operationId": "delete-campaigns-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Delete a campaign",
        "tags": [
          "Campaigns"
        ]
      },
      "get": {
        "operationId": "get-campaigns-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "audience": {
                      "properties": {},
                      "type": "object"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "daily_limit": {
                      "type": "null"
                    },
                    "error_reason": {
                      "type": "null"
                    },
                    "fallback_timezone": {
                      "type": "null"
                    },
                    "gmail_connection_id": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "launched_at": {
                      "type": "null"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": "null"
                    },
                    "send_window": {
                      "type": "null"
                    },
                    "stats": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "skipped": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "pending",
                        "sent",
                        "skipped",
                        "total"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "audience",
                    "channel",
                    "completed_at",
                    "created_at",
                    "created_by",
                    "daily_limit",
                    "error_reason",
                    "fallback_timezone",
                    "gmail_connection_id",
                    "id",
                    "launched_at",
                    "message_template",
                    "message_template_b",
                    "name",
                    "scheduled_at",
                    "send_window",
                    "stats",
                    "status",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a campaign",
        "tags": [
          "Campaigns"
        ]
      },
      "patch": {
        "operationId": "patch-campaigns-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "send_window": {
                    "type": "null"
                  },
                  "steps": {
                    "items": {},
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "audience": {
                      "properties": {},
                      "type": "object"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "daily_limit": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "error_reason": {
                      "type": "null"
                    },
                    "fallback_timezone": {
                      "type": "null"
                    },
                    "gmail_connection_id": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "launched_at": {
                      "type": "null"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": "null"
                    },
                    "send_window": {
                      "type": "null"
                    },
                    "stats": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "skipped": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "pending",
                        "sent",
                        "skipped",
                        "total"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "audience",
                    "channel",
                    "completed_at",
                    "created_at",
                    "created_by",
                    "daily_limit",
                    "error_reason",
                    "fallback_timezone",
                    "gmail_connection_id",
                    "id",
                    "launched_at",
                    "message_template",
                    "message_template_b",
                    "name",
                    "scheduled_at",
                    "send_window",
                    "stats",
                    "status",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/cancel": {
      "post": {
        "operationId": "post-campaigns-by-id-cancel",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "audience": {
                      "properties": {},
                      "type": "object"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "completed_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "daily_limit": {
                      "type": "null"
                    },
                    "error_reason": {
                      "type": "null"
                    },
                    "fallback_timezone": {
                      "type": "null"
                    },
                    "gmail_connection_id": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "launched_at": {
                      "type": "null"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": "null"
                    },
                    "send_window": {
                      "type": "null"
                    },
                    "stats": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "skipped": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "pending",
                        "sent",
                        "skipped",
                        "total"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "audience",
                    "channel",
                    "completed_at",
                    "created_at",
                    "created_by",
                    "daily_limit",
                    "error_reason",
                    "fallback_timezone",
                    "gmail_connection_id",
                    "id",
                    "launched_at",
                    "message_template",
                    "message_template_b",
                    "name",
                    "scheduled_at",
                    "send_window",
                    "stats",
                    "status",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Cancel a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/duplicate": {
      "post": {
        "operationId": "post-campaigns-by-id-duplicate",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "audience": {
                      "properties": {
                        "tag_ids": {
                          "items": {
                            "type": "integer"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "daily_limit": {
                      "type": "null"
                    },
                    "error_reason": {
                      "type": "null"
                    },
                    "fallback_timezone": {
                      "type": "null"
                    },
                    "gmail_connection_id": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "launched_at": {
                      "type": "null"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": "null"
                    },
                    "send_window": {
                      "type": "null"
                    },
                    "stats": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "skipped": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "pending",
                        "sent",
                        "skipped",
                        "total"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {
                        "properties": {
                          "delay_days": {
                            "type": "integer"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "message_template": {
                            "type": "string"
                          },
                          "message_template_b": {
                            "type": "null"
                          },
                          "position": {
                            "example": 1,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "delay_days",
                          "id",
                          "message_template",
                          "message_template_b",
                          "position"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "audience",
                    "channel",
                    "completed_at",
                    "created_at",
                    "created_by",
                    "daily_limit",
                    "error_reason",
                    "fallback_timezone",
                    "gmail_connection_id",
                    "id",
                    "launched_at",
                    "message_template",
                    "message_template_b",
                    "name",
                    "scheduled_at",
                    "send_window",
                    "stats",
                    "status",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Duplicate a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/launch": {
      "post": {
        "operationId": "post-campaigns-by-id-launch",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "audience": {
                      "properties": {
                        "excluded_contact_ids": {
                          "items": {
                            "type": "integer"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "daily_limit": {
                      "type": "null"
                    },
                    "error_reason": {
                      "type": "null"
                    },
                    "fallback_timezone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "gmail_connection_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "launched_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "send_window": {
                      "properties": {
                        "days": {
                          "items": {
                            "type": "integer"
                          },
                          "type": "array"
                        },
                        "end_hour": {
                          "type": "integer"
                        },
                        "start_hour": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "days",
                        "end_hour",
                        "start_hour"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "stats": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "skipped": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "pending",
                        "sent",
                        "skipped",
                        "total"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "audience",
                    "channel",
                    "completed_at",
                    "created_at",
                    "created_by",
                    "daily_limit",
                    "error_reason",
                    "fallback_timezone",
                    "gmail_connection_id",
                    "id",
                    "launched_at",
                    "message_template",
                    "message_template_b",
                    "name",
                    "scheduled_at",
                    "send_window",
                    "stats",
                    "status",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Launch a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/pause": {
      "post": {
        "operationId": "post-campaigns-by-id-pause",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Pause a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/preview": {
      "get": {
        "operationId": "get-campaigns-by-id-preview",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "audience_count": {
                      "type": "integer"
                    },
                    "samples": {
                      "items": {
                        "properties": {
                          "contact_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "contact_name": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "message_b": {
                            "type": "string"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "subject_b": {
                            "type": "string"
                          },
                          "warnings": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "contact_id",
                          "contact_name",
                          "message",
                          "warnings"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "audience_count",
                    "samples"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Preview a campaign",
        "tags": [
          "Campaigns"
        ]
      },
      "post": {
        "operationId": "post-campaigns-by-id-preview",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "audience": {
                    "properties": {
                      "excluded_contact_ids": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "excluded_contact_ids"
                    ],
                    "type": "object"
                  },
                  "message_template": {
                    "type": "string"
                  }
                },
                "required": [
                  "audience",
                  "message_template"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "audience_count": {
                      "type": "integer"
                    },
                    "samples": {
                      "items": {
                        "properties": {
                          "contact_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "contact_name": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "warnings": {
                            "items": {},
                            "type": "array"
                          }
                        },
                        "required": [
                          "contact_id",
                          "contact_name",
                          "message",
                          "warnings"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "audience_count",
                    "samples"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Preview a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/report": {
      "get": {
        "operationId": "get-campaigns-by-id-report",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "funnel": {
                      "properties": {
                        "moved": {
                          "type": "integer"
                        },
                        "replied": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "won": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "moved",
                        "replied",
                        "sent",
                        "won"
                      ],
                      "type": "object"
                    },
                    "revenue": {
                      "properties": {
                        "touched_pipeline": {
                          "properties": {
                            "EUR": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "won_value": {
                          "properties": {
                            "EUR": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "required": [
                        "touched_pipeline",
                        "won_value"
                      ],
                      "type": "object"
                    },
                    "steps": {
                      "items": {
                        "properties": {
                          "moved": {
                            "type": "integer"
                          },
                          "position": {
                            "example": 1,
                            "type": "integer"
                          },
                          "replied": {
                            "type": "integer"
                          },
                          "sent": {
                            "type": "integer"
                          },
                          "won": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "moved",
                          "position",
                          "replied",
                          "sent",
                          "won"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "variants": {
                      "properties": {
                        "a": {
                          "properties": {
                            "moved": {
                              "type": "integer"
                            },
                            "replied": {
                              "type": "integer"
                            },
                            "sent": {
                              "type": "integer"
                            },
                            "won": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "moved",
                            "replied",
                            "sent",
                            "won"
                          ],
                          "type": "object"
                        },
                        "b": {
                          "properties": {
                            "moved": {
                              "type": "integer"
                            },
                            "replied": {
                              "type": "integer"
                            },
                            "sent": {
                              "type": "integer"
                            },
                            "won": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "moved",
                            "replied",
                            "sent",
                            "won"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "a",
                        "b"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "funnel",
                    "revenue",
                    "steps",
                    "variants"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a campaign report",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/resume": {
      "post": {
        "operationId": "post-campaigns-by-id-resume",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attribution_window_days": {
                      "type": "integer"
                    },
                    "audience": {
                      "properties": {},
                      "type": "object"
                    },
                    "channel": {
                      "type": "string"
                    },
                    "completed_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "daily_limit": {
                      "type": "null"
                    },
                    "error_reason": {
                      "type": "null"
                    },
                    "fallback_timezone": {
                      "type": "null"
                    },
                    "gmail_connection_id": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "launched_at": {
                      "type": "null"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "scheduled_at": {
                      "type": "null"
                    },
                    "send_window": {
                      "type": "null"
                    },
                    "stats": {
                      "properties": {
                        "failed": {
                          "type": "integer"
                        },
                        "pending": {
                          "type": "integer"
                        },
                        "sent": {
                          "type": "integer"
                        },
                        "skipped": {
                          "type": "integer"
                        },
                        "total": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "failed",
                        "pending",
                        "sent",
                        "skipped",
                        "total"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "steps": {
                      "items": {},
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "attribution_window_days",
                    "audience",
                    "channel",
                    "completed_at",
                    "created_at",
                    "created_by",
                    "daily_limit",
                    "error_reason",
                    "fallback_timezone",
                    "gmail_connection_id",
                    "id",
                    "launched_at",
                    "message_template",
                    "message_template_b",
                    "name",
                    "scheduled_at",
                    "send_window",
                    "stats",
                    "status",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Resume a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/campaigns/{id}/save_as_template": {
      "post": {
        "operationId": "post-campaigns-by-id-save-as-template",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "name": {
                    "example": "Acme",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "channel": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "message_template": {
                      "type": "string"
                    },
                    "message_template_b": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "steps": {
                      "items": {
                        "properties": {
                          "delay_days": {
                            "type": "integer"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "message_template": {
                            "type": "string"
                          },
                          "message_template_b": {
                            "type": "null"
                          },
                          "position": {
                            "example": 1,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "delay_days",
                          "id",
                          "message_template",
                          "message_template_b",
                          "position"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "stop_on_reply": {
                      "type": "boolean"
                    },
                    "subject_template": {
                      "type": "null"
                    },
                    "subject_template_b": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "channel",
                    "created_at",
                    "created_by",
                    "description",
                    "id",
                    "message_template",
                    "message_template_b",
                    "name",
                    "steps",
                    "stop_on_reply",
                    "subject_template",
                    "subject_template_b",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Save as template a campaign",
        "tags": [
          "Campaigns"
        ]
      }
    },
    "/api/v1/comments/{comment_id}/attachments": {
      "post": {
        "operationId": "post-comments-by-comment-id-attachments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "attachment": {
                    "properties": {
                      "signed_id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "signed_id"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "attachment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "byte_size": {
                      "type": "integer"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "extension": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "preview_url": {
                      "type": "null"
                    },
                    "thumbnail_url": {
                      "type": "null"
                    },
                    "url": {
                      "example": "https://example.com",
                      "type": "string"
                    }
                  },
                  "required": [
                    "byte_size",
                    "content_type",
                    "created_at",
                    "download_url",
                    "extension",
                    "filename",
                    "id",
                    "preview_url",
                    "thumbnail_url",
                    "url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Add an attachment to a comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/api/v1/comments/{comment_id}/reactions": {
      "post": {
        "operationId": "post-comments-by-comment-id-reactions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "reaction": {
                    "properties": {
                      "emoji": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "emoji"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "reaction"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "emoji": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "user": {
                      "properties": {
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "email",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "emoji",
                    "id",
                    "user"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Add a reaction to a comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/api/v1/comments/{comment_id}/reactions/{id}": {
      "delete": {
        "operationId": "delete-comments-by-comment-id-reactions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "comment_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Remove a reaction from a comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/api/v1/comments/{id}": {
      "delete": {
        "operationId": "delete-comments-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Delete a comment",
        "tags": [
          "Comments"
        ]
      },
      "patch": {
        "operationId": "patch-comments-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comment": {
                    "properties": {
                      "body": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "comment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "anchor": {
                      "type": "null"
                    },
                    "attachments": {
                      "items": {},
                      "type": "array"
                    },
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "edited_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "mentions": {
                      "items": {},
                      "type": "array"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "anchor",
                    "attachments",
                    "body",
                    "created_at",
                    "edited_at",
                    "id",
                    "mentions",
                    "reactions",
                    "updated_at",
                    "user"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Update a comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/api/v1/comments/{id}/discard": {
      "patch": {
        "operationId": "patch-comments-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Move a comment to the recycle bin",
        "tags": [
          "Comments"
        ]
      }
    },
    "/api/v1/comments/{id}/restore": {
      "patch": {
        "operationId": "patch-comments-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "anchor": {
                      "type": "null"
                    },
                    "attachments": {
                      "items": {},
                      "type": "array"
                    },
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "edited_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "mentions": {
                      "items": {},
                      "type": "array"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "anchor",
                    "attachments",
                    "body",
                    "created_at",
                    "edited_at",
                    "id",
                    "mentions",
                    "reactions",
                    "updated_at",
                    "user"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Restore a comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/api/v1/companies": {
      "get": {
        "operationId": "get-companies",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "city",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "created_from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "created_to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "creator",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "industry",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "attachments_count": {
                        "type": "integer"
                      },
                      "avatar_url": {
                        "type": "null"
                      },
                      "children": {
                        "items": {},
                        "type": "array"
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "company_size": {
                        "type": "null"
                      },
                      "contacts": {
                        "items": {},
                        "type": "array"
                      },
                      "country": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "custom_fields": {
                        "items": {
                          "properties": {
                            "definition_id": {
                              "example": 7,
                              "type": "integer"
                            },
                            "field_type": {
                              "type": "string"
                            },
                            "name": {
                              "example": "Acme",
                              "type": "string"
                            },
                            "options": {
                              "type": "null"
                            },
                            "placeholder": {
                              "type": "null"
                            },
                            "value": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "definition_id",
                            "field_type",
                            "name",
                            "options",
                            "placeholder",
                            "value"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "description": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "industry": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "parent": {
                        "type": "null"
                      },
                      "phone": {
                        "type": "null"
                      },
                      "postal_code": {
                        "type": "null"
                      },
                      "region": {
                        "type": "null"
                      },
                      "registration_number": {
                        "type": "null"
                      },
                      "street": {
                        "type": "null"
                      },
                      "tags": {
                        "items": {},
                        "type": "array"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "vat_number": {
                        "type": "null"
                      },
                      "website": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "attachments_count",
                      "avatar_url",
                      "children",
                      "city",
                      "company_size",
                      "contacts",
                      "country",
                      "created_at",
                      "created_by",
                      "custom_fields",
                      "description",
                      "id",
                      "industry",
                      "name",
                      "parent",
                      "phone",
                      "postal_code",
                      "region",
                      "registration_number",
                      "street",
                      "tags",
                      "updated_at",
                      "vat_number",
                      "website"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "List companies",
        "tags": [
          "Companies"
        ]
      },
      "post": {
        "operationId": "post-companies",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "company": {
                    "properties": {
                      "company_size": {
                        "type": "string"
                      },
                      "industry": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "region": {
                        "type": "string"
                      },
                      "website": {
                        "example": "https://example.com",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "company"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "children": {
                      "items": {},
                      "type": "array"
                    },
                    "city": {
                      "type": "null"
                    },
                    "company_size": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "country": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "industry": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "parent": {
                      "type": "null"
                    },
                    "phone": {
                      "type": "null"
                    },
                    "postal_code": {
                      "type": "null"
                    },
                    "region": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "registration_number": {
                      "type": "null"
                    },
                    "street": {
                      "type": "null"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "vat_number": {
                      "type": "null"
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "children",
                    "city",
                    "company_size",
                    "contacts",
                    "country",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "id",
                    "industry",
                    "name",
                    "parent",
                    "phone",
                    "postal_code",
                    "region",
                    "registration_number",
                    "street",
                    "tags",
                    "updated_at",
                    "vat_number",
                    "website"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "base": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "company_size": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "industry": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "parent": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "parent_id": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "region": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "value": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/bulk_destroy": {
      "delete": {
        "operationId": "delete-companies-bulk-destroy",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk delete companies",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/bulk_discard": {
      "patch": {
        "operationId": "patch-companies-bulk-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk move companies to the recycle bin",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{company_id}/attachments": {
      "get": {
        "operationId": "get-companies-by-company-id-attachments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "byte_size": {
                        "type": "integer"
                      },
                      "content_type": {
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "download_url": {
                        "type": "string"
                      },
                      "extension": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "preview_url": {
                        "type": "null"
                      },
                      "thumbnail_url": {
                        "type": "null"
                      },
                      "url": {
                        "example": "https://example.com",
                        "type": "string"
                      }
                    },
                    "required": [
                      "byte_size",
                      "content_type",
                      "created_at",
                      "download_url",
                      "extension",
                      "filename",
                      "id",
                      "preview_url",
                      "thumbnail_url",
                      "url"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List attachments for a company",
        "tags": [
          "Companies"
        ]
      },
      "post": {
        "operationId": "post-companies-by-company-id-attachments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "attachment": {
                    "properties": {
                      "signed_id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "signed_id"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "attachment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "byte_size": {
                      "type": "integer"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "extension": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "preview_url": {
                      "type": "null"
                    },
                    "thumbnail_url": {
                      "type": "null"
                    },
                    "url": {
                      "example": "https://example.com",
                      "type": "string"
                    }
                  },
                  "required": [
                    "byte_size",
                    "content_type",
                    "created_at",
                    "download_url",
                    "extension",
                    "filename",
                    "id",
                    "preview_url",
                    "thumbnail_url",
                    "url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Add an attachment to a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{company_id}/comments": {
      "get": {
        "operationId": "get-companies-by-company-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "anchor": {
                        "type": "null"
                      },
                      "attachments": {
                        "items": {},
                        "type": "array"
                      },
                      "body": {
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "edited_at": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "mentions": {
                        "items": {},
                        "type": "array"
                      },
                      "reactions": {
                        "items": {},
                        "type": "array"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "user": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "anchor",
                      "attachments",
                      "body",
                      "created_at",
                      "edited_at",
                      "id",
                      "mentions",
                      "reactions",
                      "updated_at",
                      "user"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List comments for a company",
        "tags": [
          "Companies"
        ]
      },
      "post": {
        "operationId": "post-companies-by-company-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comment": {
                    "properties": {
                      "body": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "comment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "anchor": {
                      "type": "null"
                    },
                    "attachments": {
                      "items": {},
                      "type": "array"
                    },
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "edited_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "mentions": {
                      "items": {},
                      "type": "array"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "anchor",
                    "attachments",
                    "body",
                    "created_at",
                    "edited_at",
                    "id",
                    "mentions",
                    "reactions",
                    "updated_at",
                    "user"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Add a comment to a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{company_id}/linked-pages": {
      "get": {
        "operationId": "get-companies-by-company-id-linked-pages",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "company_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "doc": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "title"
                        ],
                        "type": "object"
                      },
                      "doc_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "icon": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "doc",
                      "doc_id",
                      "icon",
                      "id",
                      "title",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List linked pages for a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}": {
      "delete": {
        "operationId": "delete-companies-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Delete a company",
        "tags": [
          "Companies"
        ]
      },
      "get": {
        "operationId": "get-companies-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "children": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "city": {
                      "type": "null"
                    },
                    "company_size": {
                      "type": "null"
                    },
                    "contacts": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "full_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "link_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "role": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "email",
                          "full_name",
                          "id",
                          "link_id",
                          "role"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "country": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "industry": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "parent": {
                      "type": "null"
                    },
                    "phone": {
                      "type": "null"
                    },
                    "postal_code": {
                      "type": "null"
                    },
                    "region": {
                      "type": "null"
                    },
                    "registration_number": {
                      "type": "null"
                    },
                    "street": {
                      "type": "null"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "vat_number": {
                      "type": "null"
                    },
                    "website": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "children",
                    "city",
                    "company_size",
                    "contacts",
                    "country",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "id",
                    "industry",
                    "name",
                    "parent",
                    "phone",
                    "postal_code",
                    "region",
                    "registration_number",
                    "street",
                    "tags",
                    "updated_at",
                    "vat_number",
                    "website"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a company",
        "tags": [
          "Companies"
        ]
      },
      "patch": {
        "operationId": "patch-companies-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "company": {
                    "properties": {
                      "industry": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "company"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "children": {
                      "items": {},
                      "type": "array"
                    },
                    "city": {
                      "type": "null"
                    },
                    "company_size": {
                      "type": "null"
                    },
                    "contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "country": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "industry": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "parent": {
                      "type": "null"
                    },
                    "phone": {
                      "type": "null"
                    },
                    "postal_code": {
                      "type": "null"
                    },
                    "region": {
                      "type": "null"
                    },
                    "registration_number": {
                      "type": "null"
                    },
                    "street": {
                      "type": "null"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "vat_number": {
                      "type": "null"
                    },
                    "website": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "children",
                    "city",
                    "company_size",
                    "contacts",
                    "country",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "id",
                    "industry",
                    "name",
                    "parent",
                    "phone",
                    "postal_code",
                    "region",
                    "registration_number",
                    "street",
                    "tags",
                    "updated_at",
                    "vat_number",
                    "website"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "industry": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "parent_id": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/discard": {
      "patch": {
        "operationId": "patch-companies-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Move a company to the recycle bin",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/feed_events": {
      "get": {
        "operationId": "get-companies-by-id-feed-events",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "action": {
                        "type": "string"
                      },
                      "actor": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "label": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "metadata": {
                        "type": "null"
                      },
                      "source_type": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "action",
                      "actor",
                      "created_at",
                      "id",
                      "label",
                      "metadata",
                      "source_type"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List feed events for a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/restore": {
      "patch": {
        "operationId": "patch-companies-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "children": {
                      "items": {},
                      "type": "array"
                    },
                    "city": {
                      "type": "null"
                    },
                    "company_size": {
                      "type": "null"
                    },
                    "contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "country": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "industry": {
                      "type": "null"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "parent": {
                      "type": "null"
                    },
                    "phone": {
                      "type": "null"
                    },
                    "postal_code": {
                      "type": "null"
                    },
                    "region": {
                      "type": "null"
                    },
                    "registration_number": {
                      "type": "null"
                    },
                    "street": {
                      "type": "null"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "vat_number": {
                      "type": "null"
                    },
                    "website": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "children",
                    "city",
                    "company_size",
                    "contacts",
                    "country",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "id",
                    "industry",
                    "name",
                    "parent",
                    "phone",
                    "postal_code",
                    "region",
                    "registration_number",
                    "street",
                    "tags",
                    "updated_at",
                    "vat_number",
                    "website"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Restore a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/subscribe": {
      "post": {
        "operationId": "post-companies-by-id-subscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Subscribe to a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/subscribers": {
      "post": {
        "operationId": "post-companies-by-id-subscribers",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "user_id": {
                    "example": 7,
                    "type": "integer"
                  }
                },
                "required": [
                  "user_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Add a subscriber to a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/subscribers/{user_id}": {
      "delete": {
        "operationId": "delete-companies-by-id-subscribers-by-user-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {},
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Remove a subscriber from a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/subscription": {
      "get": {
        "operationId": "get-companies-by-id-subscription",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get your subscription to a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/companies/{id}/unsubscribe": {
      "delete": {
        "operationId": "delete-companies-by-id-unsubscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Unsubscribe from a company",
        "tags": [
          "Companies"
        ]
      }
    },
    "/api/v1/contacts": {
      "get": {
        "operationId": "get-contacts",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "company",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "creator",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "description": "Filter by custom field value, keyed by definition id, e.g. `custom_field[12]=ruby`.",
            "explode": true,
            "in": "query",
            "name": "custom_field",
            "schema": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "style": "deepObject"
          },
          {
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "nonsense",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "not_a_filter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "tag",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "telegram_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "title",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "attachments_count": {
                        "type": "integer"
                      },
                      "avatar_url": {
                        "type": "null"
                      },
                      "companies": {
                        "items": {
                          "properties": {
                            "avatar_url": {
                              "type": "null"
                            },
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "link_id": {
                              "example": 7,
                              "type": "integer"
                            },
                            "name": {
                              "example": "Acme",
                              "type": "string"
                            },
                            "role": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "avatar_url",
                            "id",
                            "link_id",
                            "name",
                            "role"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "custom_fields": {
                        "items": {
                          "properties": {
                            "definition_id": {
                              "example": 7,
                              "type": "integer"
                            },
                            "field_type": {
                              "type": "string"
                            },
                            "name": {
                              "example": "Acme",
                              "type": "string"
                            },
                            "options": {
                              "items": {
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ]
                            },
                            "placeholder": {
                              "type": "null"
                            },
                            "value": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "definition_id",
                            "field_type",
                            "name",
                            "options",
                            "placeholder",
                            "value"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "description": {
                        "type": "null"
                      },
                      "discord": {
                        "type": "null"
                      },
                      "email": {
                        "example": "ana@example.com",
                        "type": "string"
                      },
                      "first_name": {
                        "example": "Ana",
                        "type": "string"
                      },
                      "full_name": {
                        "type": "string"
                      },
                      "github": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "intercom": {
                        "type": "null"
                      },
                      "last_name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "linkedin": {
                        "type": "null"
                      },
                      "phone": {
                        "type": "null"
                      },
                      "tags": {
                        "items": {
                          "properties": {
                            "color": {
                              "example": "#6366f1",
                              "type": "string"
                            },
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "name": {
                              "example": "Acme",
                              "type": "string"
                            }
                          },
                          "required": [
                            "color",
                            "id",
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "telegram": {
                        "type": "null"
                      },
                      "telegram_id": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "timezone": {
                        "type": "null"
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "x": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "attachments_count",
                      "avatar_url",
                      "companies",
                      "created_at",
                      "created_by",
                      "custom_fields",
                      "description",
                      "discord",
                      "email",
                      "first_name",
                      "full_name",
                      "github",
                      "id",
                      "intercom",
                      "last_name",
                      "linkedin",
                      "phone",
                      "tags",
                      "telegram",
                      "telegram_id",
                      "timezone",
                      "title",
                      "updated_at",
                      "x"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List contacts",
        "tags": [
          "Contacts"
        ]
      },
      "post": {
        "operationId": "post-contacts",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "contact": {
                    "properties": {
                      "custom_fields": {
                        "additionalProperties": {
                          "nullable": true,
                          "type": "string"
                        },
                        "description": "Custom field values keyed by definition id. null or blank clears a field.",
                        "type": "object"
                      },
                      "email": {
                        "example": "ana@example.com",
                        "type": "string"
                      },
                      "first_name": {
                        "example": "Ana",
                        "type": "string"
                      },
                      "github": {
                        "type": "string"
                      },
                      "last_name": {
                        "example": "Kovac",
                        "type": "string"
                      },
                      "phone": {
                        "example": "+381601234567",
                        "type": "string"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "contact"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "companies": {
                      "items": {},
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "custom_fields": {
                      "items": {
                        "properties": {
                          "definition_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "field_type": {
                            "type": "string"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "options": {
                            "type": "null"
                          },
                          "placeholder": {
                            "type": "null"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "definition_id",
                          "field_type",
                          "name",
                          "options",
                          "placeholder",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discord": {
                      "type": "null"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "first_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "full_name": {
                      "type": "string"
                    },
                    "github": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "intercom": {
                      "type": "null"
                    },
                    "last_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "linkedin": {
                      "type": "null"
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "telegram": {
                      "type": "null"
                    },
                    "telegram_id": {
                      "type": "null"
                    },
                    "timezone": {
                      "type": "null"
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "x": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "companies",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "discord",
                    "email",
                    "first_name",
                    "full_name",
                    "github",
                    "id",
                    "intercom",
                    "last_name",
                    "linkedin",
                    "phone",
                    "tags",
                    "telegram",
                    "telegram_id",
                    "timezone",
                    "title",
                    "updated_at",
                    "x"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "base": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "email": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "value": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/bulk_destroy": {
      "delete": {
        "operationId": "delete-contacts-bulk-destroy",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk delete contacts",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/bulk_discard": {
      "patch": {
        "operationId": "patch-contacts-bulk-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk move contacts to the recycle bin",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{contact_id}/attachments": {
      "get": {
        "operationId": "get-contacts-by-contact-id-attachments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "byte_size": {
                        "type": "integer"
                      },
                      "content_type": {
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "download_url": {
                        "type": "string"
                      },
                      "extension": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "preview_url": {
                        "type": "null"
                      },
                      "thumbnail_url": {
                        "type": "null"
                      },
                      "url": {
                        "example": "https://example.com",
                        "type": "string"
                      }
                    },
                    "required": [
                      "byte_size",
                      "content_type",
                      "created_at",
                      "download_url",
                      "extension",
                      "filename",
                      "id",
                      "preview_url",
                      "thumbnail_url",
                      "url"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List attachments for a contact",
        "tags": [
          "Contacts"
        ]
      },
      "post": {
        "operationId": "post-contacts-by-contact-id-attachments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "attachment": {
                    "properties": {
                      "signed_id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "signed_id"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "attachment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "byte_size": {
                      "type": "integer"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "extension": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "preview_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "thumbnail_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "example": "https://example.com",
                      "type": "string"
                    }
                  },
                  "required": [
                    "byte_size",
                    "content_type",
                    "created_at",
                    "download_url",
                    "extension",
                    "filename",
                    "id",
                    "preview_url",
                    "thumbnail_url",
                    "url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "base": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "base"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "file": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "file"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Content Too Large"
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "file": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "file"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unsupported Media Type"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add an attachment to a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{contact_id}/calendar-events": {
      "get": {
        "operationId": "get-contacts-by-contact-id-calendar-events",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "past": {
                      "items": {
                        "properties": {
                          "all_day": {
                            "type": "boolean"
                          },
                          "ends_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "manageable": {
                            "type": "boolean"
                          },
                          "meet_link": {
                            "type": "null"
                          },
                          "organizer_email": {
                            "type": "null"
                          },
                          "starts_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "null"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "all_day",
                          "ends_at",
                          "id",
                          "manageable",
                          "meet_link",
                          "organizer_email",
                          "starts_at",
                          "starts_on",
                          "title"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "past_count": {
                      "type": "integer"
                    },
                    "upcoming": {
                      "items": {
                        "properties": {
                          "all_day": {
                            "type": "boolean"
                          },
                          "ends_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "manageable": {
                            "type": "boolean"
                          },
                          "meet_link": {
                            "type": "null"
                          },
                          "organizer_email": {
                            "type": "null"
                          },
                          "starts_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "null"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "all_day",
                          "ends_at",
                          "id",
                          "manageable",
                          "meet_link",
                          "organizer_email",
                          "starts_at",
                          "starts_on",
                          "title"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "past",
                    "past_count",
                    "upcoming"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List calendar events for a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{contact_id}/comments": {
      "get": {
        "operationId": "get-contacts-by-contact-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "anchor": {
                        "type": "null"
                      },
                      "attachments": {
                        "items": {},
                        "type": "array"
                      },
                      "body": {
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "edited_at": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "mentions": {
                        "items": {},
                        "type": "array"
                      },
                      "reactions": {
                        "items": {},
                        "type": "array"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "user": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "anchor",
                      "attachments",
                      "body",
                      "created_at",
                      "edited_at",
                      "id",
                      "mentions",
                      "reactions",
                      "updated_at",
                      "user"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List comments for a contact",
        "tags": [
          "Contacts"
        ]
      },
      "post": {
        "operationId": "post-contacts-by-contact-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comment": {
                    "properties": {
                      "body": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "comment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "anchor": {
                      "type": "null"
                    },
                    "attachments": {
                      "items": {},
                      "type": "array"
                    },
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "edited_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "mentions": {
                      "items": {},
                      "type": "array"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "anchor",
                    "attachments",
                    "body",
                    "created_at",
                    "edited_at",
                    "id",
                    "mentions",
                    "reactions",
                    "updated_at",
                    "user"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Add a comment to a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{contact_id}/companies": {
      "get": {
        "operationId": "get-contacts-by-contact-id-companies",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "company": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "id",
                          "name"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "role": {
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "company",
                      "created_at",
                      "id",
                      "role",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List companies for a contact",
        "tags": [
          "Contacts"
        ]
      },
      "post": {
        "operationId": "post-contacts-by-contact-id-companies",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "company_contact": {
                    "properties": {
                      "company_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "role": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "company_id",
                      "role"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "company_contact"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "company": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "role": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "company",
                    "created_at",
                    "id",
                    "role",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Link a company to a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{contact_id}/companies/{id}": {
      "delete": {
        "operationId": "delete-contacts-by-contact-id-companies-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Unlink a company from a contact",
        "tags": [
          "Contacts"
        ]
      },
      "patch": {
        "operationId": "patch-contacts-by-contact-id-companies-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "company_contact": {
                    "properties": {
                      "role": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "role"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "company_contact"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "company": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "role": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "company",
                    "created_at",
                    "id",
                    "role",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update a contact-company link",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{contact_id}/linked-pages": {
      "get": {
        "operationId": "get-contacts-by-contact-id-linked-pages",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "doc": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "title"
                        ],
                        "type": "object"
                      },
                      "doc_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "icon": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "doc",
                      "doc_id",
                      "icon",
                      "id",
                      "title",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List linked pages for a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}": {
      "delete": {
        "operationId": "delete-contacts-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Delete a contact",
        "tags": [
          "Contacts"
        ]
      },
      "get": {
        "operationId": "get-contacts-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "companies": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "link_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "id",
                          "link_id",
                          "name",
                          "role"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discord": {
                      "type": "null"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "full_name": {
                      "type": "string"
                    },
                    "github": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "intercom": {
                      "type": "null"
                    },
                    "last_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "linkedin": {
                      "type": "null"
                    },
                    "phone": {
                      "type": "null"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "telegram": {
                      "type": "null"
                    },
                    "telegram_id": {
                      "type": "null"
                    },
                    "timezone": {
                      "type": "null"
                    },
                    "title": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "x": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "companies",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "discord",
                    "email",
                    "first_name",
                    "full_name",
                    "github",
                    "id",
                    "intercom",
                    "last_name",
                    "linkedin",
                    "phone",
                    "tags",
                    "telegram",
                    "telegram_id",
                    "timezone",
                    "title",
                    "updated_at",
                    "x"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a contact",
        "tags": [
          "Contacts"
        ]
      },
      "patch": {
        "operationId": "patch-contacts-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "contact": {
                    "properties": {
                      "custom_fields": {
                        "additionalProperties": {
                          "nullable": true,
                          "type": "string"
                        },
                        "description": "Custom field values keyed by definition id. null or blank clears a field.",
                        "type": "object"
                      },
                      "email": {
                        "example": "ana@example.com",
                        "type": "string"
                      },
                      "first_name": {
                        "example": "Ana",
                        "type": "string"
                      },
                      "phone": {
                        "example": "+381601234567",
                        "type": "string"
                      },
                      "tag_ids": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "contact"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "companies": {
                      "items": {},
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "custom_fields": {
                      "items": {
                        "properties": {
                          "definition_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "field_type": {
                            "type": "string"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "options": {
                            "type": "null"
                          },
                          "placeholder": {
                            "type": "null"
                          },
                          "value": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "definition_id",
                          "field_type",
                          "name",
                          "options",
                          "placeholder",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discord": {
                      "type": "null"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "full_name": {
                      "type": "string"
                    },
                    "github": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "intercom": {
                      "type": "null"
                    },
                    "last_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "linkedin": {
                      "type": "null"
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tags": {
                      "items": {
                        "properties": {
                          "color": {
                            "example": "#6366f1",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "color",
                          "id",
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "telegram": {
                      "type": "null"
                    },
                    "telegram_id": {
                      "type": "null"
                    },
                    "timezone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "x": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "companies",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "discord",
                    "email",
                    "first_name",
                    "full_name",
                    "github",
                    "id",
                    "intercom",
                    "last_name",
                    "linkedin",
                    "phone",
                    "tags",
                    "telegram",
                    "telegram_id",
                    "timezone",
                    "title",
                    "updated_at",
                    "x"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "base": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "custom_fields": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "timezone": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "value": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/discard": {
      "patch": {
        "operationId": "patch-contacts-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Move a contact to the recycle bin",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/feed_events": {
      "get": {
        "operationId": "get-contacts-by-id-feed-events",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "action": {
                        "type": "string"
                      },
                      "actor": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "kind": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "label": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "metadata": {
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "from": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "to": {
                            "type": "string"
                          }
                        },
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "source_type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "action",
                      "actor",
                      "created_at",
                      "id",
                      "label",
                      "metadata",
                      "source_type"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List feed events for a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/restore": {
      "patch": {
        "operationId": "patch-contacts-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "attachments_count": {
                      "type": "integer"
                    },
                    "avatar_url": {
                      "type": "null"
                    },
                    "companies": {
                      "items": {},
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "type": "null"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discord": {
                      "type": "null"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "full_name": {
                      "type": "string"
                    },
                    "github": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "intercom": {
                      "type": "null"
                    },
                    "last_name": {
                      "example": "Kovac",
                      "type": "string"
                    },
                    "linkedin": {
                      "type": "null"
                    },
                    "phone": {
                      "type": "null"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "telegram": {
                      "type": "null"
                    },
                    "telegram_id": {
                      "type": "null"
                    },
                    "timezone": {
                      "type": "null"
                    },
                    "title": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "x": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "attachments_count",
                    "avatar_url",
                    "companies",
                    "created_at",
                    "created_by",
                    "custom_fields",
                    "description",
                    "discord",
                    "email",
                    "first_name",
                    "full_name",
                    "github",
                    "id",
                    "intercom",
                    "last_name",
                    "linkedin",
                    "phone",
                    "tags",
                    "telegram",
                    "telegram_id",
                    "timezone",
                    "title",
                    "updated_at",
                    "x"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Restore a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/subscribe": {
      "post": {
        "operationId": "post-contacts-by-id-subscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Subscribe to a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/subscribers": {
      "post": {
        "operationId": "post-contacts-by-id-subscribers",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "user_id": {
                    "example": 7,
                    "type": "integer"
                  }
                },
                "required": [
                  "user_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Add a subscriber to a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/subscribers/{user_id}": {
      "delete": {
        "operationId": "delete-contacts-by-id-subscribers-by-user-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {},
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Remove a subscriber from a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/subscription": {
      "get": {
        "operationId": "get-contacts-by-id-subscription",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get your subscription to a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/contacts/{id}/unsubscribe": {
      "delete": {
        "operationId": "delete-contacts-by-id-unsubscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Unsubscribe from a contact",
        "tags": [
          "Contacts"
        ]
      }
    },
    "/api/v1/currencies": {
      "get": {
        "operationId": "get-currencies",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "code": {
                        "type": "string"
                      },
                      "decimal_digits": {
                        "type": "integer"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "symbol": {
                        "type": "string"
                      },
                      "symbol_position": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "decimal_digits",
                      "id",
                      "name",
                      "symbol",
                      "symbol_position"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List currencies",
        "tags": [
          "Currencies"
        ]
      }
    },
    "/api/v1/custom_field_definitions": {
      "get": {
        "operationId": "get-custom-field-definitions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "entity",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "customizable_type": {
                        "type": "string"
                      },
                      "field_type": {
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "options": {
                        "type": "null"
                      },
                      "placeholder": {
                        "type": "null"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "created_at",
                      "customizable_type",
                      "field_type",
                      "id",
                      "name",
                      "options",
                      "placeholder",
                      "position",
                      "required",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List custom field definitions",
        "tags": [
          "Custom Field Definitions"
        ]
      },
      "post": {
        "operationId": "post-custom-field-definitions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "custom_field_definition": {
                    "properties": {
                      "customizable_type": {
                        "type": "string"
                      },
                      "field_type": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      },
                      "required": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "customizable_type",
                      "field_type",
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "custom_field_definition"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "customizable_type": {
                      "type": "string"
                    },
                    "field_type": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "options": {
                      "type": "null"
                    },
                    "placeholder": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "customizable_type",
                    "field_type",
                    "id",
                    "name",
                    "options",
                    "placeholder",
                    "position",
                    "required",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "limit": {
                              "type": "integer"
                            },
                            "pool_total": {
                              "type": "integer"
                            },
                            "pool_used": {
                              "type": "integer"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "used": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "limit",
                            "pool_total",
                            "pool_used",
                            "resource",
                            "used"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "customizable_type": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "field_type": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "options": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a custom field definition",
        "tags": [
          "Custom Field Definitions"
        ]
      }
    },
    "/api/v1/custom_field_definitions/{id}": {
      "delete": {
        "operationId": "delete-custom-field-definitions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Delete a custom field definition",
        "tags": [
          "Custom Field Definitions"
        ]
      },
      "patch": {
        "operationId": "patch-custom-field-definitions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "custom_field_definition": {
                    "properties": {
                      "field_type": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "options": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      },
                      "required": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "custom_field_definition"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "customizable_type": {
                      "type": "string"
                    },
                    "field_type": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "options": {
                      "items": {
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "placeholder": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "required": {
                      "type": "boolean"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "customizable_type",
                    "field_type",
                    "id",
                    "name",
                    "options",
                    "placeholder",
                    "position",
                    "required",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "field_type": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "field_type"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a custom field definition",
        "tags": [
          "Custom Field Definitions"
        ]
      }
    },
    "/api/v1/dashboard": {
      "get": {
        "operationId": "get-dashboard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "deals": {
                      "properties": {
                        "closing_soon": {
                          "type": "integer"
                        },
                        "lost": {
                          "type": "integer"
                        },
                        "open": {
                          "type": "integer"
                        },
                        "open_pipeline_value": {
                          "properties": {},
                          "type": "object"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "won": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "closing_soon",
                        "lost",
                        "open",
                        "open_pipeline_value",
                        "total",
                        "won"
                      ],
                      "type": "object"
                    },
                    "recent_activity": {
                      "items": {
                        "properties": {
                          "action": {
                            "type": "string"
                          },
                          "actor": {
                            "properties": {
                              "avatar_url": {
                                "type": "null"
                              },
                              "display_name": {
                                "type": "string"
                              },
                              "id": {
                                "example": 42,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "avatar_url",
                              "display_name",
                              "id"
                            ],
                            "type": "object"
                          },
                          "created_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "metadata": {
                            "type": "null"
                          },
                          "trackable_id": {
                            "type": "null"
                          },
                          "trackable_label": {
                            "type": "string"
                          },
                          "trackable_type": {
                            "type": "null"
                          }
                        },
                        "required": [
                          "action",
                          "actor",
                          "created_at",
                          "id",
                          "metadata",
                          "trackable_id",
                          "trackable_label",
                          "trackable_type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "recent_companies": {
                      "items": {},
                      "type": "array"
                    },
                    "recent_contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "recent_deals": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "deals",
                    "recent_activity",
                    "recent_companies",
                    "recent_contacts",
                    "recent_deals"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get the dashboard overview",
        "tags": [
          "Dashboard"
        ]
      }
    },
    "/api/v1/dashboards": {
      "get": {
        "operationId": "get-dashboards",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "is_default": {
                        "type": "boolean"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "user": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "widgets": {
                        "items": {
                          "properties": {
                            "config": {
                              "properties": {
                                "group_by": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "report_type": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "type": "object"
                            },
                            "created_at": {
                              "example": "2026-01-15T09:30:00Z",
                              "type": "string"
                            },
                            "height": {
                              "type": "integer"
                            },
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "pos_x": {
                              "type": "integer"
                            },
                            "pos_y": {
                              "type": "integer"
                            },
                            "title": {
                              "type": "null"
                            },
                            "updated_at": {
                              "example": "2026-01-15T09:30:00Z",
                              "type": "string"
                            },
                            "widget_type": {
                              "type": "string"
                            },
                            "width": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "config",
                            "created_at",
                            "height",
                            "id",
                            "pos_x",
                            "pos_y",
                            "title",
                            "updated_at",
                            "widget_type",
                            "width"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "created_at",
                      "id",
                      "is_default",
                      "name",
                      "updated_at",
                      "user",
                      "widgets"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List dashboards",
        "tags": [
          "Dashboards"
        ]
      },
      "post": {
        "operationId": "post-dashboards",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "dashboard": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "dashboard"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "is_default": {
                      "type": "boolean"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "widgets": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "created_at",
                    "id",
                    "is_default",
                    "name",
                    "updated_at",
                    "user",
                    "widgets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a dashboard",
        "tags": [
          "Dashboards"
        ]
      }
    },
    "/api/v1/dashboards/{dashboard_id}/widgets": {
      "post": {
        "operationId": "post-dashboards-by-dashboard-id-widgets",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "dashboard_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "widget": {
                    "properties": {
                      "config": {
                        "properties": {},
                        "type": "object"
                      },
                      "height": {
                        "type": "integer"
                      },
                      "pos_x": {
                        "type": "integer"
                      },
                      "pos_y": {
                        "type": "integer"
                      },
                      "widget_type": {
                        "type": "string"
                      },
                      "width": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "config",
                      "height",
                      "pos_x",
                      "pos_y",
                      "widget_type",
                      "width"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "widget"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "config": {
                      "properties": {},
                      "type": "object"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "pos_x": {
                      "type": "integer"
                    },
                    "pos_y": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "widget_type": {
                      "type": "string"
                    },
                    "width": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "config",
                    "created_at",
                    "height",
                    "id",
                    "pos_x",
                    "pos_y",
                    "title",
                    "updated_at",
                    "widget_type",
                    "width"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Add a widget to a dashboard",
        "tags": [
          "Dashboards"
        ]
      }
    },
    "/api/v1/dashboards/{dashboard_id}/widgets/batch_update": {
      "patch": {
        "operationId": "patch-dashboards-by-dashboard-id-widgets-batch-update",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "dashboard_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "widgets": {
                    "items": {
                      "properties": {
                        "height": {
                          "type": "integer"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "pos_x": {
                          "type": "integer"
                        },
                        "pos_y": {
                          "type": "integer"
                        },
                        "width": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "height",
                        "id",
                        "pos_x",
                        "pos_y",
                        "width"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "widgets"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "is_default": {
                      "type": "boolean"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "widgets": {
                      "items": {
                        "properties": {
                          "config": {
                            "properties": {},
                            "type": "object"
                          },
                          "created_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "height": {
                            "type": "integer"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "pos_x": {
                            "type": "integer"
                          },
                          "pos_y": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "null"
                          },
                          "updated_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "widget_type": {
                            "type": "string"
                          },
                          "width": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "config",
                          "created_at",
                          "height",
                          "id",
                          "pos_x",
                          "pos_y",
                          "title",
                          "updated_at",
                          "widget_type",
                          "width"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "created_at",
                    "id",
                    "is_default",
                    "name",
                    "updated_at",
                    "user",
                    "widgets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Batch-update dashboard widgets",
        "tags": [
          "Dashboards"
        ]
      }
    },
    "/api/v1/dashboards/{dashboard_id}/widgets/{id}": {
      "delete": {
        "operationId": "delete-dashboards-by-dashboard-id-widgets-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "dashboard_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Remove a widget from a dashboard",
        "tags": [
          "Dashboards"
        ]
      },
      "patch": {
        "operationId": "patch-dashboards-by-dashboard-id-widgets-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "dashboard_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "widget": {
                    "properties": {
                      "pos_x": {
                        "type": "integer"
                      },
                      "pos_y": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "pos_x",
                      "pos_y"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "widget"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "config": {
                      "properties": {},
                      "type": "object"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "pos_x": {
                      "type": "integer"
                    },
                    "pos_y": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "null"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "widget_type": {
                      "type": "string"
                    },
                    "width": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "config",
                    "created_at",
                    "height",
                    "id",
                    "pos_x",
                    "pos_y",
                    "title",
                    "updated_at",
                    "widget_type",
                    "width"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Update a dashboard widget",
        "tags": [
          "Dashboards"
        ]
      }
    },
    "/api/v1/dashboards/{id}": {
      "delete": {
        "operationId": "delete-dashboards-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Delete a dashboard",
        "tags": [
          "Dashboards"
        ]
      },
      "get": {
        "operationId": "get-dashboards-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "is_default": {
                      "type": "boolean"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "widgets": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "created_at",
                    "id",
                    "is_default",
                    "name",
                    "updated_at",
                    "user",
                    "widgets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Get a dashboard",
        "tags": [
          "Dashboards"
        ]
      },
      "patch": {
        "operationId": "patch-dashboards-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "dashboard": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "dashboard"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "is_default": {
                      "type": "boolean"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "widgets": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "created_at",
                    "id",
                    "is_default",
                    "name",
                    "updated_at",
                    "user",
                    "widgets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Update a dashboard",
        "tags": [
          "Dashboards"
        ]
      }
    },
    "/api/v1/deals": {
      "get": {
        "operationId": "get-deals",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by custom field value, keyed by definition id, e.g. `custom_field[12]=ruby`.",
            "explode": true,
            "in": "query",
            "name": "custom_field",
            "schema": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "style": "deepObject"
          },
          {
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "archived": {
                        "type": "boolean"
                      },
                      "assignees": {
                        "items": {},
                        "type": "array"
                      },
                      "closed_at": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "company": {
                        "type": "null"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "currency": {
                        "example": "EUR",
                        "type": "string"
                      },
                      "expected_close_date": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      },
                      "priority": {
                        "type": "string"
                      },
                      "probability": {
                        "type": "null"
                      },
                      "source": {
                        "type": "null"
                      },
                      "stage": {
                        "properties": {
                          "color": {
                            "type": "null"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "color",
                          "id",
                          "name"
                        ],
                        "type": "object"
                      },
                      "status": {
                        "type": "string"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "value": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "archived",
                      "assignees",
                      "closed_at",
                      "company",
                      "created_at",
                      "currency",
                      "expected_close_date",
                      "id",
                      "position",
                      "priority",
                      "probability",
                      "source",
                      "stage",
                      "status",
                      "title",
                      "updated_at",
                      "value"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List deals",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_assign": {
      "patch": {
        "operationId": "patch-deals-bulk-assign",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "assignee_ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "mode": {
                    "type": "string"
                  }
                },
                "required": [
                  "assignee_ids",
                  "ids"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Bulk assign deals",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_destroy": {
      "delete": {
        "operationId": "delete-deals-bulk-destroy",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk delete deals",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_discard": {
      "patch": {
        "operationId": "patch-deals-bulk-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "pipeline_id": {
                    "example": 7,
                    "type": "integer"
                  },
                  "q": {
                    "type": "string"
                  },
                  "select_all": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Bulk move deals to the recycle bin",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_move": {
      "patch": {
        "operationId": "patch-deals-bulk-move",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "lost_reason": {
                    "type": "string"
                  },
                  "pipeline_stage_id": {
                    "example": 7,
                    "type": "integer"
                  }
                },
                "required": [
                  "ids",
                  "pipeline_stage_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk move deals",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_subscribe": {
      "post": {
        "operationId": "post-deals-bulk-subscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk subscribe to deals",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_unsubscribe": {
      "post": {
        "operationId": "post-deals-bulk-unsubscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "ids"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Bulk unsubscribe from deals",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_update_priority": {
      "patch": {
        "operationId": "patch-deals-bulk-update-priority",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "filters": {
                    "properties": {
                      "priority": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "priority"
                    ],
                    "type": "object"
                  },
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "pipeline_id": {
                    "example": 7,
                    "type": "integer"
                  },
                  "priority": {
                    "type": "string"
                  },
                  "select_all": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "priority"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "priority": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "priority"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Bulk update deal priority",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/bulk_update_status": {
      "patch": {
        "operationId": "patch-deals-bulk-update-status",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "filters": {
                    "properties": {
                      "status": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "status"
                    ],
                    "type": "object"
                  },
                  "ids": {
                    "items": {
                      "type": "integer"
                    },
                    "type": "array"
                  },
                  "lost_reason": {
                    "type": "string"
                  },
                  "pipeline_id": {
                    "example": 7,
                    "type": "integer"
                  },
                  "select_all": {
                    "type": "boolean"
                  },
                  "status": {
                    "type": "string"
                  }
                },
                "required": [
                  "status"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "affected": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "affected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "status": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "status"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Bulk update deal status",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{deal_id}/attachments": {
      "get": {
        "operationId": "get-deals-by-deal-id-attachments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "byte_size": {
                        "type": "integer"
                      },
                      "content_type": {
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "download_url": {
                        "type": "string"
                      },
                      "extension": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "preview_url": {
                        "type": "null"
                      },
                      "thumbnail_url": {
                        "type": "null"
                      },
                      "url": {
                        "example": "https://example.com",
                        "type": "string"
                      }
                    },
                    "required": [
                      "byte_size",
                      "content_type",
                      "created_at",
                      "download_url",
                      "extension",
                      "filename",
                      "id",
                      "preview_url",
                      "thumbnail_url",
                      "url"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List attachments for a deal",
        "tags": [
          "Deals"
        ]
      },
      "post": {
        "operationId": "post-deals-by-deal-id-attachments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "attachment": {
                    "properties": {
                      "signed_id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "signed_id"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "attachment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "byte_size": {
                      "type": "integer"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "download_url": {
                      "type": "string"
                    },
                    "extension": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "preview_url": {
                      "type": "null"
                    },
                    "thumbnail_url": {
                      "type": "null"
                    },
                    "url": {
                      "example": "https://example.com",
                      "type": "string"
                    }
                  },
                  "required": [
                    "byte_size",
                    "content_type",
                    "created_at",
                    "download_url",
                    "extension",
                    "filename",
                    "id",
                    "preview_url",
                    "thumbnail_url",
                    "url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Add an attachment to a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{deal_id}/calendar-events": {
      "get": {
        "operationId": "get-deals-by-deal-id-calendar-events",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "past": {
                      "items": {
                        "properties": {
                          "all_day": {
                            "type": "boolean"
                          },
                          "ends_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "manageable": {
                            "type": "boolean"
                          },
                          "meet_link": {
                            "type": "null"
                          },
                          "organizer_email": {
                            "type": "null"
                          },
                          "starts_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "null"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "all_day",
                          "ends_at",
                          "id",
                          "manageable",
                          "meet_link",
                          "organizer_email",
                          "starts_at",
                          "starts_on",
                          "title"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "past_count": {
                      "type": "integer"
                    },
                    "upcoming": {
                      "items": {
                        "properties": {
                          "all_day": {
                            "type": "boolean"
                          },
                          "ends_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "manageable": {
                            "type": "boolean"
                          },
                          "meet_link": {
                            "type": "null"
                          },
                          "organizer_email": {
                            "type": "null"
                          },
                          "starts_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "starts_on": {
                            "type": "null"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "all_day",
                          "ends_at",
                          "id",
                          "manageable",
                          "meet_link",
                          "organizer_email",
                          "starts_at",
                          "starts_on",
                          "title"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "past",
                    "past_count",
                    "upcoming"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List calendar events for a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{deal_id}/comments": {
      "get": {
        "operationId": "get-deals-by-deal-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "anchor": {
                        "type": "null"
                      },
                      "attachments": {
                        "items": {},
                        "type": "array"
                      },
                      "body": {
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "edited_at": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "mentions": {
                        "items": {},
                        "type": "array"
                      },
                      "reactions": {
                        "items": {},
                        "type": "array"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "user": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "anchor",
                      "attachments",
                      "body",
                      "created_at",
                      "edited_at",
                      "id",
                      "mentions",
                      "reactions",
                      "updated_at",
                      "user"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List comments for a deal",
        "tags": [
          "Deals"
        ]
      },
      "post": {
        "operationId": "post-deals-by-deal-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "comment": {
                    "properties": {
                      "body": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "comment"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "anchor": {
                      "type": "null"
                    },
                    "attachments": {
                      "items": {},
                      "type": "array"
                    },
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "edited_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "mentions": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "user": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "anchor",
                    "attachments",
                    "body",
                    "created_at",
                    "edited_at",
                    "id",
                    "mentions",
                    "reactions",
                    "updated_at",
                    "user"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a comment to a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{deal_id}/linked-pages": {
      "get": {
        "operationId": "get-deals-by-deal-id-linked-pages",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "doc": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "title"
                        ],
                        "type": "object"
                      },
                      "doc_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "icon": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "doc",
                      "doc_id",
                      "icon",
                      "id",
                      "title",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List linked pages for a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{deal_id}/reactions": {
      "post": {
        "operationId": "post-deals-by-deal-id-reactions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "reaction": {
                    "properties": {
                      "emoji": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "emoji"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "reaction"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "emoji": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "user": {
                      "properties": {
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "email",
                        "id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "emoji",
                    "id",
                    "user"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Add a reaction to a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{deal_id}/reactions/{id}": {
      "delete": {
        "operationId": "delete-deals-by-deal-id-reactions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "deal_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Remove a reaction from a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}": {
      "delete": {
        "operationId": "delete-deals-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Delete a deal",
        "tags": [
          "Deals"
        ]
      },
      "get": {
        "operationId": "get-deals-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "assignees": {
                      "items": {},
                      "type": "array"
                    },
                    "attachments_count": {
                      "type": "integer"
                    },
                    "closed_at": {
                      "type": "null"
                    },
                    "comments_count": {
                      "type": "integer"
                    },
                    "company": {
                      "type": "null"
                    },
                    "contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "currency": {
                      "example": "EUR",
                      "type": "string"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "expected_close_date": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "lost_reason": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "priority": {
                      "type": "string"
                    },
                    "probability": {
                      "type": "null"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "source": {
                      "type": "null"
                    },
                    "stage": {
                      "properties": {
                        "color": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "color",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "value": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "assignees",
                    "attachments_count",
                    "closed_at",
                    "comments_count",
                    "company",
                    "contacts",
                    "created_at",
                    "created_by",
                    "currency",
                    "custom_fields",
                    "description",
                    "expected_close_date",
                    "id",
                    "lost_reason",
                    "position",
                    "priority",
                    "probability",
                    "reactions",
                    "source",
                    "stage",
                    "status",
                    "tags",
                    "title",
                    "updated_at",
                    "value"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a deal",
        "tags": [
          "Deals"
        ]
      },
      "patch": {
        "operationId": "patch-deals-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "deal": {
                    "properties": {
                      "assignee_ids": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "contact_ids": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "description": {
                        "type": "string"
                      },
                      "priority": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "tag_ids": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "deal"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "assignees": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "attachments_count": {
                      "type": "integer"
                    },
                    "closed_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "comments_count": {
                      "type": "integer"
                    },
                    "company": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "id",
                        "name"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "contacts": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "full_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "email",
                          "full_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "currency": {
                      "example": "EUR",
                      "type": "string"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expected_close_date": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "lost_reason": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "priority": {
                      "type": "string"
                    },
                    "probability": {
                      "type": "null"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "source": {
                      "type": "null"
                    },
                    "stage": {
                      "properties": {
                        "color": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "color",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "tags": {
                      "items": {
                        "properties": {
                          "color": {
                            "example": "#6366f1",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          }
                        },
                        "required": [
                          "color",
                          "id",
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "value": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "assignees",
                    "attachments_count",
                    "closed_at",
                    "comments_count",
                    "company",
                    "contacts",
                    "created_at",
                    "created_by",
                    "currency",
                    "custom_fields",
                    "description",
                    "expected_close_date",
                    "id",
                    "lost_reason",
                    "position",
                    "priority",
                    "probability",
                    "reactions",
                    "source",
                    "stage",
                    "status",
                    "tags",
                    "title",
                    "updated_at",
                    "value"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "company": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "custom_fields": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "lost_reason": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "priority": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "user": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/discard": {
      "patch": {
        "operationId": "patch-deals-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Move a deal to the recycle bin",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/feed_events": {
      "get": {
        "operationId": "get-deals-by-id-feed-events",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "action": {
                        "type": "string"
                      },
                      "actor": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "label": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "metadata": {
                        "type": "null"
                      },
                      "source_type": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "action",
                      "actor",
                      "created_at",
                      "id",
                      "label",
                      "metadata",
                      "source_type"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List feed events for a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/move": {
      "patch": {
        "operationId": "patch-deals-by-id-move",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "deal": {
                    "properties": {
                      "lost_reason": {
                        "type": "string"
                      },
                      "pipeline_stage_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "pipeline_stage_id",
                      "position"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "deal"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "assignees": {
                      "items": {},
                      "type": "array"
                    },
                    "attachments_count": {
                      "type": "integer"
                    },
                    "closed_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "comments_count": {
                      "type": "integer"
                    },
                    "company": {
                      "type": "null"
                    },
                    "contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "currency": {
                      "example": "EUR",
                      "type": "string"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "expected_close_date": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "lost_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "priority": {
                      "type": "string"
                    },
                    "probability": {
                      "type": "null"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "source": {
                      "type": "null"
                    },
                    "stage": {
                      "properties": {
                        "color": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "color",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "value": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "assignees",
                    "attachments_count",
                    "closed_at",
                    "comments_count",
                    "company",
                    "contacts",
                    "created_at",
                    "created_by",
                    "currency",
                    "custom_fields",
                    "description",
                    "expected_close_date",
                    "id",
                    "lost_reason",
                    "position",
                    "priority",
                    "probability",
                    "reactions",
                    "source",
                    "stage",
                    "status",
                    "tags",
                    "title",
                    "updated_at",
                    "value"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Move a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/restore": {
      "patch": {
        "operationId": "patch-deals-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "assignees": {
                      "items": {},
                      "type": "array"
                    },
                    "attachments_count": {
                      "type": "integer"
                    },
                    "closed_at": {
                      "type": "null"
                    },
                    "comments_count": {
                      "type": "integer"
                    },
                    "company": {
                      "type": "null"
                    },
                    "contacts": {
                      "items": {},
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "currency": {
                      "example": "EUR",
                      "type": "string"
                    },
                    "custom_fields": {
                      "items": {},
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "expected_close_date": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "lost_reason": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "priority": {
                      "type": "string"
                    },
                    "probability": {
                      "type": "null"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "source": {
                      "type": "null"
                    },
                    "stage": {
                      "properties": {
                        "color": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "color",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "value": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "assignees",
                    "attachments_count",
                    "closed_at",
                    "comments_count",
                    "company",
                    "contacts",
                    "created_at",
                    "created_by",
                    "currency",
                    "custom_fields",
                    "description",
                    "expected_close_date",
                    "id",
                    "lost_reason",
                    "position",
                    "priority",
                    "probability",
                    "reactions",
                    "source",
                    "stage",
                    "status",
                    "tags",
                    "title",
                    "updated_at",
                    "value"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Restore a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/subscribe": {
      "post": {
        "operationId": "post-deals-by-id-subscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Subscribe to a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/subscribers": {
      "post": {
        "operationId": "post-deals-by-id-subscribers",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "user_id": {
                    "example": 7,
                    "type": "integer"
                  }
                },
                "required": [
                  "user_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Add a subscriber to a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/subscribers/{user_id}": {
      "delete": {
        "operationId": "delete-deals-by-id-subscribers-by-user-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Remove a subscriber from a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/subscription": {
      "get": {
        "operationId": "get-deals-by-id-subscription",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "subscribed_by_me": {
                      "type": "boolean"
                    },
                    "subscribers": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "subscribers_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "subscribed_by_me",
                    "subscribers",
                    "subscribers_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get your subscription to a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/deals/{id}/unsubscribe": {
      "delete": {
        "operationId": "delete-deals-by-id-unsubscribe",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Unsubscribe from a deal",
        "tags": [
          "Deals"
        ]
      }
    },
    "/api/v1/docs": {
      "get": {
        "operationId": "get-docs",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "icon": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "level": {
                        "type": "string"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      },
                      "template": {
                        "type": "boolean"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "visibility": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "created_at",
                      "icon",
                      "id",
                      "level",
                      "position",
                      "template",
                      "title",
                      "updated_at",
                      "visibility"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List docs",
        "tags": [
          "Docs"
        ]
      },
      "post": {
        "operationId": "post-docs",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "title": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "title"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages": {
      "post": {
        "operationId": "post-docs-by-doc-id-pages",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "page": {
                    "properties": {
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "title"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "page"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "doc_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_edited_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "lock_version": {
                      "type": "integer"
                    },
                    "parent_id": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "doc_id",
                    "icon",
                    "id",
                    "last_edited_by",
                    "lock_version",
                    "parent_id",
                    "position",
                    "title",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Add a page to a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{id}": {
      "delete": {
        "operationId": "delete-docs-by-doc-id-pages-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Remove a page from a doc",
        "tags": [
          "Docs"
        ]
      },
      "get": {
        "operationId": "get-docs-by-doc-id-pages-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "doc_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_edited_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "lock_version": {
                      "type": "integer"
                    },
                    "parent_id": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "doc_id",
                    "icon",
                    "id",
                    "last_edited_by",
                    "lock_version",
                    "parent_id",
                    "position",
                    "title",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a page for a doc",
        "tags": [
          "Docs"
        ]
      },
      "patch": {
        "operationId": "patch-docs-by-doc-id-pages-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "page": {
                    "properties": {
                      "body": {
                        "type": "string"
                      },
                      "lock_version": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "body"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "page"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "doc_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_edited_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "lock_version": {
                      "type": "integer"
                    },
                    "parent_id": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "doc_id",
                    "icon",
                    "id",
                    "last_edited_by",
                    "lock_version",
                    "parent_id",
                    "position",
                    "title",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Update a page for a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{id}/collab": {
      "get": {
        "operationId": "get-docs-by-doc-id-pages-by-id-collab",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "editable": {
                      "type": "boolean"
                    },
                    "last_update_id": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "state": {
                      "type": "null"
                    },
                    "updates": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "editable",
                    "last_update_id",
                    "state",
                    "updates"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Collab a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{id}/collab/snapshot": {
      "post": {
        "operationId": "post-docs-by-doc-id-pages-by-id-collab-snapshot",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "html": {
                    "type": "string"
                  },
                  "last_update_id": {
                    "example": 7,
                    "type": "integer"
                  },
                  "state": {
                    "type": "string"
                  },
                  "title": {
                    "example": "Acme",
                    "type": "string"
                  }
                },
                "required": [
                  "html",
                  "last_update_id",
                  "state"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "doc_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_edited_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "lock_version": {
                      "type": "integer"
                    },
                    "parent_id": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "doc_id",
                    "icon",
                    "id",
                    "last_edited_by",
                    "lock_version",
                    "parent_id",
                    "position",
                    "title",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "state": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "state"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Collab snapshot a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{id}/discard": {
      "patch": {
        "operationId": "patch-docs-by-doc-id-pages-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Move a doc to the recycle bin",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{id}/move": {
      "patch": {
        "operationId": "patch-docs-by-doc-id-pages-by-id-move",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "page": {
                    "properties": {
                      "parent_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "parent_id",
                      "position"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "page"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "doc_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_edited_by": {
                      "type": "null"
                    },
                    "lock_version": {
                      "type": "integer"
                    },
                    "parent_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "doc_id",
                    "icon",
                    "id",
                    "last_edited_by",
                    "lock_version",
                    "parent_id",
                    "position",
                    "title",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Move a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{id}/restore": {
      "patch": {
        "operationId": "patch-docs-by-doc-id-pages-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "doc_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_edited_by": {
                      "type": "null"
                    },
                    "lock_version": {
                      "type": "integer"
                    },
                    "parent_id": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "doc_id",
                    "icon",
                    "id",
                    "last_edited_by",
                    "lock_version",
                    "parent_id",
                    "position",
                    "title",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Restore a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{page_id}/versions": {
      "get": {
        "operationId": "get-docs-by-doc-id-pages-by-page-id-versions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "properties": {
                          "display_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "display_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "label": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "created_at",
                      "created_by",
                      "id",
                      "label",
                      "title"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List versions for a doc",
        "tags": [
          "Docs"
        ]
      },
      "post": {
        "operationId": "post-docs-by-doc-id-pages-by-page-id-versions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "page_version": {
                    "properties": {
                      "label": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "label"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "page_version"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "label": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "id",
                    "label",
                    "title"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Add a version to a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{page_id}/versions/{id}": {
      "get": {
        "operationId": "get-docs-by-doc-id-pages-by-page-id-versions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "label": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "created_by",
                    "id",
                    "label",
                    "title"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a version for a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/pages/{page_id}/versions/{id}/restore": {
      "post": {
        "operationId": "post-docs-by-doc-id-pages-by-page-id-versions-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "doc_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_edited_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "lock_version": {
                      "type": "integer"
                    },
                    "parent_id": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "body",
                    "created_at",
                    "doc_id",
                    "icon",
                    "id",
                    "last_edited_by",
                    "lock_version",
                    "parent_id",
                    "position",
                    "title",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Restore a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/permissions": {
      "get": {
        "operationId": "get-docs-by-doc-id-permissions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "level": {
                        "type": "string"
                      },
                      "subject_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "subject_name": {
                        "type": "string"
                      },
                      "subject_type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "created_at",
                      "id",
                      "level",
                      "subject_id",
                      "subject_name",
                      "subject_type"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List permissions for a doc",
        "tags": [
          "Docs"
        ]
      },
      "post": {
        "operationId": "post-docs-by-doc-id-permissions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "subject": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "subject"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a permission to a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/permissions/{id}": {
      "delete": {
        "operationId": "delete-docs-by-doc-id-permissions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Remove a permission from a doc",
        "tags": [
          "Docs"
        ]
      },
      "patch": {
        "operationId": "patch-docs-by-doc-id-permissions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "doc_permission": {
                    "properties": {
                      "level": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "level"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "doc_permission"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "level": {
                      "type": "string"
                    },
                    "subject_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "subject_name": {
                      "type": "string"
                    },
                    "subject_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "id",
                    "level",
                    "subject_id",
                    "subject_name",
                    "subject_type"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Update a permission for a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/share-links": {
      "get": {
        "operationId": "get-docs-by-doc-id-share-links",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "type": "null"
                      },
                      "expires_at": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "revoked_at": {
                        "type": "null"
                      }
                    },
                    "required": [
                      "active",
                      "created_at",
                      "created_by",
                      "expires_at",
                      "id",
                      "revoked_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "List share links for a doc",
        "tags": [
          "Docs"
        ]
      },
      "post": {
        "operationId": "post-docs-by-doc-id-share-links",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "display_name": {
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "display_name",
                        "id"
                      ],
                      "type": "object"
                    },
                    "expires_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "revoked_at": {
                      "type": "null"
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "active",
                    "created_at",
                    "created_by",
                    "expires_at",
                    "id",
                    "revoked_at",
                    "token"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Add a share link to a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{doc_id}/share-links/{id}": {
      "delete": {
        "operationId": "delete-docs-by-doc-id-share-links-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Remove a share link from a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{id}": {
      "delete": {
        "operationId": "delete-docs-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Delete a doc",
        "tags": [
          "Docs"
        ]
      },
      "get": {
        "operationId": "get-docs-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "level": {
                      "type": "string"
                    },
                    "pages": {
                      "items": {
                        "properties": {
                          "doc_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "icon": {
                            "type": "null"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "parent_id": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "position": {
                            "example": 1,
                            "type": "integer"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "updated_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          }
                        },
                        "required": [
                          "doc_id",
                          "icon",
                          "id",
                          "parent_id",
                          "position",
                          "title",
                          "updated_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "template": {
                      "type": "boolean"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "icon",
                    "id",
                    "level",
                    "pages",
                    "position",
                    "template",
                    "title",
                    "updated_at",
                    "visibility"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a doc",
        "tags": [
          "Docs"
        ]
      },
      "patch": {
        "operationId": "patch-docs-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "doc": {
                    "properties": {
                      "position": {
                        "example": 1,
                        "type": "integer"
                      },
                      "template": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "doc"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "template": {
                      "type": "boolean"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "icon",
                    "id",
                    "position",
                    "template",
                    "title",
                    "updated_at",
                    "visibility"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Update a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{id}/discard": {
      "patch": {
        "operationId": "patch-docs-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Move a doc to the recycle bin",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{id}/duplicate": {
      "post": {
        "operationId": "post-docs-by-id-duplicate",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "level": {
                      "type": "string"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "template": {
                      "type": "boolean"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "icon",
                    "id",
                    "level",
                    "position",
                    "template",
                    "title",
                    "updated_at",
                    "visibility"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          }
        },
        "summary": "Duplicate a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/docs/{id}/restore": {
      "patch": {
        "operationId": "patch-docs-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "icon": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "template": {
                      "type": "boolean"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "visibility": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "icon",
                    "id",
                    "position",
                    "template",
                    "title",
                    "updated_at",
                    "visibility"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Restore a doc",
        "tags": [
          "Docs"
        ]
      }
    },
    "/api/v1/feed": {
      "get": {
        "operationId": "get-feed",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bogus",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "trackable_id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "trackable_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "action": {
                        "type": "string"
                      },
                      "actor": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "metadata": {
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "from": {
                            "type": "string"
                          },
                          "to": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "field",
                          "from",
                          "to"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "source_type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "trackable_id": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "trackable_label": {
                        "type": "string"
                      },
                      "trackable_type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "action",
                      "actor",
                      "created_at",
                      "id",
                      "metadata",
                      "source_type",
                      "trackable_id",
                      "trackable_label",
                      "trackable_type"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List workspace feed events",
        "tags": [
          "Feed"
        ]
      }
    },
    "/api/v1/feed/{actor_id}": {
      "get": {
        "operationId": "get-feed-by-actor-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "action",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "actor_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "action": {
                        "type": "string"
                      },
                      "actor": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "metadata": {
                        "properties": {
                          "body_preview": {
                            "type": "string"
                          },
                          "comment_id": {
                            "example": 7,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "body_preview",
                          "comment_id"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "source_type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "trackable_id": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "trackable_label": {
                        "type": "string"
                      },
                      "trackable_type": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "action",
                      "actor",
                      "created_at",
                      "id",
                      "metadata",
                      "source_type",
                      "trackable_id",
                      "trackable_label",
                      "trackable_type"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List feed events for an actor",
        "tags": [
          "Feed"
        ]
      }
    },
    "/api/v1/feedback": {
      "post": {
        "operationId": "post-feedback",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "feedback": {
                    "properties": {
                      "category": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "signed_id": {
                        "type": "string"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "category",
                      "description",
                      "title"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "feedback"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "category": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "status": {
                      "type": "string"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    }
                  },
                  "required": [
                    "category",
                    "created_at",
                    "description",
                    "id",
                    "status",
                    "title"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "category": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "description": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "title": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Send feedback",
        "tags": [
          "Feedback"
        ]
      }
    },
    "/api/v1/gmail": {
      "delete": {
        "operationId": "delete-gmail",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Delete a gmail",
        "tags": [
          "Gmail"
        ]
      },
      "get": {
        "operationId": "get-gmail",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connected": {
                      "type": "boolean"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "linked_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "sync_error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "connected",
                    "email",
                    "id",
                    "linked_at",
                    "sync_error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a gmail",
        "tags": [
          "Gmail"
        ]
      },
      "post": {
        "operationId": "post-gmail",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "auth_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "auth_url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "feature": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "feature"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a gmail",
        "tags": [
          "Gmail"
        ]
      }
    },
    "/api/v1/gmail/callback": {
      "get": {
        "operationId": "get-gmail-callback",
        "parameters": [
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Found"
          }
        },
        "summary": "Get a callback for a gmail",
        "tags": [
          "Gmail"
        ]
      }
    },
    "/api/v1/groups": {
      "get": {
        "operationId": "get-groups",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "avatar_url": {
                        "type": "null"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "description": {
                        "type": "null"
                      },
                      "discarded_at": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "members": {
                        "items": {},
                        "type": "array"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "avatar_url",
                      "created_at",
                      "description",
                      "discarded_at",
                      "id",
                      "members",
                      "name",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List groups",
        "tags": [
          "Groups"
        ]
      },
      "post": {
        "operationId": "post-groups",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "group": {
                    "properties": {
                      "avatar_url": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "group"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "avatar_url": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a group",
        "tags": [
          "Groups"
        ]
      }
    },
    "/api/v1/groups/{id}": {
      "delete": {
        "operationId": "delete-groups-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Delete a group",
        "tags": [
          "Groups"
        ]
      },
      "get": {
        "operationId": "get-groups-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a group",
        "tags": [
          "Groups"
        ]
      },
      "patch": {
        "operationId": "patch-groups-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "group": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "group"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "avatar_url": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "avatar_url"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a group",
        "tags": [
          "Groups"
        ]
      }
    },
    "/api/v1/groups/{id}/discard": {
      "patch": {
        "operationId": "patch-groups-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Move a group to the recycle bin",
        "tags": [
          "Groups"
        ]
      }
    },
    "/api/v1/groups/{id}/members": {
      "post": {
        "operationId": "post-groups-by-id-members",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "user_id": {
                    "example": 7,
                    "type": "integer"
                  }
                },
                "required": [
                  "user_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "user": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "user"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a member to a group",
        "tags": [
          "Groups"
        ]
      }
    },
    "/api/v1/groups/{id}/members/{user_id}": {
      "delete": {
        "operationId": "delete-groups-by-id-members-by-user-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Remove a member from a group",
        "tags": [
          "Groups"
        ]
      }
    },
    "/api/v1/groups/{id}/restore": {
      "patch": {
        "operationId": "patch-groups-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Restore a group",
        "tags": [
          "Groups"
        ]
      }
    },
    "/api/v1/imports": {
      "get": {
        "operationId": "get-imports",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "analysis": {
                        "properties": {},
                        "type": "object"
                      },
                      "can_undo": {
                        "type": "boolean"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "entity_type": {
                        "type": "string"
                      },
                      "error_message": {
                        "type": "null"
                      },
                      "failed_count": {
                        "type": "integer"
                      },
                      "failure_summary": {
                        "items": {},
                        "type": "array"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "finished_at": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "imported_count": {
                        "type": "integer"
                      },
                      "mapping": {
                        "properties": {},
                        "type": "object"
                      },
                      "pipeline_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "processed_count": {
                        "type": "integer"
                      },
                      "progress_percent": {
                        "type": "integer"
                      },
                      "row_count": {
                        "type": "integer"
                      },
                      "skipped_count": {
                        "type": "integer"
                      },
                      "source": {
                        "type": "string"
                      },
                      "started_at": {
                        "type": "null"
                      },
                      "status": {
                        "type": "string"
                      },
                      "undone_at": {
                        "type": "null"
                      },
                      "updated_count": {
                        "type": "integer"
                      },
                      "warning_summary": {
                        "items": {},
                        "type": "array"
                      }
                    },
                    "required": [
                      "analysis",
                      "can_undo",
                      "created_at",
                      "created_by",
                      "entity_type",
                      "error_message",
                      "failed_count",
                      "failure_summary",
                      "filename",
                      "finished_at",
                      "id",
                      "imported_count",
                      "mapping",
                      "pipeline_id",
                      "processed_count",
                      "progress_percent",
                      "row_count",
                      "skipped_count",
                      "source",
                      "started_at",
                      "status",
                      "undone_at",
                      "updated_count",
                      "warning_summary"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List imports",
        "tags": [
          "Imports"
        ]
      },
      "post": {
        "operationId": "post-imports",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "import": {
                    "properties": {
                      "entity_type": {
                        "type": "string"
                      },
                      "pipeline_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "signed_id": {
                        "type": "string"
                      },
                      "source": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "entity_type",
                      "pipeline_id",
                      "signed_id",
                      "source"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "import"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "analysis": {
                      "properties": {
                        "columns": {
                          "properties": {
                            "Amount": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {},
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            },
                            "Close Date": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {},
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            },
                            "Company": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {},
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            },
                            "Name": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {},
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            },
                            "Notes": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {},
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            },
                            "Owner": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {},
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            },
                            "Stage": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {},
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            },
                            "Tags": {
                              "properties": {
                                "ambiguous_date_order": {
                                  "type": "boolean"
                                },
                                "ambiguous_decimal_separator": {
                                  "type": "boolean"
                                },
                                "blank_count": {
                                  "type": "integer"
                                },
                                "distinct_truncated": {
                                  "type": "boolean"
                                },
                                "distinct_values": {
                                  "items": {
                                    "properties": {
                                      "count": {
                                        "type": "integer"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "count",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "index": {
                                  "type": "integer"
                                },
                                "inferred_type": {
                                  "type": "string"
                                },
                                "samples": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "suggested_custom_field": {
                                  "properties": {
                                    "field_type": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    },
                                    "options": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "field_type",
                                    "name",
                                    "options"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "ambiguous_date_order",
                                "ambiguous_decimal_separator",
                                "blank_count",
                                "distinct_truncated",
                                "distinct_values",
                                "index",
                                "inferred_type",
                                "samples",
                                "suggested_custom_field"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "Amount",
                            "Close Date",
                            "Company",
                            "Name",
                            "Notes",
                            "Owner",
                            "Stage",
                            "Tags"
                          ],
                          "type": "object"
                        },
                        "headers": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "row_count": {
                          "type": "integer"
                        },
                        "suggested_mapping": {
                          "properties": {
                            "Amount": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            },
                            "Close Date": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            },
                            "Company": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            },
                            "Name": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            },
                            "Notes": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            },
                            "Owner": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            },
                            "Stage": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            },
                            "Tags": {
                              "type": "null"
                            }
                          },
                          "required": [
                            "Amount",
                            "Close Date",
                            "Company",
                            "Name",
                            "Notes",
                            "Owner",
                            "Stage",
                            "Tags"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "columns",
                        "headers",
                        "row_count",
                        "suggested_mapping"
                      ],
                      "type": "object"
                    },
                    "can_undo": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "error_message": {
                      "type": "null"
                    },
                    "failed_count": {
                      "type": "integer"
                    },
                    "failure_summary": {
                      "items": {},
                      "type": "array"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "finished_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "imported_count": {
                      "type": "integer"
                    },
                    "mapping": {
                      "properties": {},
                      "type": "object"
                    },
                    "pipeline_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "processed_count": {
                      "type": "integer"
                    },
                    "progress_percent": {
                      "type": "integer"
                    },
                    "row_count": {
                      "type": "integer"
                    },
                    "skipped_count": {
                      "type": "integer"
                    },
                    "source": {
                      "type": "string"
                    },
                    "started_at": {
                      "type": "null"
                    },
                    "status": {
                      "type": "string"
                    },
                    "undone_at": {
                      "type": "null"
                    },
                    "updated_count": {
                      "type": "integer"
                    },
                    "warning_summary": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "analysis",
                    "can_undo",
                    "created_at",
                    "created_by",
                    "entity_type",
                    "error_message",
                    "failed_count",
                    "failure_summary",
                    "filename",
                    "finished_at",
                    "id",
                    "imported_count",
                    "mapping",
                    "pipeline_id",
                    "processed_count",
                    "progress_percent",
                    "row_count",
                    "skipped_count",
                    "source",
                    "started_at",
                    "status",
                    "undone_at",
                    "updated_count",
                    "warning_summary"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create an import",
        "tags": [
          "Imports"
        ]
      }
    },
    "/api/v1/imports/field-schema": {
      "get": {
        "operationId": "get-imports-field-schema",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "entity_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "pipeline_id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "entity_type": {
                      "type": "string"
                    },
                    "fields": {
                      "items": {
                        "properties": {
                          "custom_field_definition_id": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "default": {
                            "nullable": true,
                            "type": "string"
                          },
                          "hint": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "key": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "options": {
                            "items": {
                              "properties": {
                                "label": {
                                  "example": "Acme",
                                  "type": "string"
                                },
                                "stage_type": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "relation": {
                            "properties": {
                              "cardinality": {
                                "type": "string"
                              },
                              "create_if_missing": {
                                "type": "boolean"
                              },
                              "match_on": {
                                "example": "2026-01-15",
                                "type": "string"
                              },
                              "separator": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "target": {
                                "type": "string"
                              },
                              "unmatched": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "cardinality",
                              "create_if_missing",
                              "match_on",
                              "target",
                              "unmatched"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "type": {
                            "type": "string"
                          },
                          "value_mappable": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "key",
                          "kind",
                          "label",
                          "required",
                          "type",
                          "value_mappable"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "requires": {
                      "properties": {
                        "pipeline": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "pipeline"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "entity_type",
                    "fields",
                    "requires"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Get importable fields",
        "tags": [
          "Imports"
        ]
      }
    },
    "/api/v1/imports/{id}": {
      "get": {
        "operationId": "get-imports-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "analysis": {
                      "properties": {},
                      "type": "object"
                    },
                    "can_undo": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "error_message": {
                      "type": "null"
                    },
                    "failed_count": {
                      "type": "integer"
                    },
                    "failure_summary": {
                      "items": {},
                      "type": "array"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "finished_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "imported_count": {
                      "type": "integer"
                    },
                    "mapping": {
                      "properties": {},
                      "type": "object"
                    },
                    "pipeline_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "processed_count": {
                      "type": "integer"
                    },
                    "progress_percent": {
                      "type": "integer"
                    },
                    "row_count": {
                      "type": "integer"
                    },
                    "skipped_count": {
                      "type": "integer"
                    },
                    "source": {
                      "type": "string"
                    },
                    "started_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "undone_at": {
                      "type": "null"
                    },
                    "updated_count": {
                      "type": "integer"
                    },
                    "warning_summary": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "analysis",
                    "can_undo",
                    "created_at",
                    "created_by",
                    "entity_type",
                    "error_message",
                    "failed_count",
                    "failure_summary",
                    "filename",
                    "finished_at",
                    "id",
                    "imported_count",
                    "mapping",
                    "pipeline_id",
                    "processed_count",
                    "progress_percent",
                    "row_count",
                    "skipped_count",
                    "source",
                    "started_at",
                    "status",
                    "undone_at",
                    "updated_count",
                    "warning_summary"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get an import",
        "tags": [
          "Imports"
        ]
      }
    },
    "/api/v1/imports/{id}/preview": {
      "post": {
        "operationId": "post-imports-by-id-preview",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "mapping": {
                    "properties": {
                      "columns": {
                        "properties": {
                          "Name": {
                            "properties": {
                              "field": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "type": "object"
                          },
                          "Stage": {
                            "properties": {
                              "field": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "Name",
                          "Stage"
                        ],
                        "type": "object"
                      },
                      "defaults": {
                        "properties": {
                          "pipeline_stage_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pipeline_stage_id"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "columns",
                      "defaults"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "mapping"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "invalid_rows": {
                      "type": "integer"
                    },
                    "issues": {
                      "items": {
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "count": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "field": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "level": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "level",
                          "message"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "row_errors": {
                      "items": {
                        "properties": {
                          "errors": {
                            "items": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field",
                                "message"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "row_number": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "errors",
                          "row_number"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "sample": {
                      "items": {
                        "properties": {
                          "attributes": {
                            "properties": {
                              "pipeline_stage_id": {
                                "example": 7,
                                "type": "integer"
                              },
                              "status": {
                                "type": "string"
                              },
                              "title": {
                                "example": "Acme",
                                "type": "string"
                              }
                            },
                            "required": [
                              "pipeline_stage_id",
                              "status",
                              "title"
                            ],
                            "type": "object"
                          },
                          "custom_fields": {
                            "additionalProperties": {
                              "nullable": true,
                              "type": "string"
                            },
                            "description": "Custom field values keyed by definition id. null or blank clears a field.",
                            "type": "object"
                          },
                          "relations": {
                            "properties": {},
                            "type": "object"
                          },
                          "row_number": {
                            "type": "integer"
                          },
                          "warnings": {
                            "items": {
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "message"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "attributes",
                          "custom_fields",
                          "relations",
                          "row_number",
                          "warnings"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "total_rows": {
                      "type": "integer"
                    },
                    "valid_rows": {
                      "type": "integer"
                    },
                    "will_create": {
                      "properties": {
                        "companies": {
                          "type": "integer"
                        },
                        "contacts": {
                          "type": "integer"
                        },
                        "custom_field_options": {
                          "type": "integer"
                        },
                        "custom_fields": {
                          "type": "integer"
                        },
                        "deals": {
                          "type": "integer"
                        },
                        "pipeline_stages": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "companies",
                        "contacts",
                        "custom_field_options",
                        "custom_fields",
                        "deals",
                        "pipeline_stages"
                      ],
                      "type": "object"
                    },
                    "will_link": {
                      "properties": {
                        "companies": {
                          "type": "integer"
                        },
                        "contacts": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "companies",
                        "contacts"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "invalid_rows",
                    "issues",
                    "row_errors",
                    "sample",
                    "total_rows",
                    "valid_rows",
                    "will_create",
                    "will_link"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Preview an import",
        "tags": [
          "Imports"
        ]
      }
    },
    "/api/v1/imports/{id}/run": {
      "post": {
        "operationId": "post-imports-by-id-run",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "mapping": {
                    "properties": {
                      "columns": {
                        "properties": {
                          "Name": {
                            "properties": {
                              "field": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "Name"
                        ],
                        "type": "object"
                      },
                      "defaults": {
                        "properties": {
                          "pipeline_stage_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "pipeline_stage_id"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "columns",
                      "defaults"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "mapping"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "analysis": {
                      "properties": {},
                      "type": "object"
                    },
                    "can_undo": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "error_message": {
                      "type": "null"
                    },
                    "failed_count": {
                      "type": "integer"
                    },
                    "failure_summary": {
                      "items": {},
                      "type": "array"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "finished_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "imported_count": {
                      "type": "integer"
                    },
                    "mapping": {
                      "properties": {
                        "columns": {
                          "properties": {
                            "Name": {
                              "properties": {
                                "field": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "Name"
                          ],
                          "type": "object"
                        },
                        "defaults": {
                          "properties": {
                            "pipeline_stage_id": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "pipeline_stage_id"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "columns",
                        "defaults"
                      ],
                      "type": "object"
                    },
                    "pipeline_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "processed_count": {
                      "type": "integer"
                    },
                    "progress_percent": {
                      "type": "integer"
                    },
                    "row_count": {
                      "type": "integer"
                    },
                    "skipped_count": {
                      "type": "integer"
                    },
                    "source": {
                      "type": "string"
                    },
                    "started_at": {
                      "type": "null"
                    },
                    "status": {
                      "type": "string"
                    },
                    "undone_at": {
                      "type": "null"
                    },
                    "updated_count": {
                      "type": "integer"
                    },
                    "warning_summary": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "analysis",
                    "can_undo",
                    "created_at",
                    "created_by",
                    "entity_type",
                    "error_message",
                    "failed_count",
                    "failure_summary",
                    "filename",
                    "finished_at",
                    "id",
                    "imported_count",
                    "mapping",
                    "pipeline_id",
                    "processed_count",
                    "progress_percent",
                    "row_count",
                    "skipped_count",
                    "source",
                    "started_at",
                    "status",
                    "undone_at",
                    "updated_count",
                    "warning_summary"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Accepted"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Conflict"
          }
        },
        "summary": "Run an import",
        "tags": [
          "Imports"
        ]
      }
    },
    "/api/v1/imports/{id}/undo": {
      "post": {
        "operationId": "post-imports-by-id-undo",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "analysis": {
                      "properties": {},
                      "type": "object"
                    },
                    "can_undo": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "error_message": {
                      "type": "null"
                    },
                    "failed_count": {
                      "type": "integer"
                    },
                    "failure_summary": {
                      "items": {},
                      "type": "array"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "finished_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "imported_count": {
                      "type": "integer"
                    },
                    "mapping": {
                      "properties": {},
                      "type": "object"
                    },
                    "pipeline_id": {
                      "example": 7,
                      "type": "integer"
                    },
                    "processed_count": {
                      "type": "integer"
                    },
                    "progress_percent": {
                      "type": "integer"
                    },
                    "row_count": {
                      "type": "integer"
                    },
                    "skipped_count": {
                      "type": "integer"
                    },
                    "source": {
                      "type": "string"
                    },
                    "started_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "undone_at": {
                      "type": "null"
                    },
                    "updated_count": {
                      "type": "integer"
                    },
                    "warning_summary": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "analysis",
                    "can_undo",
                    "created_at",
                    "created_by",
                    "entity_type",
                    "error_message",
                    "failed_count",
                    "failure_summary",
                    "filename",
                    "finished_at",
                    "id",
                    "imported_count",
                    "mapping",
                    "pipeline_id",
                    "processed_count",
                    "progress_percent",
                    "row_count",
                    "skipped_count",
                    "source",
                    "started_at",
                    "status",
                    "undone_at",
                    "updated_count",
                    "warning_summary"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Accepted"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Undo an import",
        "tags": [
          "Imports"
        ]
      }
    },
    "/api/v1/imports/{import_id}/rows": {
      "get": {
        "operationId": "get-imports-by-import-id-rows",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "import_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "errors": {
                        "items": {
                          "properties": {
                            "field": {
                              "type": "string"
                            },
                            "message": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "field",
                            "message"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "raw": {
                        "properties": {
                          "Amount": {
                            "type": "string"
                          },
                          "Name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "Amount",
                          "Name"
                        ],
                        "type": "object"
                      },
                      "record_id": {
                        "type": "null"
                      },
                      "record_type": {
                        "type": "null"
                      },
                      "row_number": {
                        "type": "integer"
                      },
                      "status": {
                        "type": "string"
                      },
                      "warnings": {
                        "items": {},
                        "type": "array"
                      }
                    },
                    "required": [
                      "errors",
                      "id",
                      "raw",
                      "record_id",
                      "record_type",
                      "row_number",
                      "status",
                      "warnings"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List import rows",
        "tags": [
          "Imports"
        ]
      }
    },
    "/api/v1/me": {
      "delete": {
        "operationId": "delete-me",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Delete your account",
        "tags": [
          "Me"
        ]
      },
      "get": {
        "operationId": "get-me",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "feature_flags": {
                      "properties": {},
                      "type": "object"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "has_password": {
                      "type": "boolean"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_name": {
                      "example": "Kovac",
                      "type": "string"
                    },
                    "super_admin": {
                      "type": "boolean"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "two_factor_enabled": {
                      "type": "boolean"
                    },
                    "workspaces": {
                      "items": {
                        "properties": {
                          "created_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "feature_flags": {
                            "properties": {},
                            "type": "object"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "permissions": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "role": {
                            "type": "string"
                          },
                          "subscription": {
                            "properties": {
                              "blocked": {
                                "type": "boolean"
                              },
                              "cancel_at_period_end": {
                                "type": "boolean"
                              },
                              "current_period_ends_at": {
                                "type": "null"
                              },
                              "features": {
                                "properties": {
                                  "advanced_dashboard": {
                                    "type": "boolean"
                                  },
                                  "advanced_roles": {
                                    "type": "boolean"
                                  },
                                  "ai_assistant": {
                                    "type": "boolean"
                                  },
                                  "email_campaigns": {
                                    "type": "boolean"
                                  },
                                  "google_calendar": {
                                    "type": "boolean"
                                  },
                                  "mcp_access": {
                                    "type": "boolean"
                                  },
                                  "report_conversion_rate": {
                                    "type": "boolean"
                                  },
                                  "report_deals_at_risk": {
                                    "type": "boolean"
                                  },
                                  "report_response_time": {
                                    "type": "boolean"
                                  },
                                  "report_sales_cycle": {
                                    "type": "boolean"
                                  },
                                  "report_source_attribution": {
                                    "type": "boolean"
                                  },
                                  "report_stage_residency": {
                                    "type": "boolean"
                                  },
                                  "report_team_performance": {
                                    "type": "boolean"
                                  },
                                  "report_win_loss_analysis": {
                                    "type": "boolean"
                                  },
                                  "telegram_campaigns": {
                                    "type": "boolean"
                                  },
                                  "telegram_team_inbox": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "advanced_dashboard",
                                  "advanced_roles",
                                  "ai_assistant",
                                  "email_campaigns",
                                  "google_calendar",
                                  "mcp_access",
                                  "report_conversion_rate",
                                  "report_deals_at_risk",
                                  "report_response_time",
                                  "report_sales_cycle",
                                  "report_source_attribution",
                                  "report_stage_residency",
                                  "report_team_performance",
                                  "report_win_loss_analysis",
                                  "telegram_campaigns",
                                  "telegram_team_inbox"
                                ],
                                "type": "object"
                              },
                              "limits": {
                                "properties": {
                                  "ai_credits": {
                                    "type": "integer"
                                  },
                                  "automation_runs": {
                                    "type": "integer"
                                  },
                                  "campaign_recipients": {
                                    "type": "integer"
                                  },
                                  "custom_fields_companies": {
                                    "type": "integer"
                                  },
                                  "custom_fields_contacts": {
                                    "type": "integer"
                                  },
                                  "custom_fields_deals": {
                                    "type": "integer"
                                  },
                                  "members": {
                                    "type": "integer"
                                  },
                                  "pipelines": {
                                    "type": "integer"
                                  },
                                  "storage_gb": {
                                    "type": "integer"
                                  },
                                  "telegram_accounts": {
                                    "type": "integer"
                                  },
                                  "telegram_bot": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "ai_credits",
                                  "automation_runs",
                                  "campaign_recipients",
                                  "custom_fields_companies",
                                  "custom_fields_contacts",
                                  "custom_fields_deals",
                                  "members",
                                  "pipelines",
                                  "storage_gb",
                                  "telegram_accounts",
                                  "telegram_bot"
                                ],
                                "type": "object"
                              },
                              "plan": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "trial_ends_at": {
                                "example": "2026-01-15T09:30:00Z",
                                "type": "string"
                              }
                            },
                            "required": [
                              "blocked",
                              "cancel_at_period_end",
                              "current_period_ends_at",
                              "features",
                              "limits",
                              "plan",
                              "status",
                              "trial_ends_at"
                            ],
                            "type": "object"
                          },
                          "ui_config": {
                            "properties": {},
                            "type": "object"
                          }
                        },
                        "required": [
                          "created_at",
                          "feature_flags",
                          "id",
                          "name",
                          "permissions",
                          "role",
                          "subscription",
                          "ui_config"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "display_name",
                    "email",
                    "feature_flags",
                    "first_name",
                    "has_password",
                    "id",
                    "last_name",
                    "super_admin",
                    "timezone",
                    "two_factor_enabled",
                    "workspaces"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Get the current user",
        "tags": [
          "Me"
        ]
      },
      "patch": {
        "operationId": "patch-me",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "user": {
                    "properties": {
                      "first_name": {
                        "example": "Ana",
                        "type": "string"
                      },
                      "last_name": {
                        "example": "Kovac",
                        "type": "string"
                      },
                      "timezone": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "user"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "feature_flags": {
                      "properties": {},
                      "type": "object"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "has_password": {
                      "type": "boolean"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "super_admin": {
                      "type": "boolean"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "two_factor_enabled": {
                      "type": "boolean"
                    },
                    "workspaces": {
                      "items": {
                        "properties": {
                          "created_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "feature_flags": {
                            "properties": {},
                            "type": "object"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "permissions": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "role": {
                            "type": "string"
                          },
                          "subscription": {
                            "properties": {
                              "blocked": {
                                "type": "boolean"
                              },
                              "cancel_at_period_end": {
                                "type": "boolean"
                              },
                              "current_period_ends_at": {
                                "type": "null"
                              },
                              "features": {
                                "properties": {
                                  "advanced_dashboard": {
                                    "type": "boolean"
                                  },
                                  "advanced_roles": {
                                    "type": "boolean"
                                  },
                                  "ai_assistant": {
                                    "type": "boolean"
                                  },
                                  "email_campaigns": {
                                    "type": "boolean"
                                  },
                                  "google_calendar": {
                                    "type": "boolean"
                                  },
                                  "mcp_access": {
                                    "type": "boolean"
                                  },
                                  "report_conversion_rate": {
                                    "type": "boolean"
                                  },
                                  "report_deals_at_risk": {
                                    "type": "boolean"
                                  },
                                  "report_response_time": {
                                    "type": "boolean"
                                  },
                                  "report_sales_cycle": {
                                    "type": "boolean"
                                  },
                                  "report_source_attribution": {
                                    "type": "boolean"
                                  },
                                  "report_stage_residency": {
                                    "type": "boolean"
                                  },
                                  "report_team_performance": {
                                    "type": "boolean"
                                  },
                                  "report_win_loss_analysis": {
                                    "type": "boolean"
                                  },
                                  "telegram_campaigns": {
                                    "type": "boolean"
                                  },
                                  "telegram_team_inbox": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "advanced_dashboard",
                                  "advanced_roles",
                                  "ai_assistant",
                                  "email_campaigns",
                                  "google_calendar",
                                  "mcp_access",
                                  "report_conversion_rate",
                                  "report_deals_at_risk",
                                  "report_response_time",
                                  "report_sales_cycle",
                                  "report_source_attribution",
                                  "report_stage_residency",
                                  "report_team_performance",
                                  "report_win_loss_analysis",
                                  "telegram_campaigns",
                                  "telegram_team_inbox"
                                ],
                                "type": "object"
                              },
                              "limits": {
                                "properties": {
                                  "ai_credits": {
                                    "type": "integer"
                                  },
                                  "automation_runs": {
                                    "type": "integer"
                                  },
                                  "campaign_recipients": {
                                    "type": "integer"
                                  },
                                  "custom_fields_companies": {
                                    "type": "integer"
                                  },
                                  "custom_fields_contacts": {
                                    "type": "integer"
                                  },
                                  "custom_fields_deals": {
                                    "type": "integer"
                                  },
                                  "members": {
                                    "type": "integer"
                                  },
                                  "pipelines": {
                                    "type": "integer"
                                  },
                                  "storage_gb": {
                                    "type": "integer"
                                  },
                                  "telegram_accounts": {
                                    "type": "integer"
                                  },
                                  "telegram_bot": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "ai_credits",
                                  "automation_runs",
                                  "campaign_recipients",
                                  "custom_fields_companies",
                                  "custom_fields_contacts",
                                  "custom_fields_deals",
                                  "members",
                                  "pipelines",
                                  "storage_gb",
                                  "telegram_accounts",
                                  "telegram_bot"
                                ],
                                "type": "object"
                              },
                              "plan": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "trial_ends_at": {
                                "example": "2026-01-15T09:30:00Z",
                                "type": "string"
                              }
                            },
                            "required": [
                              "blocked",
                              "cancel_at_period_end",
                              "current_period_ends_at",
                              "features",
                              "limits",
                              "plan",
                              "status",
                              "trial_ends_at"
                            ],
                            "type": "object"
                          },
                          "ui_config": {
                            "properties": {},
                            "type": "object"
                          }
                        },
                        "required": [
                          "created_at",
                          "feature_flags",
                          "id",
                          "name",
                          "permissions",
                          "role",
                          "subscription",
                          "ui_config"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "display_name",
                    "email",
                    "feature_flags",
                    "first_name",
                    "has_password",
                    "id",
                    "last_name",
                    "super_admin",
                    "timezone",
                    "two_factor_enabled",
                    "workspaces"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "first_name": {
                              "example": "Ana",
                              "type": "string"
                            },
                            "last_name": {
                              "example": "Kovac",
                              "type": "string"
                            },
                            "timezone": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update the current user",
        "tags": [
          "Me"
        ]
      }
    },
    "/api/v1/me/avatar": {
      "patch": {
        "operationId": "patch-me-avatar",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "avatar": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "avatar"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "string"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "feature_flags": {
                      "properties": {},
                      "type": "object"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "has_password": {
                      "type": "boolean"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "last_name": {
                      "example": "Kovac",
                      "type": "string"
                    },
                    "super_admin": {
                      "type": "boolean"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "two_factor_enabled": {
                      "type": "boolean"
                    },
                    "workspaces": {
                      "items": {
                        "properties": {
                          "created_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "feature_flags": {
                            "properties": {},
                            "type": "object"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "permissions": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "role": {
                            "type": "string"
                          },
                          "subscription": {
                            "properties": {
                              "blocked": {
                                "type": "boolean"
                              },
                              "cancel_at_period_end": {
                                "type": "boolean"
                              },
                              "current_period_ends_at": {
                                "type": "null"
                              },
                              "features": {
                                "properties": {
                                  "advanced_dashboard": {
                                    "type": "boolean"
                                  },
                                  "advanced_roles": {
                                    "type": "boolean"
                                  },
                                  "ai_assistant": {
                                    "type": "boolean"
                                  },
                                  "email_campaigns": {
                                    "type": "boolean"
                                  },
                                  "google_calendar": {
                                    "type": "boolean"
                                  },
                                  "mcp_access": {
                                    "type": "boolean"
                                  },
                                  "report_conversion_rate": {
                                    "type": "boolean"
                                  },
                                  "report_deals_at_risk": {
                                    "type": "boolean"
                                  },
                                  "report_response_time": {
                                    "type": "boolean"
                                  },
                                  "report_sales_cycle": {
                                    "type": "boolean"
                                  },
                                  "report_source_attribution": {
                                    "type": "boolean"
                                  },
                                  "report_stage_residency": {
                                    "type": "boolean"
                                  },
                                  "report_team_performance": {
                                    "type": "boolean"
                                  },
                                  "report_win_loss_analysis": {
                                    "type": "boolean"
                                  },
                                  "telegram_campaigns": {
                                    "type": "boolean"
                                  },
                                  "telegram_team_inbox": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "advanced_dashboard",
                                  "advanced_roles",
                                  "ai_assistant",
                                  "email_campaigns",
                                  "google_calendar",
                                  "mcp_access",
                                  "report_conversion_rate",
                                  "report_deals_at_risk",
                                  "report_response_time",
                                  "report_sales_cycle",
                                  "report_source_attribution",
                                  "report_stage_residency",
                                  "report_team_performance",
                                  "report_win_loss_analysis",
                                  "telegram_campaigns",
                                  "telegram_team_inbox"
                                ],
                                "type": "object"
                              },
                              "limits": {
                                "properties": {
                                  "ai_credits": {
                                    "type": "integer"
                                  },
                                  "automation_runs": {
                                    "type": "integer"
                                  },
                                  "campaign_recipients": {
                                    "type": "integer"
                                  },
                                  "custom_fields_companies": {
                                    "type": "integer"
                                  },
                                  "custom_fields_contacts": {
                                    "type": "integer"
                                  },
                                  "custom_fields_deals": {
                                    "type": "integer"
                                  },
                                  "members": {
                                    "type": "integer"
                                  },
                                  "pipelines": {
                                    "type": "integer"
                                  },
                                  "storage_gb": {
                                    "type": "integer"
                                  },
                                  "telegram_accounts": {
                                    "type": "integer"
                                  },
                                  "telegram_bot": {
                                    "type": "null"
                                  }
                                },
                                "required": [
                                  "ai_credits",
                                  "automation_runs",
                                  "campaign_recipients",
                                  "custom_fields_companies",
                                  "custom_fields_contacts",
                                  "custom_fields_deals",
                                  "members",
                                  "pipelines",
                                  "storage_gb",
                                  "telegram_accounts",
                                  "telegram_bot"
                                ],
                                "type": "object"
                              },
                              "plan": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "trial_ends_at": {
                                "example": "2026-01-15T09:30:00Z",
                                "type": "string"
                              }
                            },
                            "required": [
                              "blocked",
                              "cancel_at_period_end",
                              "current_period_ends_at",
                              "features",
                              "limits",
                              "plan",
                              "status",
                              "trial_ends_at"
                            ],
                            "type": "object"
                          },
                          "ui_config": {
                            "properties": {},
                            "type": "object"
                          }
                        },
                        "required": [
                          "created_at",
                          "feature_flags",
                          "id",
                          "name",
                          "permissions",
                          "role",
                          "subscription",
                          "ui_config"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "display_name",
                    "email",
                    "feature_flags",
                    "first_name",
                    "has_password",
                    "id",
                    "last_name",
                    "super_admin",
                    "timezone",
                    "two_factor_enabled",
                    "workspaces"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update your avatar",
        "tags": [
          "Me"
        ]
      }
    },
    "/api/v1/me/two-factor": {
      "delete": {
        "operationId": "delete-me-two-factor",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Remove a two factor from a me",
        "tags": [
          "Me"
        ]
      }
    },
    "/api/v1/me/two-factor/confirm": {
      "post": {
        "operationId": "post-me-two-factor-confirm",
        "responses": {
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Confirm me",
        "tags": [
          "Me"
        ]
      }
    },
    "/api/v1/me/two-factor/recovery-codes": {
      "post": {
        "operationId": "post-me-two-factor-recovery-codes",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "code"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "recovery_codes": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "recovery_codes"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Recovery codes me",
        "tags": [
          "Me"
        ]
      }
    },
    "/api/v1/me/two-factor/setup": {
      "post": {
        "operationId": "post-me-two-factor-setup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "current_password": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "otpauth_uri": {
                      "type": "string"
                    },
                    "qr_svg": {
                      "type": "string"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "otpauth_uri",
                    "qr_svg",
                    "secret"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Setup me",
        "tags": [
          "Me"
        ]
      }
    },
    "/api/v1/members": {
      "get": {
        "operationId": "get-members",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "avatar_url": {
                        "type": "null"
                      },
                      "display_name": {
                        "type": "string"
                      },
                      "email": {
                        "example": "ana@example.com",
                        "type": "string"
                      },
                      "first_name": {
                        "example": "Ana",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "joined_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "last_name": {
                        "example": "Kovac",
                        "type": "string"
                      },
                      "last_seen_at": {
                        "type": "null"
                      },
                      "online": {
                        "type": "boolean"
                      },
                      "role": {
                        "type": "string"
                      },
                      "user_id": {
                        "example": 7,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "avatar_url",
                      "display_name",
                      "email",
                      "first_name",
                      "id",
                      "joined_at",
                      "last_name",
                      "last_seen_at",
                      "online",
                      "role",
                      "user_id"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List members",
        "tags": [
          "Members"
        ]
      }
    },
    "/api/v1/members/{id}": {
      "delete": {
        "operationId": "delete-members-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Delete a member",
        "tags": [
          "Members"
        ]
      },
      "get": {
        "operationId": "get-members-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "joined_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "last_name": {
                      "example": "Kovac",
                      "type": "string"
                    },
                    "last_seen_at": {
                      "type": "null"
                    },
                    "online": {
                      "type": "boolean"
                    },
                    "role": {
                      "type": "string"
                    },
                    "user_id": {
                      "example": 7,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "display_name",
                    "email",
                    "first_name",
                    "id",
                    "joined_at",
                    "last_name",
                    "last_seen_at",
                    "online",
                    "role",
                    "user_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a member",
        "tags": [
          "Members"
        ]
      },
      "patch": {
        "operationId": "patch-members-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "member": {
                    "properties": {
                      "role": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "role"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "member"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "display_name": {
                      "type": "string"
                    },
                    "email": {
                      "example": "ana@example.com",
                      "type": "string"
                    },
                    "first_name": {
                      "example": "Ana",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "joined_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "last_name": {
                      "example": "Kovac",
                      "type": "string"
                    },
                    "last_seen_at": {
                      "type": "null"
                    },
                    "online": {
                      "type": "boolean"
                    },
                    "role": {
                      "type": "string"
                    },
                    "user_id": {
                      "example": 7,
                      "type": "integer"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "display_name",
                    "email",
                    "first_name",
                    "id",
                    "joined_at",
                    "last_name",
                    "last_seen_at",
                    "online",
                    "role",
                    "user_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "role": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "role"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a member",
        "tags": [
          "Members"
        ]
      }
    },
    "/api/v1/notification_preferences": {
      "get": {
        "operationId": "get-notification-preferences",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "preferences": {
                      "properties": {
                        "assignment": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "automation": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "comment": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "invitation": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "mention": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "record_update": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "system": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "team_inbox": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "assignment",
                        "automation",
                        "comment",
                        "invitation",
                        "mention",
                        "record_update",
                        "system",
                        "team_inbox"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "preferences"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get notification preferences",
        "tags": [
          "Notification Preferences"
        ]
      },
      "put": {
        "operationId": "put-notification-preferences",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "preferences": {
                    "properties": {
                      "comment": {
                        "properties": {
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "in_app": {
                            "type": "string"
                          },
                          "telegram": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "in_app"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "comment"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "preferences"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "preferences": {
                      "properties": {
                        "assignment": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "automation": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "comment": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "invitation": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "mention": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "record_update": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "system": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        },
                        "team_inbox": {
                          "properties": {
                            "email": {
                              "type": "boolean"
                            },
                            "in_app": {
                              "type": "boolean"
                            },
                            "telegram": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "email",
                            "in_app",
                            "telegram"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "assignment",
                        "automation",
                        "comment",
                        "invitation",
                        "mention",
                        "record_update",
                        "system",
                        "team_inbox"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "preferences"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "comment.in_app": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "event_type": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update notification preferences",
        "tags": [
          "Notification Preferences"
        ]
      }
    },
    "/api/v1/notifications": {
      "get": {
        "operationId": "get-notifications",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "archived_at": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "message": {
                        "properties": {
                          "actor": {
                            "properties": {
                              "avatar_url": {
                                "type": "null"
                              },
                              "display_name": {
                                "type": "string"
                              },
                              "id": {
                                "example": 42,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "avatar_url",
                              "display_name",
                              "id"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "body": {
                            "type": "string"
                          },
                          "body_preview": {
                            "type": "string"
                          },
                          "changes": {
                            "properties": {
                              "title": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "title"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "comment_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "commentable": {
                            "properties": {
                              "id": {
                                "example": 42,
                                "type": "integer"
                              },
                              "name": {
                                "example": "Acme",
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "type"
                            ],
                            "type": "object"
                          },
                          "contact": {
                            "type": "null"
                          },
                          "deal": {
                            "properties": {
                              "id": {
                                "example": 42,
                                "type": "integer"
                              },
                              "title": {
                                "example": "Acme",
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "title"
                            ],
                            "type": "object"
                          },
                          "mention_labels": {
                            "items": {},
                            "type": "array"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "read_at": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "archived_at",
                      "created_at",
                      "id",
                      "message",
                      "read_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "List notifications",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/archive_all": {
      "patch": {
        "operationId": "patch-notifications-archive-all",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "count",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Archive all notifications",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/archived": {
      "delete": {
        "operationId": "delete-notifications-archived",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "count",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Destroy archived notifications",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/read_all": {
      "patch": {
        "operationId": "patch-notifications-read-all",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Mark all notifications as read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/unread_count": {
      "get": {
        "operationId": "get-notifications-unread-count",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get the unread notification count",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/{id}": {
      "delete": {
        "operationId": "delete-notifications-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Delete a notification",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/{id}/archive": {
      "patch": {
        "operationId": "patch-notifications-by-id-archive",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "archived_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "message": {
                      "properties": {
                        "actor": {
                          "properties": {
                            "avatar_url": {
                              "type": "null"
                            },
                            "display_name": {
                              "type": "string"
                            },
                            "id": {
                              "example": 42,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "avatar_url",
                            "display_name",
                            "id"
                          ],
                          "type": "object"
                        },
                        "changes": {
                          "properties": {
                            "title": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "title"
                          ],
                          "type": "object"
                        },
                        "deal": {
                          "properties": {
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "title": {
                              "example": "Acme",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "title"
                          ],
                          "type": "object"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "actor",
                        "changes",
                        "deal",
                        "type"
                      ],
                      "type": "object"
                    },
                    "read_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "archived_at",
                    "created_at",
                    "id",
                    "message",
                    "read_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Archive a notification",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/{id}/read": {
      "patch": {
        "operationId": "patch-notifications-by-id-read",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "archived_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "message": {
                      "properties": {
                        "actor": {
                          "properties": {
                            "avatar_url": {
                              "type": "null"
                            },
                            "display_name": {
                              "type": "string"
                            },
                            "id": {
                              "example": 42,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "avatar_url",
                            "display_name",
                            "id"
                          ],
                          "type": "object"
                        },
                        "body_preview": {
                          "type": "string"
                        },
                        "comment_id": {
                          "example": 7,
                          "type": "integer"
                        },
                        "commentable": {
                          "properties": {
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "name": {
                              "example": "Acme",
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "type"
                          ],
                          "type": "object"
                        },
                        "mention_labels": {
                          "items": {},
                          "type": "array"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "actor",
                        "body_preview",
                        "comment_id",
                        "commentable",
                        "mention_labels",
                        "type"
                      ],
                      "type": "object"
                    },
                    "read_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "archived_at",
                    "created_at",
                    "id",
                    "message",
                    "read_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Mark a notification as read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/{id}/unarchive": {
      "patch": {
        "operationId": "patch-notifications-by-id-unarchive",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "archived_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "message": {
                      "properties": {
                        "actor": {
                          "properties": {
                            "avatar_url": {
                              "type": "null"
                            },
                            "display_name": {
                              "type": "string"
                            },
                            "id": {
                              "example": 42,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "avatar_url",
                            "display_name",
                            "id"
                          ],
                          "type": "object"
                        },
                        "changes": {
                          "properties": {
                            "title": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "title"
                          ],
                          "type": "object"
                        },
                        "deal": {
                          "properties": {
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "title": {
                              "example": "Acme",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "title"
                          ],
                          "type": "object"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "actor",
                        "changes",
                        "deal",
                        "type"
                      ],
                      "type": "object"
                    },
                    "read_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "archived_at",
                    "created_at",
                    "id",
                    "message",
                    "read_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Unarchive a notification",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/notifications/{id}/unread": {
      "patch": {
        "operationId": "patch-notifications-by-id-unread",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "archived_at": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "message": {
                      "properties": {
                        "actor": {
                          "properties": {
                            "avatar_url": {
                              "type": "null"
                            },
                            "display_name": {
                              "type": "string"
                            },
                            "id": {
                              "example": 42,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "avatar_url",
                            "display_name",
                            "id"
                          ],
                          "type": "object"
                        },
                        "changes": {
                          "properties": {
                            "title": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "title"
                          ],
                          "type": "object"
                        },
                        "deal": {
                          "properties": {
                            "id": {
                              "example": 42,
                              "type": "integer"
                            },
                            "title": {
                              "example": "Acme",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "title"
                          ],
                          "type": "object"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "actor",
                        "changes",
                        "deal",
                        "type"
                      ],
                      "type": "object"
                    },
                    "read_at": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "archived_at",
                    "created_at",
                    "id",
                    "message",
                    "read_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Mark unread a notification",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/api/v1/pages/{page_id}/comments": {
      "get": {
        "operationId": "get-pages-by-page-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "anchor": {
                        "properties": {
                          "from": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "to": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "from",
                          "text",
                          "to",
                          "type"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "attachments": {
                        "items": {},
                        "type": "array"
                      },
                      "body": {
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "edited_at": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "mentions": {
                        "items": {},
                        "type": "array"
                      },
                      "reactions": {
                        "items": {},
                        "type": "array"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "user": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "anchor",
                      "attachments",
                      "body",
                      "created_at",
                      "edited_at",
                      "id",
                      "mentions",
                      "reactions",
                      "updated_at",
                      "user"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "summary": "List comments for a page",
        "tags": [
          "Pages"
        ]
      },
      "post": {
        "operationId": "post-pages-by-page-id-comments",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "page_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "anchor": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "anchor"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a comment to a page",
        "tags": [
          "Pages"
        ]
      }
    },
    "/api/v1/pipelines": {
      "get": {
        "operationId": "get-pipelines",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "description": {
                        "type": "null"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "position": {
                        "example": 1,
                        "type": "integer"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "created_at",
                      "description",
                      "id",
                      "name",
                      "position",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List pipelines",
        "tags": [
          "Pipelines"
        ]
      },
      "post": {
        "operationId": "post-pipelines",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "pipeline": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "pipeline"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "description",
                    "id",
                    "name",
                    "position",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "limit": {
                              "type": "integer"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "used": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "limit",
                            "resource",
                            "used"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a pipeline",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{id}": {
      "delete": {
        "operationId": "delete-pipelines-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Delete a pipeline",
        "tags": [
          "Pipelines"
        ]
      },
      "get": {
        "operationId": "get-pipelines-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "assignee",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "include_deals",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "pipeline",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pipeline_stage",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "priority",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "value_min",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "meta": {
                      "properties": {
                        "total_deals": {
                          "type": "integer"
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "total_deals",
                        "truncated"
                      ],
                      "type": "object"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "stages": {
                      "items": {
                        "properties": {
                          "color": {
                            "type": "null"
                          },
                          "created_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "deal_count": {
                            "type": "integer"
                          },
                          "deals": {
                            "items": {
                              "properties": {
                                "assignees": {
                                  "items": {
                                    "properties": {
                                      "avatar_url": {
                                        "type": "null"
                                      },
                                      "display_name": {
                                        "type": "string"
                                      },
                                      "email": {
                                        "example": "ana@example.com",
                                        "type": "string"
                                      },
                                      "id": {
                                        "example": 42,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "avatar_url",
                                      "display_name",
                                      "email",
                                      "id"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "attachments_count": {
                                  "type": "integer"
                                },
                                "comments_count": {
                                  "type": "integer"
                                },
                                "company": {
                                  "properties": {
                                    "id": {
                                      "example": 42,
                                      "type": "integer"
                                    },
                                    "name": {
                                      "example": "Acme",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name"
                                  ],
                                  "type": [
                                    "object",
                                    "null"
                                  ]
                                },
                                "contacts": {
                                  "items": {
                                    "properties": {
                                      "email": {
                                        "example": "ana@example.com",
                                        "type": "string"
                                      },
                                      "full_name": {
                                        "type": "string"
                                      },
                                      "id": {
                                        "example": 42,
                                        "type": "integer"
                                      }
                                    },
                                    "required": [
                                      "email",
                                      "full_name",
                                      "id"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "created_at": {
                                  "example": "2026-01-15T09:30:00Z",
                                  "type": "string"
                                },
                                "created_by": {
                                  "properties": {
                                    "avatar_url": {
                                      "type": "null"
                                    },
                                    "display_name": {
                                      "type": "string"
                                    },
                                    "email": {
                                      "example": "ana@example.com",
                                      "type": "string"
                                    },
                                    "id": {
                                      "example": 42,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "avatar_url",
                                    "display_name",
                                    "email",
                                    "id"
                                  ],
                                  "type": "object"
                                },
                                "currency": {
                                  "example": "EUR",
                                  "type": "string"
                                },
                                "description": {
                                  "type": "null"
                                },
                                "expected_close_date": {
                                  "type": "null"
                                },
                                "id": {
                                  "example": 42,
                                  "type": "integer"
                                },
                                "position": {
                                  "example": 1,
                                  "type": "integer"
                                },
                                "priority": {
                                  "type": "string"
                                },
                                "probability": {
                                  "type": "null"
                                },
                                "status": {
                                  "type": "string"
                                },
                                "title": {
                                  "example": "Acme",
                                  "type": "string"
                                },
                                "updated_at": {
                                  "example": "2026-01-15T09:30:00Z",
                                  "type": "string"
                                },
                                "value": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "assignees",
                                "attachments_count",
                                "comments_count",
                                "company",
                                "contacts",
                                "created_at",
                                "created_by",
                                "currency",
                                "description",
                                "expected_close_date",
                                "id",
                                "position",
                                "priority",
                                "probability",
                                "status",
                                "title",
                                "updated_at",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "position": {
                            "example": 1,
                            "type": "integer"
                          },
                          "stage_type": {
                            "type": "string"
                          },
                          "updated_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          }
                        },
                        "required": [
                          "color",
                          "id",
                          "name",
                          "position",
                          "stage_type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "description",
                    "id",
                    "name",
                    "position",
                    "stages",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          }
        },
        "summary": "Get a pipeline",
        "tags": [
          "Pipelines"
        ]
      },
      "patch": {
        "operationId": "patch-pipelines-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Update a pipeline",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{id}/discard": {
      "patch": {
        "operationId": "patch-pipelines-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Move a pipeline to the recycle bin",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{id}/restore": {
      "patch": {
        "operationId": "patch-pipelines-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "name_changed": {
                      "type": "boolean"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "description",
                    "id",
                    "name",
                    "name_changed",
                    "position",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "limit": {
                              "type": "integer"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "used": {
                              "type": "integer"
                            }
                          },
                          "required": [
                            "limit",
                            "resource",
                            "used"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          }
        },
        "summary": "Restore a pipeline",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{pipeline_id}/deals": {
      "post": {
        "operationId": "post-pipelines-by-pipeline-id-deals",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "deal": {
                    "properties": {
                      "assignee_ids": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "company_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "contact_ids": {
                        "items": {
                          "type": "integer"
                        },
                        "type": "array"
                      },
                      "custom_fields": {
                        "additionalProperties": {
                          "nullable": true,
                          "type": "string"
                        },
                        "description": "Custom field values keyed by definition id. null or blank clears a field.",
                        "type": "object"
                      },
                      "pipeline_stage_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "title": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "pipeline_stage_id",
                      "title"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "deal"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "assignees": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "attachments_count": {
                      "type": "integer"
                    },
                    "closed_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "comments_count": {
                      "type": "integer"
                    },
                    "company": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "id",
                        "name"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "contacts": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "full_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "email",
                          "full_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "currency": {
                      "example": "EUR",
                      "type": "string"
                    },
                    "custom_fields": {
                      "items": {
                        "properties": {
                          "definition_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "field_type": {
                            "type": "string"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "options": {
                            "type": "null"
                          },
                          "placeholder": {
                            "type": "null"
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "definition_id",
                          "field_type",
                          "name",
                          "options",
                          "placeholder",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "description": {
                      "type": "null"
                    },
                    "expected_close_date": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "lost_reason": {
                      "type": "null"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "priority": {
                      "type": "string"
                    },
                    "probability": {
                      "type": "null"
                    },
                    "reactions": {
                      "items": {},
                      "type": "array"
                    },
                    "source": {
                      "type": "null"
                    },
                    "stage": {
                      "properties": {
                        "color": {
                          "type": "null"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        }
                      },
                      "required": [
                        "color",
                        "id",
                        "name"
                      ],
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    },
                    "tags": {
                      "items": {},
                      "type": "array"
                    },
                    "title": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "value": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "assignees",
                    "attachments_count",
                    "closed_at",
                    "comments_count",
                    "company",
                    "contacts",
                    "created_at",
                    "created_by",
                    "currency",
                    "custom_fields",
                    "description",
                    "expected_close_date",
                    "id",
                    "lost_reason",
                    "position",
                    "priority",
                    "probability",
                    "reactions",
                    "source",
                    "stage",
                    "status",
                    "tags",
                    "title",
                    "updated_at",
                    "value"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "base": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "status": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "user": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "value": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a deal to a pipeline",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{pipeline_id}/stages": {
      "post": {
        "operationId": "post-pipelines-by-pipeline-id-stages",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "stage": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "stage"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "color": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "stage_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "color",
                    "created_at",
                    "id",
                    "name",
                    "position",
                    "stage_type",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "stage_type": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "stage_type"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a stage to a pipeline",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{pipeline_id}/stages/{id}": {
      "delete": {
        "operationId": "delete-pipelines-by-pipeline-id-stages-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Remove a stage from a pipeline",
        "tags": [
          "Pipelines"
        ]
      },
      "patch": {
        "operationId": "patch-pipelines-by-pipeline-id-stages-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "stage": {
                    "properties": {
                      "color": {
                        "example": "#6366f1",
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "stage_type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "color",
                      "name",
                      "stage_type"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "stage"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "color": {
                      "example": "#6366f1",
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "stage_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "color",
                    "created_at",
                    "id",
                    "name",
                    "position",
                    "stage_type",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "stage_type": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "stage_type"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a stage for a pipeline",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{pipeline_id}/stages/{id}/discard": {
      "patch": {
        "operationId": "patch-pipelines-by-pipeline-id-stages-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Move a pipeline to the recycle bin",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/pipelines/{pipeline_id}/stages/{id}/restore": {
      "patch": {
        "operationId": "patch-pipelines-by-pipeline-id-stages-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "pipeline_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "color": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "position": {
                      "example": 1,
                      "type": "integer"
                    },
                    "stage_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "color",
                    "created_at",
                    "id",
                    "name",
                    "position",
                    "stage_type",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Restore a pipeline",
        "tags": [
          "Pipelines"
        ]
      }
    },
    "/api/v1/public/docs/{token}": {
      "get": {
        "operationId": "get-public-docs-by-token",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a doc for a public",
        "tags": [
          "Public"
        ]
      }
    },
    "/api/v1/recycle-bin": {
      "get": {
        "operationId": "get-recycle-bin",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "companies": {
                      "items": {},
                      "type": "array"
                    },
                    "contacts": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "discarded_at": {
                            "example": "2026-01-15T09:30:00Z",
                            "type": "string"
                          },
                          "discarded_by": {
                            "type": "null"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "full_name": {
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "discarded_at",
                          "discarded_by",
                          "email",
                          "full_name",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "deals": {
                      "items": {},
                      "type": "array"
                    },
                    "groups": {
                      "items": {},
                      "type": "array"
                    },
                    "pipeline_stages": {
                      "items": {},
                      "type": "array"
                    },
                    "pipelines": {
                      "items": {},
                      "type": "array"
                    },
                    "teams": {
                      "items": {},
                      "type": "array"
                    }
                  },
                  "required": [
                    "companies",
                    "contacts",
                    "deals",
                    "groups",
                    "pipeline_stages",
                    "pipelines",
                    "teams"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List recycle bin items",
        "tags": [
          "Recycle Bin"
        ]
      }
    },
    "/api/v1/reports/deals/{type}": {
      "get": {
        "operationId": "get-reports-deals-by-type",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "group_by",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "pipeline_id",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "tag_id",
            "required": false,
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "path",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "active_deals": {
                            "type": "integer"
                          },
                          "avg_cycle_days": {
                            "type": "string"
                          },
                          "avg_days": {
                            "type": "string"
                          },
                          "close_rate_pct": {
                            "type": "string"
                          },
                          "conversion_rate_pct": {
                            "type": "string"
                          },
                          "days_stale": {
                            "type": "string"
                          },
                          "deal_count": {
                            "type": "integer"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "expected_close_date": {
                            "example": "2026-01-15",
                            "type": "string"
                          },
                          "first_name": {
                            "example": "Ana",
                            "type": "string"
                          },
                          "last_name": {
                            "example": "Kovac",
                            "type": "string"
                          },
                          "lost_count": {
                            "type": "integer"
                          },
                          "lost_reason": {
                            "type": "string"
                          },
                          "lost_value": {
                            "type": "null"
                          },
                          "max_cycle_days": {
                            "type": "string"
                          },
                          "median_days": {
                            "type": "string"
                          },
                          "min_cycle_days": {
                            "type": "string"
                          },
                          "month": {
                            "type": "string"
                          },
                          "open_count": {
                            "type": "integer"
                          },
                          "open_pipeline_value": {
                            "type": "string"
                          },
                          "p90_days": {
                            "type": "string"
                          },
                          "pipeline_name": {
                            "type": "string"
                          },
                          "pipeline_stage_id": {
                            "example": 7,
                            "type": "integer"
                          },
                          "position": {
                            "example": 1,
                            "type": "integer"
                          },
                          "risk_bucket": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "stage_name": {
                            "type": "string"
                          },
                          "stage_type": {
                            "type": "string"
                          },
                          "title": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "total_closed": {
                            "type": "integer"
                          },
                          "total_count": {
                            "type": "integer"
                          },
                          "total_deals": {
                            "type": "integer"
                          },
                          "total_pipeline_value": {
                            "type": "string"
                          },
                          "total_transitions": {
                            "type": "integer"
                          },
                          "value": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "weighted_value": {
                            "type": "string"
                          },
                          "win_rate_pct": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "won_count": {
                            "type": "integer"
                          },
                          "won_value": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "currency": {
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "decimal_digits": {
                              "type": "integer"
                            },
                            "symbol": {
                              "type": "string"
                            },
                            "symbol_position": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "decimal_digits",
                            "symbol",
                            "symbol_position"
                          ],
                          "type": "object"
                        },
                        "page": {
                          "type": "integer"
                        },
                        "per_page": {
                          "type": "integer"
                        },
                        "restricted": {
                          "type": "boolean"
                        },
                        "total": {
                          "type": "integer"
                        },
                        "total_pages": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "page",
                        "per_page",
                        "total",
                        "total_pages"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "feature": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "feature"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Payment Required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a deal report",
        "tags": [
          "Reports"
        ]
      }
    },
    "/api/v1/saved_reports": {
      "get": {
        "operationId": "get-saved-reports",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "entity_type": {
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "params": {
                        "properties": {},
                        "type": "object"
                      },
                      "report_type": {
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "created_at",
                      "created_by",
                      "entity_type",
                      "id",
                      "name",
                      "params",
                      "report_type",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List saved reports",
        "tags": [
          "Saved Reports"
        ]
      },
      "post": {
        "operationId": "post-saved-reports",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "saved_report": {
                    "properties": {
                      "entity_type": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "params": {
                        "properties": {
                          "date_from": {
                            "type": "string"
                          },
                          "pipeline_id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "date_from",
                          "pipeline_id"
                        ],
                        "type": "object"
                      },
                      "report_type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "entity_type",
                      "name",
                      "params",
                      "report_type"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "saved_report"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "params": {
                      "properties": {
                        "date_from": {
                          "type": "string"
                        },
                        "pipeline_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "date_from",
                        "pipeline_id"
                      ],
                      "type": "object"
                    },
                    "report_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "entity_type",
                    "id",
                    "name",
                    "params",
                    "report_type",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "report_type": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a saved report",
        "tags": [
          "Saved Reports"
        ]
      }
    },
    "/api/v1/saved_reports/{id}": {
      "delete": {
        "operationId": "delete-saved-reports-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Delete a saved report",
        "tags": [
          "Saved Reports"
        ]
      },
      "get": {
        "operationId": "get-saved-reports-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "params": {
                      "properties": {},
                      "type": "object"
                    },
                    "report_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "entity_type",
                    "id",
                    "name",
                    "params",
                    "report_type",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a saved report",
        "tags": [
          "Saved Reports"
        ]
      },
      "patch": {
        "operationId": "patch-saved-reports-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "saved_report": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "saved_report"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "entity_type": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "params": {
                      "properties": {},
                      "type": "object"
                    },
                    "report_type": {
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "created_at",
                    "created_by",
                    "entity_type",
                    "id",
                    "name",
                    "params",
                    "report_type",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a saved report",
        "tags": [
          "Saved Reports"
        ]
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "get-search",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "companies": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "sublabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "sublabel",
                          "type",
                          "url"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "contacts": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "sublabel": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "sublabel",
                          "type",
                          "url"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "counts": {
                      "properties": {
                        "companies": {
                          "type": "integer"
                        },
                        "contacts": {
                          "type": "integer"
                        },
                        "deals": {
                          "type": "integer"
                        },
                        "groups": {
                          "type": "integer"
                        },
                        "members": {
                          "type": "integer"
                        },
                        "pages": {
                          "type": "integer"
                        },
                        "saved_reports": {
                          "type": "integer"
                        },
                        "teams": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "companies",
                        "contacts",
                        "deals",
                        "groups",
                        "members",
                        "pages",
                        "saved_reports",
                        "teams"
                      ],
                      "type": "object"
                    },
                    "deals": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "sublabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          },
                          "value": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "sublabel",
                          "type",
                          "url",
                          "value"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "groups": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "sublabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "sublabel",
                          "type",
                          "url"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "members": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "sublabel": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          },
                          "user_id": {
                            "example": 7,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "sublabel",
                          "type",
                          "url",
                          "user_id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "pages": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "sublabel": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "sublabel",
                          "type",
                          "url"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "saved_reports": {
                      "items": {},
                      "type": "array"
                    },
                    "teams": {
                      "items": {
                        "properties": {
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "label": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "sublabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "type": {
                            "type": "string"
                          },
                          "url": {
                            "example": "https://example.com",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "sublabel",
                          "type",
                          "url"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "companies",
                    "contacts",
                    "counts",
                    "deals",
                    "groups",
                    "members",
                    "pages",
                    "saved_reports",
                    "teams"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Search the workspace",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v1/tags": {
      "get": {
        "operationId": "get-tags",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "color": {
                        "example": "#6366f1",
                        "type": "string"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "taggings_count": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "color",
                      "created_at",
                      "id",
                      "name",
                      "taggings_count"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List tags",
        "tags": [
          "Tags"
        ]
      },
      "post": {
        "operationId": "post-tags",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "tag": {
                    "properties": {
                      "color": {
                        "example": "#6366f1",
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "color",
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "tag"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "color": {
                      "example": "#6366f1",
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "taggings_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "color",
                    "created_at",
                    "id",
                    "name",
                    "taggings_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a tag",
        "tags": [
          "Tags"
        ]
      }
    },
    "/api/v1/tags/{id}": {
      "delete": {
        "operationId": "delete-tags-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Delete a tag",
        "tags": [
          "Tags"
        ]
      },
      "patch": {
        "operationId": "patch-tags-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "tag": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "tag"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "color": {
                      "example": "#6366f1",
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "taggings_count": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "color",
                    "created_at",
                    "id",
                    "name",
                    "taggings_count"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "color": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "color"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a tag",
        "tags": [
          "Tags"
        ]
      }
    },
    "/api/v1/teams": {
      "get": {
        "operationId": "get-teams",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "avatar_url": {
                        "type": "null"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "description": {
                        "type": "null"
                      },
                      "discarded_at": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "members": {
                        "items": {},
                        "type": "array"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "updated_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      }
                    },
                    "required": [
                      "avatar_url",
                      "created_at",
                      "description",
                      "discarded_at",
                      "id",
                      "members",
                      "name",
                      "updated_at"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "List teams",
        "tags": [
          "Teams"
        ]
      },
      "options": {
        "operationId": "options-teams",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "CORS preflight",
        "tags": [
          "Teams"
        ]
      },
      "post": {
        "operationId": "post-teams",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "team": {
                    "properties": {
                      "avatar_url": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "team"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "avatar_url": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a team",
        "tags": [
          "Teams"
        ]
      }
    },
    "/api/v1/teams/{id}": {
      "delete": {
        "operationId": "delete-teams-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Delete a team",
        "tags": [
          "Teams"
        ]
      },
      "get": {
        "operationId": "get-teams-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a team",
        "tags": [
          "Teams"
        ]
      },
      "patch": {
        "operationId": "patch-teams-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "team": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "team"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "avatar_url": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "avatar_url"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a team",
        "tags": [
          "Teams"
        ]
      }
    },
    "/api/v1/teams/{id}/discard": {
      "patch": {
        "operationId": "patch-teams-by-id-discard",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Move a team to the recycle bin",
        "tags": [
          "Teams"
        ]
      }
    },
    "/api/v1/teams/{id}/members": {
      "post": {
        "operationId": "post-teams-by-id-members",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "user_id": {
                    "example": 7,
                    "type": "integer"
                  }
                },
                "required": [
                  "user_id"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "user": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "user"
                          ],
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Add a member to a team",
        "tags": [
          "Teams"
        ]
      }
    },
    "/api/v1/teams/{id}/members/{user_id}": {
      "delete": {
        "operationId": "delete-teams-by-id-members-by-user-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Remove a member from a team",
        "tags": [
          "Teams"
        ]
      }
    },
    "/api/v1/teams/{id}/restore": {
      "patch": {
        "operationId": "patch-teams-by-id-restore",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "description": {
                      "type": "null"
                    },
                    "discarded_at": {
                      "type": "null"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "members": {
                      "items": {},
                      "type": "array"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "updated_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "description",
                    "discarded_at",
                    "id",
                    "members",
                    "name",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "Restore a team",
        "tags": [
          "Teams"
        ]
      }
    },
    "/api/v1/webhook_event_types": {
      "get": {
        "operationId": "get-webhook-event-types",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "description": {
                        "type": "string"
                      },
                      "resource": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "description",
                      "resource",
                      "type"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List webhook event types",
        "tags": [
          "Webhook Event Types"
        ]
      }
    },
    "/api/v1/webhook_subscriptions": {
      "get": {
        "operationId": "get-webhook-subscriptions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "active": {
                        "type": "boolean"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "created_by": {
                        "properties": {
                          "avatar_url": {
                            "type": "null"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "email": {
                            "example": "ana@example.com",
                            "type": "string"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "avatar_url",
                          "display_name",
                          "email",
                          "id"
                        ],
                        "type": "object"
                      },
                      "event_types": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "label": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "last_triggered_at": {
                        "type": "null"
                      },
                      "url": {
                        "example": "https://example.com",
                        "type": "string"
                      }
                    },
                    "required": [
                      "active",
                      "created_at",
                      "created_by",
                      "event_types",
                      "id",
                      "label",
                      "last_triggered_at",
                      "url"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List webhook subscriptions",
        "tags": [
          "Webhook Subscriptions"
        ]
      },
      "post": {
        "operationId": "post-webhook-subscriptions",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "webhook_subscription": {
                    "properties": {
                      "event_types": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "label": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "url": {
                        "example": "https://example.com",
                        "type": "string"
                      }
                    },
                    "required": [
                      "event_types",
                      "label",
                      "url"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "webhook_subscription"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "event_types": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "label": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "last_triggered_at": {
                      "type": "null"
                    },
                    "url": {
                      "example": "https://example.com",
                      "type": "string"
                    }
                  },
                  "required": [
                    "active",
                    "created_at",
                    "created_by",
                    "event_types",
                    "id",
                    "label",
                    "last_triggered_at",
                    "url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "event_types": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "url": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ]
      }
    },
    "/api/v1/webhook_subscriptions/{id}": {
      "delete": {
        "operationId": "delete-webhook-subscriptions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          }
        },
        "summary": "Delete a webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ]
      },
      "get": {
        "operationId": "get-webhook-subscriptions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "event_types": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "label": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "last_triggered_at": {
                      "type": "null"
                    },
                    "url": {
                      "example": "https://example.com",
                      "type": "string"
                    }
                  },
                  "required": [
                    "active",
                    "created_at",
                    "created_by",
                    "event_types",
                    "id",
                    "label",
                    "last_triggered_at",
                    "url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get a webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ]
      },
      "patch": {
        "operationId": "patch-webhook-subscriptions-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "webhook_subscription": {
                    "properties": {
                      "active": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "active"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "webhook_subscription"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "active": {
                      "type": "boolean"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "created_by": {
                      "properties": {
                        "avatar_url": {
                          "type": "null"
                        },
                        "display_name": {
                          "type": "string"
                        },
                        "email": {
                          "example": "ana@example.com",
                          "type": "string"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "avatar_url",
                        "display_name",
                        "email",
                        "id"
                      ],
                      "type": "object"
                    },
                    "event_types": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "label": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "last_triggered_at": {
                      "type": "null"
                    },
                    "url": {
                      "example": "https://example.com",
                      "type": "string"
                    }
                  },
                  "required": [
                    "active",
                    "created_at",
                    "created_by",
                    "event_types",
                    "id",
                    "label",
                    "last_triggered_at",
                    "url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Update a webhook subscription",
        "tags": [
          "Webhook Subscriptions"
        ]
      }
    },
    "/api/v1/workspaces": {
      "get": {
        "operationId": "get-workspaces",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "properties": {
                      "avatar_url": {
                        "type": "null"
                      },
                      "created_at": {
                        "example": "2026-01-15T09:30:00Z",
                        "type": "string"
                      },
                      "currency": {
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "decimal_digits": {
                            "type": "integer"
                          },
                          "id": {
                            "example": 42,
                            "type": "integer"
                          },
                          "name": {
                            "example": "Acme",
                            "type": "string"
                          },
                          "symbol": {
                            "type": "string"
                          },
                          "symbol_position": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "decimal_digits",
                          "id",
                          "name",
                          "symbol",
                          "symbol_position"
                        ],
                        "type": "object"
                      },
                      "date_format": {
                        "type": "string"
                      },
                      "id": {
                        "example": 42,
                        "type": "integer"
                      },
                      "locale": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "sample_data_removed_at": {
                        "type": "null"
                      },
                      "sample_data_seeded_at": {
                        "type": "null"
                      },
                      "time_format": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "avatar_url",
                      "created_at",
                      "currency",
                      "date_format",
                      "id",
                      "locale",
                      "name",
                      "sample_data_removed_at",
                      "sample_data_seeded_at",
                      "time_format"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {
              "current-page": {
                "schema": {
                  "type": "integer"
                }
              },
              "page-limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-count": {
                "schema": {
                  "type": "integer"
                }
              },
              "total-pages": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          }
        },
        "summary": "List workspaces",
        "tags": [
          "Workspaces"
        ]
      },
      "post": {
        "operationId": "post-workspaces",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "workspace": {
                    "properties": {
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "workspace"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "currency": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "decimal_digits": {
                          "type": "integer"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        },
                        "symbol": {
                          "type": "string"
                        },
                        "symbol_position": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "decimal_digits",
                        "id",
                        "name",
                        "symbol",
                        "symbol_position"
                      ],
                      "type": "object"
                    },
                    "date_format": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "locale": {
                      "type": "string"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "sample_data_removed_at": {
                      "type": "null"
                    },
                    "sample_data_seeded_at": {
                      "type": "null"
                    },
                    "time_format": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "currency",
                    "date_format",
                    "id",
                    "locale",
                    "name",
                    "sample_data_removed_at",
                    "sample_data_seeded_at",
                    "time_format"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "base": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "name": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Create a workspace",
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/api/v1/workspaces/{id}": {
      "delete": {
        "operationId": "delete-workspaces-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Delete a workspace",
        "tags": [
          "Workspaces"
        ]
      },
      "get": {
        "operationId": "get-workspaces-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "currency": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "decimal_digits": {
                          "type": "integer"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        },
                        "symbol": {
                          "type": "string"
                        },
                        "symbol_position": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "decimal_digits",
                        "id",
                        "name",
                        "symbol",
                        "symbol_position"
                      ],
                      "type": "object"
                    },
                    "date_format": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "locale": {
                      "type": "string"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "sample_data_removed_at": {
                      "type": "null"
                    },
                    "sample_data_seeded_at": {
                      "type": "null"
                    },
                    "time_format": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "currency",
                    "date_format",
                    "id",
                    "locale",
                    "name",
                    "sample_data_removed_at",
                    "sample_data_seeded_at",
                    "time_format"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "summary": "Get a workspace",
        "tags": [
          "Workspaces"
        ]
      },
      "patch": {
        "operationId": "patch-workspaces-by-id",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "workspace": {
                    "properties": {
                      "currency_id": {
                        "example": 7,
                        "type": "integer"
                      },
                      "date_format": {
                        "type": "string"
                      },
                      "locale": {
                        "type": "string"
                      },
                      "name": {
                        "example": "Acme",
                        "type": "string"
                      },
                      "time_format": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "workspace"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "null"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "currency": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "decimal_digits": {
                          "type": "integer"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        },
                        "symbol": {
                          "type": "string"
                        },
                        "symbol_position": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "decimal_digits",
                        "id",
                        "name",
                        "symbol",
                        "symbol_position"
                      ],
                      "type": "object"
                    },
                    "date_format": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "locale": {
                      "type": "string"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "sample_data_removed_at": {
                      "type": "null"
                    },
                    "sample_data_seeded_at": {
                      "type": "null"
                    },
                    "time_format": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "currency",
                    "date_format",
                    "id",
                    "locale",
                    "name",
                    "sample_data_removed_at",
                    "sample_data_seeded_at",
                    "time_format"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "details": {
                          "properties": {
                            "currency": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "date_format": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "locale": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "time_format": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update a workspace",
        "tags": [
          "Workspaces"
        ]
      }
    },
    "/api/v1/workspaces/{id}/avatar": {
      "patch": {
        "operationId": "patch-workspaces-by-id-avatar",
        "parameters": [
          {
            "in": "header",
            "name": "X-Workspace-Id",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "avatar": {
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "avatar"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "avatar_url": {
                      "type": "string"
                    },
                    "created_at": {
                      "example": "2026-01-15T09:30:00Z",
                      "type": "string"
                    },
                    "currency": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "decimal_digits": {
                          "type": "integer"
                        },
                        "id": {
                          "example": 42,
                          "type": "integer"
                        },
                        "name": {
                          "example": "Acme",
                          "type": "string"
                        },
                        "symbol": {
                          "type": "string"
                        },
                        "symbol_position": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "decimal_digits",
                        "id",
                        "name",
                        "symbol",
                        "symbol_position"
                      ],
                      "type": "object"
                    },
                    "date_format": {
                      "type": "string"
                    },
                    "id": {
                      "example": 42,
                      "type": "integer"
                    },
                    "locale": {
                      "type": "string"
                    },
                    "name": {
                      "example": "Acme",
                      "type": "string"
                    },
                    "sample_data_removed_at": {
                      "type": "null"
                    },
                    "sample_data_seeded_at": {
                      "type": "null"
                    },
                    "time_format": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "avatar_url",
                    "created_at",
                    "currency",
                    "date_format",
                    "id",
                    "locale",
                    "name",
                    "sample_data_removed_at",
                    "sample_data_seeded_at",
                    "time_format"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "request_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "request_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Unprocessable Content"
          }
        },
        "summary": "Update the workspace avatar",
        "tags": [
          "Workspaces"
        ]
      }
    }
  },
  "webhooks": {
    "company.created": {
      "post": {
        "description": "A company was created.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-company-created",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full company attributes)"
                },
                "event": "company.created",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A company was created"
      }
    },
    "company.updated": {
      "post": {
        "description": "A company was updated.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-company-updated",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full company attributes)"
                },
                "event": "company.updated",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A company was updated"
      }
    },
    "contact.created": {
      "post": {
        "description": "A contact was created.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-contact-created",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full contact attributes)"
                },
                "event": "contact.created",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A contact was created"
      }
    },
    "contact.updated": {
      "post": {
        "description": "A contact was updated.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-contact-updated",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full contact attributes)"
                },
                "event": "contact.updated",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A contact was updated"
      }
    },
    "deal.created": {
      "post": {
        "description": "A deal was created.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-deal-created",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full deal attributes)"
                },
                "event": "deal.created",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A deal was created"
      }
    },
    "deal.lost": {
      "post": {
        "description": "A deal was marked as lost.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-deal-lost",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full deal attributes)"
                },
                "event": "deal.lost",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A deal was marked as lost"
      }
    },
    "deal.stage_moved": {
      "post": {
        "description": "A deal was moved to a different pipeline stage.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-deal-stage_moved",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full deal attributes)"
                },
                "event": "deal.stage_moved",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A deal was moved to a different pipeline stage"
      }
    },
    "deal.status_changed": {
      "post": {
        "description": "A deal's status changed (open, won, or lost).\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-deal-status_changed",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full deal attributes)"
                },
                "event": "deal.status_changed",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A deal's status changed (open, won, or lost)"
      }
    },
    "deal.updated": {
      "post": {
        "description": "A deal was updated (any field change).\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-deal-updated",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full deal attributes)"
                },
                "event": "deal.updated",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A deal was updated (any field change)"
      }
    },
    "deal.won": {
      "post": {
        "description": "A deal was marked as won.\n\nConfigure receivers via `POST /api/v1/webhook_subscriptions`. Each delivery is an\nHTTP POST with headers:\n\n- `X-Cavyro-Event` — the event type\n- `X-Cavyro-Signature` — `sha256=<hex>`, the HMAC-SHA256 of the raw request body\n  keyed with the subscription's `secret`; verify it before trusting the payload.\n\nRespond with any 2xx status to acknowledge. Failed deliveries are retried with\nbackoff; other subscriptions are unaffected.\n",
        "operationId": "webhook-deal-won",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data": {
                  "id": 42,
                  "name": "Acme (full deal attributes)"
                },
                "event": "deal.won",
                "occurred_at": "2026-01-15T09:30:00Z",
                "workspace_id": 1
              },
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Return any 2xx status to acknowledge receipt."
          }
        },
        "summary": "A deal was marked as won"
      }
    }
  },
  "components": {
    "schemas": {
      "WebhookEvent": {
        "description": "Envelope delivered to webhook subscription URLs.",
        "properties": {
          "data": {
            "additionalProperties": true,
            "description": "The affected resource (deal, contact or company) with the same attributes the REST API returns.",
            "type": "object"
          },
          "event": {
            "description": "Event type. The full list is served by GET /api/v1/webhook_event_types.",
            "example": "deal.created",
            "type": "string"
          },
          "occurred_at": {
            "example": "2026-01-15T09:30:00Z",
            "format": "date-time",
            "type": "string"
          },
          "workspace_id": {
            "example": 1,
            "type": "integer"
          }
        },
        "required": [
          "data",
          "event",
          "occurred_at",
          "workspace_id"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "API token created in the Cavyro app (Settings → API Tokens).",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "tags": [
    {
      "name": "Attachments",
      "description": "File attachments on records and comments."
    },
    {
      "name": "Automations",
      "description": "Event-driven workflows — triggers, actions and runs."
    },
    {
      "name": "Calendar",
      "description": "The aggregated calendar view."
    },
    {
      "name": "Calendar Events",
      "description": "Meetings and events, linkable to contacts."
    },
    {
      "name": "Campaign Templates"
    },
    {
      "name": "Campaigns",
      "description": "Telegram outreach campaigns."
    },
    {
      "name": "Comments",
      "description": "Threaded comments on records, with reactions and attachments."
    },
    {
      "name": "Companies",
      "description": "Organizations in your CRM — the accounts your contacts and deals attach to."
    },
    {
      "name": "Contacts",
      "description": "People in your CRM — create, update, tag them and link them to companies."
    },
    {
      "name": "Currencies",
      "description": "Currencies supported for deal values."
    },
    {
      "name": "Custom Field Definitions",
      "description": "Definitions of the custom fields available on records."
    },
    {
      "name": "Dashboard",
      "description": "The overview dashboard."
    },
    {
      "name": "Dashboards",
      "description": "Custom dashboards and their widgets."
    },
    {
      "name": "Deals",
      "description": "Sales opportunities moving through pipeline stages."
    },
    {
      "name": "Docs"
    },
    {
      "name": "Feed",
      "description": "The workspace activity feed."
    },
    {
      "name": "Feedback",
      "description": "Send product feedback to the Cavyro team."
    },
    {
      "name": "Gmail"
    },
    {
      "name": "Groups",
      "description": "User groups, mentionable in comments."
    },
    {
      "name": "Imports",
      "description": "CSV imports — upload, preview, run and undo."
    },
    {
      "name": "Me",
      "description": "The authenticated user's own profile."
    },
    {
      "name": "Members",
      "description": "Workspace members and their roles."
    },
    {
      "name": "Notification Preferences",
      "description": "Per-user notification settings."
    },
    {
      "name": "Notifications",
      "description": "In-app notifications for the current user."
    },
    {
      "name": "Pages"
    },
    {
      "name": "Pipelines",
      "description": "Pipelines and their stages."
    },
    {
      "name": "Public"
    },
    {
      "name": "Recycle Bin",
      "description": "Soft-deleted records awaiting restore or permanent deletion."
    },
    {
      "name": "Reports",
      "description": "Deal reports."
    },
    {
      "name": "Saved Reports",
      "description": "Saved report configurations."
    },
    {
      "name": "Search",
      "description": "Search across contacts, companies and deals."
    },
    {
      "name": "Tags",
      "description": "Workspace-wide labels for contacts, companies and deals."
    },
    {
      "name": "Teams",
      "description": "Teams within a workspace."
    },
    {
      "name": "Webhook Event Types",
      "description": "The catalog of event types you can subscribe to."
    },
    {
      "name": "Webhook Subscriptions",
      "description": "Manage the URLs Cavyro delivers webhook events to."
    },
    {
      "name": "Workspaces",
      "description": "Workspaces — the top-level container everything else lives in."
    }
  ],
  "x-tagGroups": [
    {
      "name": "CRM",
      "tags": [
        "Companies",
        "Contacts",
        "Deals",
        "Pipelines",
        "Tags",
        "Custom Field Definitions",
        "Imports",
        "Recycle Bin"
      ]
    },
    {
      "name": "Collaboration",
      "tags": [
        "Comments",
        "Attachments",
        "Feed",
        "Notifications",
        "Notification Preferences",
        "Search"
      ]
    },
    {
      "name": "Calendar",
      "tags": [
        "Calendar",
        "Calendar Events"
      ]
    },
    {
      "name": "Automation",
      "tags": [
        "Automations",
        "Campaigns",
        "Webhook Subscriptions",
        "Webhook Event Types"
      ]
    },
    {
      "name": "Reporting",
      "tags": [
        "Dashboard",
        "Dashboards",
        "Reports",
        "Saved Reports"
      ]
    },
    {
      "name": "Workspace & Account",
      "tags": [
        "Workspaces",
        "Members",
        "Teams",
        "Groups",
        "Me",
        "Currencies",
        "Feedback"
      ]
    },
    {
      "name": "Other",
      "tags": [
        "Campaign Templates",
        "Docs",
        "Gmail",
        "Pages",
        "Public"
      ]
    }
  ]
}
