{
  "openapi": "3.0.3",
  "info": {
    "title": "Sayless Public API",
    "version": "1.0.0",
    "description": "Curated work-graph HTTP API for personal API keys (`sl_api_…`) or OAuth tokens (`sl_oat_…`), including app-actor / client_credentials. Documents the API/OAuth response mode only."
  },
  "servers": [
    {
      "url": "https://api.joinsayless.com",
      "description": "Production gateway"
    }
  ],
  "tags": [
    {
      "name": "Tickets"
    },
    {
      "name": "Ticket comments"
    },
    {
      "name": "Ticket statuses"
    },
    {
      "name": "Ticket subscriptions"
    },
    {
      "name": "Conversations"
    },
    {
      "name": "Conversation labels"
    },
    {
      "name": "Conversation statuses"
    },
    {
      "name": "Conversation subscriptions"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Companies"
    },
    {
      "name": "Contacts"
    },
    {
      "name": "Company labels"
    },
    {
      "name": "Company sectors"
    },
    {
      "name": "Contract types"
    },
    {
      "name": "Company relationships"
    },
    {
      "name": "Company updates"
    },
    {
      "name": "Documents"
    },
    {
      "name": "Folders"
    },
    {
      "name": "Notes"
    },
    {
      "name": "Profile memberships"
    },
    {
      "name": "Teams"
    },
    {
      "name": "Team memberships"
    },
    {
      "name": "Attachments"
    },
    {
      "name": "Webhook subscriptions"
    },
    {
      "name": "Webhook deliveries"
    },
    {
      "name": "Workspace"
    },
    {
      "name": "Workspace profiles"
    }
  ],
  "paths": {
    "/api/v1/tickets/list": {
      "post": {
        "operationId": "TicketsController_Ticket_list",
        "summary": "List tickets",
        "description": "Returns the workspace's tickets.",
        "tags": [
          "Tickets"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Ticket"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceTicketsRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/info": {
      "post": {
        "operationId": "TicketsController_Ticket_info",
        "summary": "Get ticket",
        "description": "Returns one ticket by id.",
        "tags": [
          "Tickets"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketInfoRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/create": {
      "post": {
        "operationId": "TicketsController_Ticket_create",
        "summary": "Create ticket",
        "description": "Create ticket. Returns the saved ticket.",
        "tags": [
          "Tickets"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateTicketRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/tickets/update": {
      "post": {
        "operationId": "TicketsController_Ticket_update",
        "summary": "Update ticket",
        "description": "Update ticket. Returns the saved ticket.",
        "tags": [
          "Tickets"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateTicketRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/delete": {
      "post": {
        "operationId": "TicketsController_Ticket_delete",
        "summary": "Delete ticket",
        "description": "Delete ticket. Returns the removed id.",
        "tags": [
          "Tickets"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketDeleteRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/restore": {
      "post": {
        "operationId": "TicketsController_Ticket_restore",
        "summary": "Restore ticket",
        "description": "Restore ticket. Returns the saved ticket.",
        "tags": [
          "Tickets"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketRemoveAssigneeRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/setSla": {
      "post": {
        "operationId": "TicketsController_Ticket_setSla",
        "summary": "Set sla ticket",
        "description": "Set sla ticket. Returns the saved ticket.",
        "tags": [
          "Tickets"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Ticket"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetTicketSlaRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketComment/list": {
      "post": {
        "operationId": "TicketsController_TicketComment_list",
        "summary": "List ticket comments",
        "description": "Returns the workspace's ticket comments.",
        "tags": [
          "Ticket comments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketComment"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketCommentListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketComment/create": {
      "post": {
        "operationId": "TicketsController_TicketComment_create",
        "summary": "Create ticket comment",
        "description": "Create ticket comment. Returns the saved ticket comment.",
        "tags": [
          "Ticket comments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TicketComment"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCreateCommentRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/tickets/ticketComment/update": {
      "post": {
        "operationId": "TicketsController_TicketComment_update",
        "summary": "Update ticket comment",
        "description": "Update ticket comment. Returns the saved ticket comment.",
        "tags": [
          "Ticket comments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TicketComment"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUpdateCommentRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketComment/delete": {
      "post": {
        "operationId": "TicketsController_TicketComment_delete",
        "summary": "Delete ticket comment",
        "description": "Delete ticket comment. Returns the removed id.",
        "tags": [
          "Ticket comments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteCommentRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketComment/addReaction": {
      "post": {
        "operationId": "TicketsController_TicketComment_addReaction",
        "summary": "Add reaction ticket comment",
        "description": "Add reaction ticket comment. Returns the saved ticket comment.",
        "tags": [
          "Ticket comments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TicketComment"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCommentReactionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketComment/removeReaction": {
      "post": {
        "operationId": "TicketsController_TicketComment_removeReaction",
        "summary": "Remove reaction ticket comment",
        "description": "Remove reaction ticket comment. Returns the saved ticket comment.",
        "tags": [
          "Ticket comments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TicketComment"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCommentReactionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketStatus/list": {
      "post": {
        "operationId": "TicketsController_TicketStatus_list",
        "summary": "List ticket statuses",
        "description": "Returns the workspace's ticket statuses.",
        "tags": [
          "Ticket statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketStatus"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceTicketsRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketStatus/create": {
      "post": {
        "operationId": "TicketsController_TicketStatus_create",
        "summary": "Create ticket status",
        "description": "Create ticket status. Returns the saved ticket status.",
        "tags": [
          "Ticket statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TicketStatus"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketStatusCreateRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/tickets/ticketStatus/update": {
      "post": {
        "operationId": "TicketsController_TicketStatus_update",
        "summary": "Update ticket status",
        "description": "Update ticket status. Returns the saved ticket status.",
        "tags": [
          "Ticket statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TicketStatus"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketStatusUpdateRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketStatus/delete": {
      "post": {
        "operationId": "TicketsController_TicketStatus_delete",
        "summary": "Delete ticket status",
        "description": "Delete ticket status. Returns the removed id.",
        "tags": [
          "Ticket statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketStatusDeleteRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketSubscriptions/list": {
      "post": {
        "operationId": "TicketsController_TicketSubscription_list",
        "summary": "List ticket subscriptions",
        "description": "Returns the workspace's ticket subscriptions.",
        "tags": [
          "Ticket subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TicketSubscription"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketSubscriptionListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketSubscriptions/info": {
      "post": {
        "operationId": "TicketsController_TicketSubscription_info",
        "summary": "Get ticket subscription",
        "description": "Returns one ticket subscription by id.",
        "tags": [
          "Ticket subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TicketSubscription"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketInfoRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/tickets/ticketSubscriptions/create": {
      "post": {
        "operationId": "TicketsController_TicketSubscription_create",
        "summary": "Create ticket subscription",
        "description": "Create ticket subscription. Returns the saved ticket subscription.",
        "tags": [
          "Ticket subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TicketSubscription"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketSubscriptionRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/tickets/ticketSubscriptions/delete": {
      "post": {
        "operationId": "TicketsController_TicketSubscription_delete",
        "summary": "Delete ticket subscription",
        "description": "Delete ticket subscription. Returns the removed id.",
        "tags": [
          "Ticket subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketSubscriptionDeleteRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/list": {
      "post": {
        "operationId": "ConversationsController_Conversation_list",
        "summary": "List conversations",
        "description": "Returns the workspace's conversations.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Conversation"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/info": {
      "post": {
        "operationId": "ConversationsController_Conversation_info",
        "summary": "Get conversation",
        "description": "Returns one conversation by id.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InfoConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/update": {
      "post": {
        "operationId": "ConversationsController_Conversation_update",
        "summary": "Update conversation",
        "description": "Update conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationUpdateRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/delete": {
      "post": {
        "operationId": "ConversationsController_Conversation_delete",
        "summary": "Delete conversation",
        "description": "Delete conversation. Returns the removed id.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/restore": {
      "post": {
        "operationId": "ConversationsController_Conversation_restore",
        "summary": "Restore conversation",
        "description": "Restore conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/archive": {
      "post": {
        "operationId": "ConversationsController_Conversation_archive",
        "summary": "Archive conversation",
        "description": "Archive conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/unarchive": {
      "post": {
        "operationId": "ConversationsController_Conversation_unarchive",
        "summary": "Unarchive conversation",
        "description": "Unarchive conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArchiveConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/addTeam": {
      "post": {
        "operationId": "ConversationsController_Conversation_addTeam",
        "summary": "Add team conversation",
        "description": "Add team conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddTeamRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/assignUser": {
      "post": {
        "operationId": "ConversationsController_Conversation_assignUser",
        "summary": "Assign user conversation",
        "description": "Assign user conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/linkTicket": {
      "post": {
        "operationId": "ConversationsController_Conversation_linkTicket",
        "summary": "Link ticket conversation",
        "description": "Link ticket conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkTicketRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/markRead": {
      "post": {
        "operationId": "ConversationsController_Conversation_markRead",
        "summary": "Mark read conversation",
        "description": "Mark read conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConversationRead"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkReadRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/markSpam": {
      "post": {
        "operationId": "ConversationsController_Conversation_markSpam",
        "summary": "Mark spam conversation",
        "description": "Mark spam conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkSpamRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/markUnread": {
      "post": {
        "operationId": "ConversationsController_Conversation_markUnread",
        "summary": "Mark unread conversation",
        "description": "Mark unread conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConversationRead"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkReadRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/removeTeam": {
      "post": {
        "operationId": "ConversationsController_Conversation_removeTeam",
        "summary": "Remove team conversation",
        "description": "Remove team conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveTeamRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/restoreSpam": {
      "post": {
        "operationId": "ConversationsController_Conversation_restoreSpam",
        "summary": "Restore spam conversation",
        "description": "Restore spam conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RestoreSpamConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/setSla": {
      "post": {
        "operationId": "ConversationsController_Conversation_setSla",
        "summary": "Set sla conversation",
        "description": "Set sla conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetConversationSlaRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/snooze": {
      "post": {
        "operationId": "ConversationsController_Conversation_snooze",
        "summary": "Snooze conversation",
        "description": "Snooze conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSnoozeRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/unassignUser": {
      "post": {
        "operationId": "ConversationsController_Conversation_unassignUser",
        "summary": "Unassign user conversation",
        "description": "Unassign user conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/unsnooze": {
      "post": {
        "operationId": "ConversationsController_Conversation_unsnooze",
        "summary": "Unsnooze conversation",
        "description": "Unsnooze conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveSnoozeRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/updateCompany": {
      "post": {
        "operationId": "ConversationsController_Conversation_updateCompany",
        "summary": "Update company conversation",
        "description": "Update company conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanyRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/updateLabels": {
      "post": {
        "operationId": "ConversationsController_Conversation_updateLabels",
        "summary": "Update labels conversation",
        "description": "Update labels conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLabelsRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/updatePriority": {
      "post": {
        "operationId": "ConversationsController_Conversation_updatePriority",
        "summary": "Update priority conversation",
        "description": "Update priority conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePriorityRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/updateStatus": {
      "post": {
        "operationId": "ConversationsController_Conversation_updateStatus",
        "summary": "Update status conversation",
        "description": "Update status conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/updateSubject": {
      "post": {
        "operationId": "ConversationsController_Conversation_updateSubject",
        "summary": "Update subject conversation",
        "description": "Update subject conversation. Returns the saved conversation.",
        "tags": [
          "Conversations"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Conversation"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubjectRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationLabels/list": {
      "post": {
        "operationId": "ConversationsController_ConversationLabel_list",
        "summary": "List conversation labels",
        "description": "Returns the workspace's conversation labels.",
        "tags": [
          "Conversation labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConversationLabel"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncedModelListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationLabels/create": {
      "post": {
        "operationId": "ConversationsController_ConversationLabel_create",
        "summary": "Create conversation label",
        "description": "Create conversation label. Returns the saved conversation label.",
        "tags": [
          "Conversation labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConversationLabel"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationLabelCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/conversations/conversationLabels/update": {
      "post": {
        "operationId": "ConversationsController_ConversationLabel_update",
        "summary": "Update conversation label",
        "description": "Update conversation label. Returns the saved conversation label.",
        "tags": [
          "Conversation labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConversationLabel"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationLabelUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationLabels/delete": {
      "post": {
        "operationId": "ConversationsController_ConversationLabel_delete",
        "summary": "Delete conversation label",
        "description": "Delete conversation label. Returns the removed id.",
        "tags": [
          "Conversation labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationLabelDeleteInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationStatus/list": {
      "post": {
        "operationId": "ConversationsController_ConversationStatus_list",
        "summary": "List conversation statuses",
        "description": "Returns the workspace's conversation statuses.",
        "tags": [
          "Conversation statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConversationStatus"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncedModelListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationStatus/create": {
      "post": {
        "operationId": "ConversationsController_ConversationStatus_create",
        "summary": "Create conversation status",
        "description": "Create conversation status. Returns the saved conversation status.",
        "tags": [
          "Conversation statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConversationStatus"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationStatusCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/conversations/conversationStatus/update": {
      "post": {
        "operationId": "ConversationsController_ConversationStatus_update",
        "summary": "Update conversation status",
        "description": "Update conversation status. Returns the saved conversation status.",
        "tags": [
          "Conversation statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConversationStatus"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationStatusUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationStatus/delete": {
      "post": {
        "operationId": "ConversationsController_ConversationStatus_delete",
        "summary": "Delete conversation status",
        "description": "Delete conversation status. Returns the removed id.",
        "tags": [
          "Conversation statuses"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationStatusDeleteInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationSubscriptions/list": {
      "post": {
        "operationId": "ConversationsController_ConversationSubscription_list",
        "summary": "List conversation subscriptions",
        "description": "Returns the workspace's conversation subscriptions.",
        "tags": [
          "Conversation subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConversationSubscription"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationSubscriptionListRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationSubscriptions/info": {
      "post": {
        "operationId": "ConversationsController_ConversationSubscription_info",
        "summary": "Get conversation subscription",
        "description": "Returns one conversation subscription by id.",
        "tags": [
          "Conversation subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConversationSubscription"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationSubscriptionInfoRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationSubscriptions/create": {
      "post": {
        "operationId": "ConversationsController_ConversationSubscription_create",
        "summary": "Create conversation subscription",
        "description": "Create conversation subscription. Returns the saved conversation subscription.",
        "tags": [
          "Conversation subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ConversationSubscription"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationSubscriptionCreateRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/conversations/conversationSubscriptions/delete": {
      "post": {
        "operationId": "ConversationsController_ConversationSubscription_delete",
        "summary": "Delete conversation subscription",
        "description": "Delete conversation subscription. Returns the removed id.",
        "tags": [
          "Conversation subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnsubscribeConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/conversationSubscriptions/conversation": {
      "post": {
        "operationId": "ConversationsController_listSubscriptionsForConversation",
        "summary": "List conversation subscriptions",
        "description": "Returns the workspace's conversation subscriptions.",
        "tags": [
          "Conversation subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConversationSubscription"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationSubscriptionListRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/list": {
      "post": {
        "operationId": "MessagesController_Message_list",
        "summary": "List messages",
        "description": "Returns the workspace's messages.",
        "tags": [
          "Messages"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Message"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListConversationMessagesRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/send": {
      "post": {
        "operationId": "MessagesController_Message_send",
        "summary": "Send message",
        "description": "Send message. Returns the saved message.",
        "tags": [
          "Messages"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/messages/edit": {
      "post": {
        "operationId": "MessagesController_Message_edit",
        "summary": "Edit message",
        "description": "Edit message. Returns the saved message.",
        "tags": [
          "Messages"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditMessageRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/delete": {
      "post": {
        "operationId": "MessagesController_Message_delete",
        "summary": "Delete message",
        "description": "Delete message. Returns the removed id.",
        "tags": [
          "Messages"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteMessageRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/addReaction": {
      "post": {
        "operationId": "MessagesController_Message_addReaction",
        "summary": "Add reaction message",
        "description": "Add reaction message. Returns the saved message.",
        "tags": [
          "Messages"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddReactionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/messages/removeReaction": {
      "post": {
        "operationId": "MessagesController_Message_removeReaction",
        "summary": "Remove reaction message",
        "description": "Remove reaction message. Returns the saved message.",
        "tags": [
          "Messages"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddReactionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/list": {
      "post": {
        "operationId": "CompaniesController_Company_list",
        "summary": "List companies",
        "description": "Returns the workspace's companies.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Company"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyQueryRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/info": {
      "post": {
        "operationId": "CompaniesController_Company_info",
        "summary": "Get company",
        "description": "Returns one company by id.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Company"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/create": {
      "post": {
        "operationId": "CompaniesController_Company_create",
        "summary": "Create company",
        "description": "Create company. Returns the saved company.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Company"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompanyRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/update": {
      "post": {
        "operationId": "CompaniesController_Company_update",
        "summary": "Update company",
        "description": "Update company. Returns the saved company.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Company"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanyRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/delete": {
      "post": {
        "operationId": "CompaniesController_Company_delete",
        "summary": "Delete company",
        "description": "Delete company. Returns the removed id.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/restore": {
      "post": {
        "operationId": "CompaniesController_Company_restore",
        "summary": "Restore company",
        "description": "Restore company. Returns the saved company.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Company"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/archive": {
      "post": {
        "operationId": "CompaniesController_Company_archive",
        "summary": "Archive company",
        "description": "Archive company. Returns the saved company.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Company"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/unarchive": {
      "post": {
        "operationId": "CompaniesController_Company_unarchive",
        "summary": "Unarchive company",
        "description": "Unarchive company. Returns the saved company.",
        "tags": [
          "Companies"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Company"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contacts/list": {
      "post": {
        "operationId": "CompaniesController_Contact_list",
        "summary": "List contacts",
        "description": "Returns the workspace's contacts.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Contact"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactQueryRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contacts/info": {
      "post": {
        "operationId": "CompaniesController_Contact_info",
        "summary": "Get contact",
        "description": "Returns one contact by id.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Contact"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contacts/create": {
      "post": {
        "operationId": "CompaniesController_Contact_create",
        "summary": "Create contact",
        "description": "Create contact. Returns the saved contact.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Contact"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateContactRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/contacts/update": {
      "post": {
        "operationId": "CompaniesController_Contact_update",
        "summary": "Update contact",
        "description": "Update contact. Returns the saved contact.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Contact"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContactRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contacts/delete": {
      "post": {
        "operationId": "CompaniesController_Contact_delete",
        "summary": "Delete contact",
        "description": "Delete contact. Returns the removed id.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contacts/restore": {
      "post": {
        "operationId": "CompaniesController_Contact_restore",
        "summary": "Restore contact",
        "description": "Restore contact. Returns the saved contact.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Contact"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contacts/archive": {
      "post": {
        "operationId": "CompaniesController_Contact_archive",
        "summary": "Archive contact",
        "description": "Archive contact. Returns the saved contact.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Contact"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contacts/unarchive": {
      "post": {
        "operationId": "CompaniesController_Contact_unarchive",
        "summary": "Unarchive contact",
        "description": "Unarchive contact. Returns the saved contact.",
        "tags": [
          "Contacts"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Contact"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/companyLabels/list": {
      "post": {
        "operationId": "CompaniesController_CompanyLabel_list",
        "summary": "List company labels",
        "description": "Returns the workspace's company labels.",
        "tags": [
          "Company labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CompanyLabel"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncedModelListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/companyLabels/info": {
      "post": {
        "operationId": "CompaniesController_CompanyLabel_info",
        "summary": "Get company label",
        "description": "Returns one company label by id.",
        "tags": [
          "Company labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CompanyLabel"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncedModelInfoInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/companyLabels/create": {
      "post": {
        "operationId": "CompaniesController_CompanyLabel_create",
        "summary": "Create company label",
        "description": "Create company label. Returns the saved company label.",
        "tags": [
          "Company labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyLabel"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyLabelCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/companyLabels/update": {
      "post": {
        "operationId": "CompaniesController_CompanyLabel_update",
        "summary": "Update company label",
        "description": "Update company label. Returns the saved company label.",
        "tags": [
          "Company labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyLabel"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyLabelUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/companyLabels/delete": {
      "post": {
        "operationId": "CompaniesController_CompanyLabel_delete",
        "summary": "Delete company label",
        "description": "Delete company label. Returns the removed id.",
        "tags": [
          "Company labels"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyLabelDeleteInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/companySectors/create": {
      "post": {
        "operationId": "CompaniesController_CompanySector_create",
        "summary": "Create company sector",
        "description": "Create company sector. Returns the saved company sector.",
        "tags": [
          "Company sectors"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanySector"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySectorCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/companySectors/update": {
      "post": {
        "operationId": "CompaniesController_CompanySector_update",
        "summary": "Update company sector",
        "description": "Update company sector. Returns the saved company sector.",
        "tags": [
          "Company sectors"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanySector"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySectorUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/companySectors/delete": {
      "post": {
        "operationId": "CompaniesController_CompanySector_delete",
        "summary": "Delete company sector",
        "description": "Delete company sector. Returns the removed id.",
        "tags": [
          "Company sectors"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanySectorDeleteInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/contractTypes/create": {
      "post": {
        "operationId": "CompaniesController_ContractType_create",
        "summary": "Create contract type",
        "description": "Create contract type. Returns the saved contract type.",
        "tags": [
          "Contract types"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ContractType"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContractTypeCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/contractTypes/update": {
      "post": {
        "operationId": "CompaniesController_ContractType_update",
        "summary": "Update contract type",
        "description": "Update contract type. Returns the saved contract type.",
        "tags": [
          "Contract types"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ContractType"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContractTypeUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/relationships/create": {
      "post": {
        "operationId": "CompaniesController_CompanyRelationship_create",
        "summary": "Create company relationship",
        "description": "Create company relationship. Returns the saved company relationship.",
        "tags": [
          "Company relationships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyRelationship"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyRelationshipCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/relationships/update": {
      "post": {
        "operationId": "CompaniesController_CompanyRelationship_update",
        "summary": "Update company relationship",
        "description": "Update company relationship. Returns the saved company relationship.",
        "tags": [
          "Company relationships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyRelationship"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyRelationshipUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/relationships/delete": {
      "post": {
        "operationId": "CompaniesController_CompanyRelationship_delete",
        "summary": "Delete company relationship",
        "description": "Delete company relationship. Returns the removed id.",
        "tags": [
          "Company relationships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RowInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/updates/create": {
      "post": {
        "operationId": "CompaniesController_CompanyUpdate_create",
        "summary": "Create company update",
        "description": "Create company update. Returns the saved company update.",
        "tags": [
          "Company updates"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyUpdate"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/updates/update": {
      "post": {
        "operationId": "CompaniesController_CompanyUpdate_update",
        "summary": "Update company update",
        "description": "Update company update. Returns the saved company update.",
        "tags": [
          "Company updates"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/CompanyUpdate"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/updates/delete": {
      "post": {
        "operationId": "CompaniesController_CompanyUpdate_delete",
        "summary": "Delete company update",
        "description": "Delete company update. Returns the removed id.",
        "tags": [
          "Company updates"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUpdateDeleteInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/list": {
      "post": {
        "operationId": "CompaniesController_Document_list",
        "summary": "List documents",
        "description": "Returns the workspace's documents.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Document"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentQueryRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/info": {
      "post": {
        "operationId": "CompaniesController_Document_info",
        "summary": "Get document",
        "description": "Returns one document by id.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Document"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/create": {
      "post": {
        "operationId": "CompaniesController_Document_create",
        "summary": "Create document",
        "description": "Create document. Returns the saved document.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Document"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/documents/update": {
      "post": {
        "operationId": "CompaniesController_Document_update",
        "summary": "Update document",
        "description": "Update document. Returns the saved document.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Document"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/delete": {
      "post": {
        "operationId": "CompaniesController_Document_delete",
        "summary": "Delete document",
        "description": "Delete document. Returns the removed id.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/restore": {
      "post": {
        "operationId": "CompaniesController_Document_restore",
        "summary": "Restore document",
        "description": "Restore document. Returns the saved document.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Document"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/addUser": {
      "post": {
        "operationId": "CompaniesController_Document_addUser",
        "summary": "Add user document",
        "description": "Add user document. Returns the saved document.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProfileMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentAddUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/removeUser": {
      "post": {
        "operationId": "CompaniesController_Document_removeUser",
        "summary": "Remove user document",
        "description": "Remove user document. Returns the removed id.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentRemoveUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/documents/updateUserPermission": {
      "post": {
        "operationId": "CompaniesController_Document_updateUserPermission",
        "summary": "Update user permission document",
        "description": "Update user permission document. Returns the saved document.",
        "tags": [
          "Documents"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ProfileMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentUpdateUserPermissionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/folders/list": {
      "post": {
        "operationId": "CompaniesController_Folder_list",
        "summary": "List folders",
        "description": "Returns the workspace's folders.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Folder"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFolderQueryRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/folders/create": {
      "post": {
        "operationId": "CompaniesController_Folder_create",
        "summary": "Create folder",
        "description": "Create folder. Returns the saved folder.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Folder"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentFolderRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/folders/update": {
      "post": {
        "operationId": "CompaniesController_Folder_update",
        "summary": "Update folder",
        "description": "Update folder. Returns the saved folder.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Folder"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentFolderRequestRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/folders/delete": {
      "post": {
        "operationId": "CompaniesController_Folder_delete",
        "summary": "Delete folder",
        "description": "Delete folder. Returns the removed id.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteDocumentFolderRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/folders/restore": {
      "post": {
        "operationId": "CompaniesController_Folder_restore",
        "summary": "Restore folder",
        "description": "Restore folder. Returns the saved folder.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Folder"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteDocumentFolderRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/folders/addUser": {
      "post": {
        "operationId": "CompaniesController_Folder_addUser",
        "summary": "Add user folder",
        "description": "Add user folder. Returns the saved folder.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProfileMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFolderAddUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/folders/removeUser": {
      "post": {
        "operationId": "CompaniesController_Folder_removeUser",
        "summary": "Remove user folder",
        "description": "Remove user folder. Returns the removed id.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFolderRemoveUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/folders/updateUserPermission": {
      "post": {
        "operationId": "CompaniesController_Folder_updateUserPermission",
        "summary": "Update user permission folder",
        "description": "Update user permission folder. Returns the saved folder.",
        "tags": [
          "Folders"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ProfileMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocumentFolderUpdateUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/list": {
      "post": {
        "operationId": "CompaniesController_Note_list",
        "summary": "List notes",
        "description": "Returns the workspace's notes.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Note"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteQueryRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/info": {
      "post": {
        "operationId": "CompaniesController_Note_info",
        "summary": "Get note",
        "description": "Returns one note by id.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteInfoRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/create": {
      "post": {
        "operationId": "CompaniesController_Note_create",
        "summary": "Create note",
        "description": "Create note. Returns the saved note.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateNoteRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/companies/notes/update": {
      "post": {
        "operationId": "CompaniesController_Note_update",
        "summary": "Update note",
        "description": "Update note. Returns the saved note.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNoteRequestRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/delete": {
      "post": {
        "operationId": "CompaniesController_Note_delete",
        "summary": "Delete note",
        "description": "Delete note. Returns the removed id.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/restore": {
      "post": {
        "operationId": "CompaniesController_Note_restore",
        "summary": "Restore note",
        "description": "Restore note. Returns the saved note.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Note"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteIdRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/addUser": {
      "post": {
        "operationId": "CompaniesController_Note_addUser",
        "summary": "Add user note",
        "description": "Add user note. Returns the saved note.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProfileMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteAddUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/removeUser": {
      "post": {
        "operationId": "CompaniesController_Note_removeUser",
        "summary": "Remove user note",
        "description": "Remove user note. Returns the removed id.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteRemoveUserRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/notes/updateUserPermission": {
      "post": {
        "operationId": "CompaniesController_Note_updateUserPermission",
        "summary": "Update user permission note",
        "description": "Update user permission note. Returns the saved note.",
        "tags": [
          "Notes"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/ProfileMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NoteUpdateUserPermissionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/companies/profileMemberships/list": {
      "post": {
        "operationId": "CompaniesController_ProfileMembership_list",
        "summary": "List profile memberships",
        "description": "Returns the workspace's profile memberships.",
        "tags": [
          "Profile memberships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProfileMembership"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileMembershipListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/list": {
      "post": {
        "operationId": "TeamRoutesController_Team_list",
        "summary": "List teams",
        "description": "Returns the workspace's teams.",
        "tags": [
          "Teams"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Team"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/info": {
      "post": {
        "operationId": "TeamRoutesController_Team_info",
        "summary": "Get team",
        "description": "Returns one team by id.",
        "tags": [
          "Teams"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamInfoInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/create": {
      "post": {
        "operationId": "TeamRoutesController_Team_create",
        "summary": "Create team",
        "description": "Create team. Returns the saved team.",
        "tags": [
          "Teams"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/teams/update": {
      "post": {
        "operationId": "TeamRoutesController_Team_update",
        "summary": "Update team",
        "description": "Update team. Returns the saved team.",
        "tags": [
          "Teams"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/removeParent": {
      "post": {
        "operationId": "TeamRoutesController_Team_removeParent",
        "summary": "Remove parent team",
        "description": "Remove parent team. Returns the saved team.",
        "tags": [
          "Teams"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "workspaceId"
                ],
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Workspace id"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/retire": {
      "post": {
        "operationId": "TeamRoutesController_Team_retire",
        "summary": "Retire team",
        "description": "Retire team. Returns the removed id.",
        "tags": [
          "Teams"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "workspaceId"
                ],
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Workspace id"
                  }
                },
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/setParent": {
      "post": {
        "operationId": "TeamRoutesController_Team_setParent",
        "summary": "Set parent team",
        "description": "Set parent team. Returns the saved team.",
        "tags": [
          "Teams"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Team"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamSetParentInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/memberships/list": {
      "post": {
        "operationId": "TeamRoutesController_TeamMembership_list",
        "summary": "List team memberships",
        "description": "Returns the workspace's team memberships.",
        "tags": [
          "Team memberships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TeamMembership"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMembershipListInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/memberships/create": {
      "post": {
        "operationId": "TeamRoutesController_TeamMembership_create",
        "summary": "Create team membership",
        "description": "Create team membership. Returns the saved team membership.",
        "tags": [
          "Team memberships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TeamMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMembershipCreateInputRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/teams/memberships/update": {
      "post": {
        "operationId": "TeamRoutesController_TeamMembership_update",
        "summary": "Update team membership",
        "description": "Update team membership. Returns the saved team membership.",
        "tags": [
          "Team memberships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/TeamMembership"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMembershipUpdateInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/teams/memberships/delete": {
      "post": {
        "operationId": "TeamRoutesController_TeamMembership_delete",
        "summary": "Delete team membership",
        "description": "Delete team membership. Returns the removed id.",
        "tags": [
          "Team memberships"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TeamMembershipDeleteInputRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/attachments/create": {
      "post": {
        "operationId": "AttachmentsController_createAttachment",
        "summary": "Create attachment",
        "description": "Creates a attachment.",
        "tags": [
          "Attachments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentUpload"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAttachmentRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/attachments/create-from-url": {
      "post": {
        "operationId": "AttachmentsController_createAttachmentFromUrl",
        "summary": "Create-from-url",
        "description": "Creates an attachment from a URL Sayless can fetch.",
        "tags": [
          "Attachments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentFromUrl"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAttachmentFromUrlRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/attachments/delete": {
      "post": {
        "operationId": "AttachmentsController_deleteAttachment",
        "summary": "Delete attachment",
        "description": "Deletes a attachment.",
        "tags": [
          "Attachments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAttachmentRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/attachments/complete": {
      "post": {
        "operationId": "AttachmentsController_completeAttachment",
        "summary": "Complete attachment",
        "description": "Marks an attachment upload as finished so it can be used.",
        "tags": [
          "Attachments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttachmentComplete"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteAttachmentRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/attachments/content": {
      "get": {
        "operationId": "AttachmentsController_handleGetContent",
        "summary": "Content",
        "description": "Returns the bytes for an attachment.",
        "tags": [
          "Attachments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {}
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/attachments/redirect": {
      "post": {
        "operationId": "AttachmentsController_handlePostRedirect",
        "summary": "Redirect",
        "description": "Redirects to the attachment file URL.",
        "tags": [
          "Attachments"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "302": {
            "description": "Redirects to the file."
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachmentRedirectBodyRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhookSubscriptions/list": {
      "post": {
        "operationId": "WebhookSubscriptionRoutesController_WebhookSubscription_list",
        "summary": "List webhook subscriptions",
        "description": "Returns the workspace's webhook subscriptions.",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListWebhookSubscriptionsRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhookSubscriptions/create": {
      "post": {
        "operationId": "WebhookSubscriptionRoutesController_WebhookSubscription_create",
        "summary": "Create webhook subscription",
        "description": "Create webhook subscription. Returns the saved webhook subscription.",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookSubscriptionRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Optional. Safe retries for create/send: same key + route + workspace returns the cached success body for 24h. API/OAuth only.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/api/v1/webhookSubscriptions/update": {
      "post": {
        "operationId": "WebhookSubscriptionRoutesController_WebhookSubscription_update",
        "summary": "Update webhook subscription",
        "description": "Update webhook subscription. Returns the saved webhook subscription.",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public mutation payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    },
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookSubscriptionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhookSubscriptions/delete": {
      "post": {
        "operationId": "WebhookSubscriptionRoutesController_WebhookSubscription_delete",
        "summary": "Delete webhook subscription",
        "description": "Delete webhook subscription. Returns the removed id.",
        "tags": [
          "Webhook subscriptions"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Public delete payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDeletePayload"
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteWebhookSubscriptionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/webhookSubscriptions/deliveries/list": {
      "post": {
        "operationId": "WebhookSubscriptionRoutesController_WebhookDelivery_list",
        "summary": "List webhook deliveries",
        "description": "Returns the workspace's webhook deliveries.",
        "tags": [
          "Webhook deliveries"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListWebhookDeliveriesRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/users/workspaces/info": {
      "post": {
        "operationId": "UsersController_workspaceInfo",
        "summary": "Get workspace",
        "description": "Returns one workspace.",
        "tags": [
          "Workspace"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Workspace"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceInfoRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/users/me": {
      "get": {
        "operationId": "UsersController_currentIdentity",
        "summary": "Get current identity",
        "description": "Returns the profile and workspace bound to this API key or OAuth token. No body and no scope are required.",
        "tags": [
          "Workspace"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PublicIdentity"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/users/workspaceProfiles/list": {
      "post": {
        "operationId": "UsersController_WorkspaceProfile_list",
        "summary": "List workspace profiles",
        "description": "Returns the workspace's workspace profiles.",
        "tags": [
          "Workspace profiles"
        ],
        "x-stability": "stable",
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkspaceProfile"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/ListPagination"
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicErrorEnvelope"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceProfileListInputRequest"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key or OAuth access token",
        "description": "Personal API key (`sl_api_…`) or OAuth access token (`sl_oat_…`)"
      }
    },
    "schemas": {
      "Ticket": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "urlId": {
            "type": "string",
            "description": "12-character id used in ticket URLs."
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "content": {
            "type": "string",
            "description": "Lexical document JSON."
          },
          "preview": {
            "type": "string",
            "description": "Plain-text excerpt of the body."
          },
          "statusId": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "default": 3,
            "description": "1 urgent, 2 high, 3 normal, 4 low."
          },
          "assigneeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "contactIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "ticketNumber": {
            "type": "integer"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        }
      },
      "TicketComment": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "senderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "content": {
            "type": "string",
            "description": "Lexical document JSON."
          },
          "field": {
            "type": "string",
            "nullable": true
          },
          "contentAttributes": {
            "type": "object",
            "additionalProperties": true
          },
          "reactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "emoji": {
                  "type": "string"
                },
                "createdById": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "edited": {
            "type": "boolean"
          },
          "quotedCommentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "quotedContent": {
            "type": "string",
            "nullable": true
          },
          "quotedSenderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "internalThreadId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "platformChannelId": {
            "type": "string",
            "nullable": true
          },
          "platformMessageId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkspaceTicketsRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "TicketInfoRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "description": "Ticket UUID, or a `subject-urlId` slug."
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "PublicCreateTicketRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "description": "Markdown. Stored as a Lexical document; preview is derived."
          },
          "statusId": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "description": "1 urgent, 2 high, 3 normal, 4 low. Defaults to 3 when omitted.",
            "default": 3
          },
          "assigneeId": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "contactIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "urlId": {
            "type": "string",
            "nullable": true,
            "description": "12-character url id. Omitted values are generated."
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attachmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "conversationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "subject",
          "description",
          "statusId"
        ]
      },
      "PublicUpdateTicketRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "statusId": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "description": "1 urgent, 2 high, 3 normal, 4 low."
          },
          "assigneeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "companyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "contactIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Markdown. Replaces the ticket body and its content document."
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "TicketDeleteRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "permanent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "TicketRemoveAssigneeRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "SetTicketSlaRequest": {
        "type": "object",
        "properties": {
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "metric": {
            "type": "string",
            "enum": [
              "firstResponse",
              "nextResponse",
              "resolution"
            ],
            "description": "Clock to set. `firstResponse` is the first reply, `nextResponse` is the following reply, and `resolution` is time to resolve."
          },
          "durationSeconds": {
            "type": "integer",
            "nullable": true,
            "maximum": 31536000,
            "minimum": 1,
            "description": "Target length in seconds. Send null to remove the resolution SLA. Maximum is one year."
          }
        },
        "additionalProperties": false,
        "required": [
          "ticketId",
          "workspaceId",
          "metric"
        ]
      },
      "TicketCommentListInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          },
          "ticketId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "ticketId"
        ]
      },
      "PublicCreateCommentRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "description": "Markdown. Stored as a Lexical document."
          },
          "entryType": {
            "type": "string",
            "enum": [
              "comment"
            ]
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "quotedCommentId": {
            "type": "string",
            "format": "uuid"
          },
          "quotedContent": {
            "type": "string"
          },
          "quotedSenderId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "ticketId",
          "description"
        ]
      },
      "PublicUpdateCommentRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "description": "Markdown. Stored as a Lexical document."
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id",
          "description"
        ]
      },
      "DeleteCommentRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "PublicCommentReactionRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid",
            "description": "Comment id."
          },
          "emoji": {
            "type": "string",
            "description": "Unicode emoji character. Example: 👍"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id",
          "emoji"
        ]
      },
      "TicketStatus": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "waiting_on_customer",
              "resolved",
              "cancelled"
            ]
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "customerLabel": {
            "type": "string",
            "nullable": true
          },
          "index": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "TicketStatusCreateRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "waiting_on_customer",
              "resolved",
              "cancelled"
            ]
          },
          "customerLabel": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "name",
          "color",
          "category"
        ]
      },
      "TicketStatusUpdateRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "updateData": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id",
          "updateData"
        ]
      },
      "TicketStatusDeleteRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "replacementStatusId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "TicketSubscription": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "subscriberId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TicketSubscriptionListInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          },
          "ticketId": {
            "type": "string",
            "format": "uuid",
            "description": "Only this ticket's subscriptions, for every subscriber."
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "TicketSubscriptionRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "subscriberId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "ticketId",
          "subscriberId"
        ]
      },
      "TicketSubscriptionDeleteRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "Conversation": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "firstReplyAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastMessageAt": {
            "type": "string",
            "format": "date-time"
          },
          "snoozedUntil": {
            "type": "string"
          },
          "statusId": {
            "type": "string",
            "format": "uuid"
          },
          "priority": {
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "description": "1 urgent, 2 high, 3 normal, 4 low."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "slack",
              "telegram",
              "whatsapp",
              "chat",
              "teams",
              "portal"
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "assigneeId": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "contactId": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "subject": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "waitingOnCustomerSince": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "canceledAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trashed": {
            "type": "boolean"
          },
          "trashedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trashedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "permanentlyDeleted": {
            "type": "boolean"
          },
          "markedAsSpamAt": {
            "type": "string",
            "format": "date-time"
          },
          "markedAsSpamById": {
            "type": "string",
            "format": "uuid"
          },
          "conversationNumber": {
            "type": "integer"
          },
          "replyCount": {
            "type": "integer"
          },
          "slaSummaries": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "slaNextBreachesAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "preview": {
            "type": "string"
          },
          "additionalAttributes": {
            "type": "string"
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ticketIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "portalTicketId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "chatWidgetId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "urlId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "syncRevision": {
            "type": "integer"
          }
        }
      },
      "ListConversationRequest": {
        "type": "object",
        "properties": {
          "sort": {
            "type": "string"
          },
          "sortDirection": {
            "type": "string",
            "enum": [
              "desc",
              "asc"
            ]
          },
          "filters": {
            "type": "string"
          },
          "statusId": {
            "type": "string"
          },
          "spam": {
            "type": "boolean",
            "description": "Only conversations marked as spam."
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "InfoConversationRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "description": "Conversation UUID, subject-urlId slug, or conversation number. Omit when `conversationNumber` is set."
          },
          "conversationNumber": {
            "type": "integer",
            "description": "Conversation number, for example 42. Omit when `_id` is set."
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "ConversationUpdateRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "DeleteConversationRequest": {
        "type": "object",
        "properties": {
          "permanent": {
            "type": "boolean"
          },
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "RestoreConversationRequest": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "conversationId",
          "workspaceId"
        ]
      },
      "ArchiveConversationRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "AddTeamRequest": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "teamId",
          "conversationId",
          "workspaceId"
        ]
      },
      "AddUserRequest": {
        "type": "object",
        "properties": {
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "actorId",
          "conversationId",
          "workspaceId"
        ]
      },
      "LinkTicketRequest": {
        "type": "object",
        "properties": {
          "ticketId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "ticketId",
          "conversationId",
          "workspaceId"
        ]
      },
      "ConversationRead": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "readAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "MarkReadRequest": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationNumber": {
            "type": "integer"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "MarkSpamRequest": {
        "type": "object",
        "properties": {
          "contactEmail": {
            "type": "string"
          },
          "contactId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "contact",
              "domain",
              "email"
            ]
          },
          "conversationId": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "contactEmail",
          "type",
          "conversationId",
          "workspaceId"
        ]
      },
      "RemoveTeamRequest": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "conversationId",
          "workspaceId"
        ]
      },
      "RestoreSpamConversationRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "conversationId"
        ]
      },
      "SetConversationSlaRequest": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "metric": {
            "type": "string",
            "enum": [
              "firstResponse",
              "nextResponse",
              "resolution"
            ]
          },
          "durationSeconds": {
            "type": "integer",
            "nullable": true,
            "maximum": 31536000,
            "minimum": 1,
            "description": "Send null to remove the selected metric's SLA."
          }
        },
        "additionalProperties": false,
        "required": [
          "conversationId",
          "workspaceId",
          "metric"
        ]
      },
      "AddSnoozeRequest": {
        "type": "object",
        "properties": {
          "snoozeUntil": {
            "type": "integer"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "snoozeUntil",
          "_id",
          "workspaceId"
        ]
      },
      "RemoveUserRequest": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "conversationId",
          "workspaceId"
        ]
      },
      "RemoveSnoozeRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "UpdateCompanyRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "slug": {
            "type": "string",
            "maxLength": 140
          },
          "urlId": {
            "type": "string",
            "maxLength": 32
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "industry": {
            "type": "string",
            "maxLength": 100
          },
          "size": {
            "type": "string",
            "maxLength": 50
          },
          "logoUrl": {
            "type": "string",
            "format": "uri"
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "x": {
            "type": "string",
            "maxLength": 500
          },
          "linkedin": {
            "type": "string",
            "maxLength": 500
          },
          "instagram": {
            "type": "string",
            "maxLength": 500
          },
          "sector": {
            "type": "string",
            "maxLength": 100
          },
          "sectorIds": {
            "type": "string",
            "format": "uuid"
          },
          "labelIds": {
            "type": "string",
            "format": "uuid"
          },
          "location1": {
            "type": "string",
            "maxLength": 255
          },
          "location2": {
            "type": "string",
            "maxLength": 255
          },
          "fundingRaised": {
            "type": "string",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "UpdateLabelsRequest": {
        "type": "object",
        "properties": {
          "labelIds": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "labelIds",
          "conversationId",
          "workspaceId"
        ]
      },
      "UpdatePriorityRequest": {
        "type": "object",
        "properties": {
          "priority": {
            "type": "integer"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "priority",
          "conversationId",
          "workspaceId"
        ]
      },
      "UpdateStatusRequest": {
        "type": "object",
        "properties": {
          "statusId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "statusId",
          "_id",
          "workspaceId"
        ]
      },
      "UpdateSubjectRequest": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "nullable": true
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "conversationId",
          "workspaceId"
        ]
      },
      "ConversationLabel": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SyncedModelListInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "ConversationLabelCreateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "name"
        ]
      },
      "ConversationLabelUpdateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "ConversationLabelDeleteInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "replacementLabelId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Conversations that used the deleted label move to this one."
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "ConversationStatus": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "type": "string",
            "enum": [
              "open",
              "started",
              "waiting_on_customer",
              "completed",
              "cancelled"
            ]
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "index": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ConversationStatusCreateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "open",
              "started",
              "waiting_on_customer",
              "completed",
              "cancelled"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "name",
          "color",
          "category"
        ]
      },
      "ConversationStatusUpdateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "index": {
            "type": "string",
            "description": "Fractional sort key, e.g. \"a0\"."
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "ConversationStatusDeleteInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "replacementStatusId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Conversations in the deleted status move to this one."
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "ConversationSubscription": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "subscriberId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ConversationSubscriptionListRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid",
            "description": "Only this conversation's subscriptions, for every subscriber."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "ConversationSubscriptionInfoRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "ConversationSubscriptionCreateRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "subscriberId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "conversationId",
          "subscriberId",
          "workspaceId"
        ]
      },
      "UnsubscribeConversationRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "slack",
              "telegram",
              "whatsapp",
              "chat",
              "teams",
              "portal"
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "senderId": {
            "type": "string",
            "format": "uuid"
          },
          "senderType": {
            "type": "string",
            "enum": [
              "user",
              "contact",
              "internal"
            ]
          },
          "subject": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "preview": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "messageType": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing",
              "activity"
            ]
          },
          "contentAttributes": {
            "type": "string"
          },
          "privateNote": {
            "type": "boolean"
          },
          "internalThreadId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "reactions": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ListConversationMessagesRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "conversationId"
        ]
      },
      "SendMessageRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "conversationId": {
            "type": "string",
            "format": "uuid"
          },
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "senderId": {
            "type": "string",
            "format": "uuid"
          },
          "statusId": {
            "type": "string",
            "format": "uuid"
          },
          "privateNote": {
            "type": "boolean"
          },
          "content": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "preview": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "slack",
              "telegram",
              "whatsapp",
              "chat",
              "teams",
              "portal"
            ]
          },
          "attachments": {
            "type": "array",
            "items": {}
          },
          "contentAttributes": {
            "type": "object",
            "additionalProperties": true
          },
          "previousMessageId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "conversationId",
          "messageId",
          "senderId",
          "statusId",
          "privateNote",
          "content",
          "subject",
          "preview",
          "channel",
          "contentAttributes",
          "previousMessageId"
        ]
      },
      "EditMessageRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "slack",
              "telegram",
              "whatsapp",
              "chat",
              "teams",
              "portal"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "messageId",
          "content",
          "channel"
        ]
      },
      "DeleteMessageRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "slack",
              "telegram",
              "whatsapp",
              "chat",
              "teams",
              "portal"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "messageId",
          "channel"
        ]
      },
      "AddReactionRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "messageId": {
            "type": "string",
            "format": "uuid"
          },
          "emoji": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "slack",
              "telegram",
              "whatsapp",
              "chat",
              "teams",
              "portal"
            ]
          },
          "privateNote": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "messageId",
          "emoji",
          "channel",
          "privateNote"
        ]
      },
      "Company": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string",
            "format": "uri"
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string"
          },
          "urlId": {
            "type": "string"
          },
          "previousSlugs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "x": {
            "type": "string"
          },
          "linkedin": {
            "type": "string"
          },
          "instagram": {
            "type": "string"
          },
          "sector": {
            "type": "string"
          },
          "sectorIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "location1": {
            "type": "string"
          },
          "location2": {
            "type": "string"
          },
          "fundingRaised": {
            "type": "number"
          },
          "ownerId": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "lastModifiedByUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "trashed": {
            "type": "boolean"
          },
          "trashedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trashedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "permanentlyDeleted": {
            "type": "boolean"
          },
          "lastMessageReceivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastMessageSentAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastTicketRaisedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "syncRevision": {
            "type": "integer"
          }
        }
      },
      "CompanyQueryRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "filter": {
            "type": "object",
            "additionalProperties": true
          },
          "searchTerm": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "CompanyIdRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "permanent": {
            "type": "boolean"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CreateCompanyRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "slug": {
            "type": "string",
            "maxLength": 140
          },
          "urlId": {
            "type": "string",
            "maxLength": 32
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "size": {
            "type": "string",
            "maxLength": 50
          },
          "logoUrl": {
            "type": "string",
            "format": "uri"
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "x": {
            "type": "string",
            "maxLength": 500
          },
          "linkedin": {
            "type": "string",
            "maxLength": 500
          },
          "instagram": {
            "type": "string",
            "maxLength": 500
          },
          "sector": {
            "type": "string",
            "maxLength": 100
          },
          "labelIds": {
            "type": "string",
            "format": "uuid"
          },
          "sectorIds": {
            "type": "string",
            "format": "uuid"
          },
          "location1": {
            "type": "string",
            "maxLength": 255
          },
          "location2": {
            "type": "string",
            "maxLength": 255
          },
          "fundingRaised": {
            "type": "string",
            "nullable": true
          },
          "ownerId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "teamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "slug",
          "urlId",
          "workspaceId",
          "website",
          "domains"
        ]
      },
      "Contact": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "emails": {
            "type": "string"
          },
          "phones": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "previousUsernames": {
            "type": "string"
          },
          "jobTitle": {
            "type": "string"
          },
          "buyerTypes": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "lastModifiedByUserId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "trashed": {
            "type": "boolean"
          },
          "trashedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trashedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "permanentlyDeleted": {
            "type": "boolean"
          },
          "syncRevision": {
            "type": "integer"
          },
          "urlId": {
            "type": "string"
          },
          "communication": {
            "type": "object",
            "properties": {
              "chatEmailsOptOut": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ContactQueryRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "filter": {
            "type": "object",
            "additionalProperties": true
          },
          "searchTerm": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "ContactIdRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "permanent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CreateContactRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "firstName": {
            "type": "string",
            "maxLength": 255
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "lastName": {
            "type": "string",
            "maxLength": 255
          },
          "emails": {
            "type": "string",
            "format": "email"
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "username": {
            "type": "string",
            "maxLength": 255
          },
          "jobTitle": {
            "type": "string",
            "maxLength": 255
          },
          "buyerTypes": {
            "type": "array",
            "items": {}
          },
          "avatar": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "urlId": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "firstName",
          "workspaceId",
          "lastName",
          "username"
        ]
      },
      "UpdateContactRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "oneOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            ]
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "firstName": {
            "type": "string",
            "maxLength": 255
          },
          "lastName": {
            "type": "string",
            "maxLength": 255
          },
          "emails": {
            "type": "string",
            "format": "email"
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "username": {
            "type": "string",
            "maxLength": 255
          },
          "jobTitle": {
            "type": "string",
            "maxLength": 255
          },
          "buyerTypes": {
            "type": "array",
            "items": {}
          },
          "avatar": {
            "type": "string",
            "format": "uri"
          },
          "companyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CompanyLabel": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SyncedModelInfoInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "CompanyLabelCreateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 500
          },
          "color": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "name"
        ]
      },
      "CompanyLabelUpdateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 500
          },
          "color": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CompanyLabelDeleteInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "replacementLabelId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Rows that used the deleted label move to this one."
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CompanySector": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CompanySectorCreateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 1000
          },
          "color": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "name"
        ]
      },
      "CompanySectorUpdateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 1000
          },
          "color": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CompanySectorDeleteInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "ContractType": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ContractTypeCreateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 1000
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "name"
        ]
      },
      "ContractTypeUpdateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 1000
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CompanyRelationship": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "fromCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "toCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "parent",
              "sister",
              "subsidiary"
            ]
          },
          "createdById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "syncRevision": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CompanyRelationshipCreateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "fromCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "toCompanyId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "object",
            "additionalProperties": true
          },
          "inverseId": {
            "type": "string",
            "format": "uuid",
            "description": "Id for the inverse row; the server picks one when absent."
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "fromCompanyId",
          "toCompanyId",
          "type"
        ]
      },
      "CompanyRelationshipUpdateInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId",
          "type"
        ]
      },
      "RowInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CompanyUpdate": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "contactId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "body": {
            "type": "string"
          },
          "ticketId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "sentiment": {
            "type": "string",
            "enum": [
              "positive",
              "neutral",
              "negative"
            ]
          },
          "createdById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "syncRevision": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CompanyUpdateCreateInputRequest": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "body": {
            "type": "string",
            "maxLength": 100,
            "description": "The update text. API keys send markdown; the app sends Lexical JSON."
          },
          "sentiment": {
            "type": "string"
          },
          "ticketId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid",
            "description": "The server picks one when absent."
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "companyId"
        ]
      },
      "CompanyUpdateUpdateInputRequest": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "body": {
            "type": "string",
            "maxLength": 100,
            "description": "The update text. API keys send markdown; the app sends Lexical JSON."
          },
          "sentiment": {
            "type": "string"
          },
          "ticketId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "CompanyUpdateDeleteInputRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "contactId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "Document": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "folderId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "file",
              "contract"
            ]
          },
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          },
          "originalFileName": {
            "type": "string"
          },
          "fileType": {
            "type": "string"
          },
          "fileSize": {
            "type": "string"
          },
          "contractType": {
            "type": "string"
          },
          "originalContractName": {
            "type": "string"
          },
          "contractStatus": {
            "type": "string",
            "enum": [
              "draft",
              "signed_by_us",
              "signed_by_them",
              "fully_signed",
              "expired",
              "superseded"
            ]
          },
          "version": {
            "type": "string"
          },
          "expirationDate": {
            "type": "string"
          },
          "signedByUsDate": {
            "type": "string"
          },
          "signedByThemDate": {
            "type": "string"
          },
          "customIdentifier": {
            "type": "string"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "updatedById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "trashed": {
            "type": "boolean"
          },
          "trashedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trashedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "permanentlyDeleted": {
            "type": "boolean"
          },
          "index": {
            "type": "integer"
          },
          "urlId": {
            "type": "string"
          },
          "syncRevision": {
            "type": "integer"
          }
        }
      },
      "DocumentQueryRequest": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "filter": {
            "type": "object",
            "additionalProperties": true
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "companyId",
          "workspaceId"
        ]
      },
      "DocumentIdRequest": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "permanent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "documentId",
          "workspaceId"
        ]
      },
      "CreateDocumentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "type": {
            "type": "string",
            "enum": [
              "file",
              "contract"
            ]
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          },
          "originalFileName": {
            "type": "string",
            "maxLength": 255
          },
          "fileType": {
            "type": "string"
          },
          "fileSize": {
            "type": "integer",
            "minimum": 0
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "folderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "contractType": {
            "type": "string",
            "nullable": true
          },
          "originalContractName": {
            "type": "string",
            "nullable": true
          },
          "contractStatus": {
            "type": "string",
            "enum": [
              "draft",
              "signed_by_us",
              "signed_by_them",
              "fully_signed",
              "expired",
              "superseded"
            ],
            "nullable": true
          },
          "expirationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "index": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "type",
          "companyId",
          "workspaceId",
          "attachmentId",
          "originalFileName",
          "fileType",
          "fileSize"
        ]
      },
      "UpdateDocumentRequest": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "folderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "index": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "documentId",
          "workspaceId"
        ]
      },
      "ProfileMembership": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ]
          },
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "documentFolderId": {
            "type": "string",
            "format": "uuid"
          },
          "noteFolderId": {
            "type": "string",
            "format": "uuid"
          },
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DocumentAddUserRequest": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "documentId",
          "workspaceId",
          "actorId"
        ]
      },
      "DocumentRemoveUserRequest": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "documentId",
          "workspaceId",
          "actorId"
        ]
      },
      "DocumentUpdateUserPermissionRequest": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "documentId",
          "workspaceId",
          "actorId",
          "permission"
        ]
      },
      "Folder": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          },
          "description": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ]
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "index": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "trashed": {
            "type": "boolean"
          },
          "trashedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trashedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "permanentlyDeleted": {
            "type": "boolean"
          },
          "urlId": {
            "type": "string"
          },
          "syncRevision": {
            "type": "integer"
          }
        }
      },
      "DocumentFolderQueryRequest": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "filter": {
            "type": "object",
            "additionalProperties": true
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "companyId",
          "workspaceId"
        ]
      },
      "CreateDocumentFolderRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "index": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "companyId",
          "workspaceId",
          "subtype"
        ]
      },
      "UpdateDocumentFolderRequestRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "index": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId",
          "subtype"
        ]
      },
      "DeleteDocumentFolderRequest": {
        "type": "object",
        "properties": {
          "folderId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          },
          "permanent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "folderId",
          "workspaceId",
          "subtype"
        ]
      },
      "DocumentFolderAddUserRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "subtype"
        ]
      },
      "DocumentFolderRemoveUserRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "subtype"
        ]
      },
      "DocumentFolderUpdateUserRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "subtype"
        ]
      },
      "Note": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "urlId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "folderId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedById": {
            "type": "string",
            "format": "uuid"
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "trashed": {
            "type": "boolean"
          },
          "trashedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trashedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "permanentlyDeleted": {
            "type": "boolean"
          },
          "syncRevision": {
            "type": "integer"
          }
        }
      },
      "NoteQueryRequest": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "filter": {
            "type": "object",
            "additionalProperties": true
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "companyId",
          "workspaceId"
        ]
      },
      "NoteInfoRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "CreateNoteRequest": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 500
          },
          "content": {
            "type": "string",
            "description": "Markdown for API keys and OAuth. The app sends a Lexical document."
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "folderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "urlId": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "title",
          "content",
          "companyId",
          "workspaceId"
        ]
      },
      "UpdateNoteRequestRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "maxLength": 500
          },
          "content": {
            "type": "string",
            "description": "Markdown for API keys and OAuth. The app sends a Lexical document."
          },
          "folderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "icon": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "urlId": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "NoteIdRequest": {
        "type": "object",
        "properties": {
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "permanent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "noteId",
          "workspaceId"
        ]
      },
      "NoteAddUserRequest": {
        "type": "object",
        "properties": {
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ],
            "nullable": true
          }
        },
        "additionalProperties": false,
        "required": [
          "noteId",
          "workspaceId",
          "actorId"
        ]
      },
      "NoteRemoveUserRequest": {
        "type": "object",
        "properties": {
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "noteId",
          "workspaceId",
          "actorId"
        ]
      },
      "NoteUpdateUserPermissionRequest": {
        "type": "object",
        "properties": {
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "actorId": {
            "type": "string",
            "format": "uuid"
          },
          "permission": {
            "type": "string",
            "enum": [
              "read",
              "readWrite",
              "admin"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "noteId",
          "workspaceId",
          "actorId",
          "permission"
        ]
      },
      "ProfileMembershipListInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "documentId": {
            "type": "string",
            "format": "uuid"
          },
          "noteId": {
            "type": "string",
            "format": "uuid"
          },
          "folderId": {
            "type": "string",
            "format": "uuid"
          },
          "subtype": {
            "type": "string",
            "enum": [
              "document",
              "note"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "Team": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "icon": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "parentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "allMembersCanJoin": {
            "type": "boolean"
          },
          "joinByDefault": {
            "type": "boolean"
          },
          "assignmentStrategy": {
            "type": "string"
          },
          "assignOnlyIfAvailable": {
            "type": "boolean"
          },
          "secondaryTeamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer"
          },
          "createdById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "retiredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "retiredById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deletedById": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        }
      },
      "TeamListInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "includeRetired": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "TeamInfoInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "TeamCreateInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "icon": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "color": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          },
          "parentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "allMembersCanJoin": {
            "type": "boolean"
          },
          "joinByDefault": {
            "type": "boolean"
          },
          "assignmentStrategy": {
            "type": "string",
            "enum": [
              "manual",
              "round_robin"
            ]
          },
          "assignOnlyIfAvailable": {
            "type": "boolean"
          },
          "secondaryTeamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer"
          },
          "_id": {
            "type": "string",
            "format": "uuid",
            "description": "The server picks one when absent."
          },
          "name": {
            "type": "string",
            "maxLength": 48
          },
          "key": {
            "type": "string",
            "maxLength": 7,
            "description": "Short identifier, e.g. \"ENG\". The server derives one when absent."
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "name"
        ]
      },
      "TeamUpdateInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "icon": {
            "type": "string",
            "nullable": true,
            "maxLength": 255
          },
          "color": {
            "type": "string",
            "nullable": true,
            "maxLength": 20
          },
          "parentId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "allMembersCanJoin": {
            "type": "boolean"
          },
          "joinByDefault": {
            "type": "boolean"
          },
          "assignmentStrategy": {
            "type": "string",
            "enum": [
              "manual",
              "round_robin"
            ]
          },
          "assignOnlyIfAvailable": {
            "type": "boolean"
          },
          "secondaryTeamId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "maxLength": 48
          },
          "key": {
            "type": "string",
            "maxLength": 7
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "TeamSetParentInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "parentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id",
          "parentId"
        ]
      },
      "TeamMembership": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "owner": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "capacity": {
            "type": "string",
            "nullable": true
          },
          "lastRoundRobinAssignedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TeamMembershipListInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "TeamMembershipCreateInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid",
            "description": "The server picks one when absent."
          },
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "profileId": {
            "type": "string",
            "format": "uuid",
            "description": "The member. Defaults to the caller."
          },
          "owner": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "teamId"
        ]
      },
      "TeamMembershipUpdateInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "profileId": {
            "type": "string",
            "format": "uuid"
          },
          "owner": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "capacity": {
            "type": "integer",
            "nullable": true,
            "minimum": 0
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "_id"
        ]
      },
      "TeamMembershipDeleteInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "alsoLeaveParentTeams": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "AttachmentUpload": {
        "type": "object",
        "properties": {
          "uploadUrl": {
            "type": "string",
            "format": "uri"
          },
          "publicUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true
          }
        }
      },
      "CreateAttachmentRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          },
          "parentType": {
            "type": "string",
            "enum": [
              "message",
              "ticket",
              "comment",
              "note",
              "broadcast",
              "invoice",
              "company",
              "contact",
              "file",
              "avatar",
              "oauth_app",
              "csv_import"
            ]
          },
          "parentId": {
            "type": "string",
            "format": "uuid"
          },
          "fileType": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 1
          },
          "originalName": {
            "type": "string",
            "maxLength": 255
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "attachmentId",
          "parentType",
          "fileType",
          "size",
          "originalName"
        ]
      },
      "AttachmentFromUrl": {
        "type": "object",
        "properties": {
          "publicUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "fileType": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          }
        }
      },
      "CreateAttachmentFromUrlRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          },
          "parentType": {
            "type": "string",
            "enum": [
              "message",
              "ticket",
              "comment",
              "note",
              "broadcast",
              "invoice",
              "company",
              "contact",
              "file",
              "avatar",
              "oauth_app",
              "csv_import"
            ]
          },
          "parentId": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "contentTypeHint": {
            "type": "string"
          },
          "originalName": {
            "type": "string",
            "maxLength": 255
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "attachmentId",
          "parentType",
          "url"
        ]
      },
      "DeleteAttachmentRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "attachmentId"
        ]
      },
      "AttachmentComplete": {
        "type": "object",
        "properties": {
          "size": {
            "type": "integer"
          }
        }
      },
      "CompleteAttachmentRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId",
          "attachmentId"
        ]
      },
      "AttachmentRedirectBodyRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "WebhookSubscription": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "events": {
            "type": "string"
          },
          "enabled": {
            "type": "string"
          },
          "createdById": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ListWebhookSubscriptionsRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "pagination": {
            "type": "object",
            "additionalProperties": true
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "CreateWebhookSubscriptionRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "secret": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "url",
          "events",
          "workspaceId"
        ]
      },
      "UpdateWebhookSubscriptionRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "secret": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "DeleteWebhookSubscriptionRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "required": [
          "_id",
          "workspaceId"
        ]
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "webhookSubscriptionId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "statusCode": {
            "type": "string"
          },
          "requestBody": {
            "type": "string"
          },
          "requestHeaders": {
            "type": "string"
          },
          "responseBody": {
            "type": "string"
          },
          "responseHeaders": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ListWebhookDeliveriesRequest": {
        "type": "object",
        "properties": {
          "webhookSubscriptionId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "pagination": {
            "type": "object",
            "additionalProperties": true
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "webhookSubscriptionId",
          "workspaceId"
        ]
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string",
            "format": "uri"
          },
          "logoAttachmentId": {
            "type": "string",
            "format": "uuid"
          },
          "creator": {
            "type": "string"
          },
          "suspended": {
            "type": "string"
          },
          "suspensionReason": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "verifiedDomains": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "addedDate": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "approximateConversationCount": {
            "type": "integer"
          },
          "approximateTicketCount": {
            "type": "integer"
          },
          "approximateCompanyCount": {
            "type": "integer"
          },
          "approximateBroadcastCount": {
            "type": "integer"
          },
          "approximateContactCount": {
            "type": "integer"
          },
          "approximateDashboardCount": {
            "type": "integer"
          },
          "preferences": {
            "type": "string"
          }
        }
      },
      "WorkspaceInfoRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "slug"
        ]
      },
      "PublicIdentity": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "member",
              "viewer"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "deactivated"
            ]
          },
          "workspaceName": {
            "type": "string",
            "nullable": true
          },
          "workspaceSlug": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkspaceProfile": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "format": "uri"
          },
          "attachmentId": {
            "type": "string",
            "format": "uuid"
          },
          "username": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "member",
              "viewer"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "deactivated"
            ]
          },
          "assignmentAvailability": {
            "type": "string",
            "enum": [
              "available",
              "out_of_office"
            ]
          },
          "isPending": {
            "type": "string"
          },
          "invitedAt": {
            "type": "string",
            "format": "date-time"
          },
          "invitationExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "invitedBy": {
            "type": "string"
          },
          "notificationSettings": {
            "type": "string"
          },
          "deactivatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reactivatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deactivatedBy": {
            "type": "string"
          },
          "reactivatedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WorkspaceProfileListInputRequest": {
        "type": "object",
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "workspaceId"
        ]
      },
      "ListRequestBody": {
        "type": "object",
        "required": [
          "workspaceId"
        ],
        "properties": {
          "workspaceId": {
            "type": "string",
            "format": "uuid",
            "description": "Workspace id"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25,
            "description": "Page size (also accepted under pagination.limit)"
          },
          "cursor": {
            "type": "string",
            "nullable": true,
            "description": "Opaque cursor from a previous page"
          },
          "direction": {
            "type": "string",
            "enum": [
              "forward",
              "backward",
              "ASC",
              "DESC"
            ],
            "description": "Pagination direction (resource-specific)"
          },
          "pagination": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "cursor": {
                "type": "string",
                "nullable": true
              },
              "direction": {
                "type": "string"
              }
            }
          }
        },
        "additionalProperties": true,
        "description": "List bodies always accept workspaceId + cursor pagination. Extra filters are resource-specific and additive."
      },
      "ListPagination": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer"
          },
          "cursor": {
            "type": "string",
            "nullable": true
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          },
          "direction": {
            "type": "string"
          }
        }
      },
      "PublicMutationPayload": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Presented entity"
          }
        }
      },
      "PublicDeletePayload": {
        "type": "object",
        "required": [
          "success",
          "entityId"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "entityId": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          }
        }
      },
      "PublicErrorEnvelope": {
        "type": "object",
        "required": [
          "error",
          "statusCode"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "type",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "userMessage": {
                "type": "string"
              },
              "fields": {
                "type": "object",
                "additionalProperties": true
              }
            }
          },
          "statusCode": {
            "type": "number"
          },
          "timestamp": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        }
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ]
}
