{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Swagger API"
  },
  "externalDocs": {
    "description": "View the raw OpenAPI Specification in JSON format",
    "url": "/swagger.json"
  },
  "components": {
    "schemas": {},
    "parameters": {},
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Organization API token",
        "description": "Organization integration token from Siro admin (Person icon → API Tokens). Send Authorization: Bearer <organization-api-token>. This is not the OAuth access token used with api.siro.ai user-scoped endpoints.",
        "x-default": "<organization-api-token>"
      }
    }
  },
  "paths": {
    "/v1/core/recordings/{id}": {
      "get": {
        "summary": "Get recording",
        "description": "Get a recording by id",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get recording",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "durationInMilliseconds": {
                      "type": "number"
                    },
                    "latitude": {
                      "type": "number"
                    },
                    "longitude": {
                      "type": "number"
                    },
                    "result": {
                      "type": "string",
                      "enum": [
                        "OPEN",
                        "WON",
                        "LOST"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "web": {
                          "type": "object",
                          "properties": {
                            "self": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "self"
                          ]
                        }
                      },
                      "required": [
                        "web"
                      ]
                    },
                    "isProcessingDone": {
                      "type": "boolean"
                    },
                    "isEntityExtractionDone": {
                      "type": "boolean"
                    },
                    "isSummaryDone": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "userId",
                    "title",
                    "durationInMilliseconds",
                    "latitude",
                    "longitude",
                    "result",
                    "createdAt",
                    "links"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/recordings": {
      "get": {
        "summary": "Get recordings",
        "description": "Get recordings",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Return results created after the given date. Format: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). Example: 2024-06-13T04:00:00.592Z"
            },
            "required": false,
            "description": "Return results created after the given date. Format: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). Example: 2024-06-13T04:00:00.592Z",
            "name": "createdAt:gt",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Return results created before the given date. Format: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). Example: 2024-06-13T04:00:00.592Z"
            },
            "required": false,
            "description": "Return results created before the given date. Format: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). Example: 2024-06-13T04:00:00.592Z",
            "name": "createdAt:lt",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Number of results to return per page (default is 25)."
            },
            "required": false,
            "description": "Number of results to return per page (default is 25).",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for pagination."
            },
            "required": false,
            "description": "Cursor for pagination.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Filter by processing status."
            },
            "required": false,
            "description": "Filter by processing status.",
            "name": "isProcessingDone",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Filter by entity extraction status."
            },
            "required": false,
            "description": "Filter by entity extraction status.",
            "name": "isEntityExtractionDone",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Filter by summary status."
            },
            "required": false,
            "description": "Filter by summary status.",
            "name": "isSummaryDone",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get recordings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "userId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "durationInMilliseconds": {
                            "type": "number"
                          },
                          "latitude": {
                            "type": "number"
                          },
                          "longitude": {
                            "type": "number"
                          },
                          "result": {
                            "type": "string",
                            "enum": [
                              "OPEN",
                              "WON",
                              "LOST"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "links": {
                            "type": "object",
                            "properties": {
                              "web": {
                                "type": "object",
                                "properties": {
                                  "self": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "self"
                                ]
                              }
                            },
                            "required": [
                              "web"
                            ]
                          },
                          "isProcessingDone": {
                            "type": "boolean"
                          },
                          "isEntityExtractionDone": {
                            "type": "boolean"
                          },
                          "isSummaryDone": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "userId",
                          "title",
                          "durationInMilliseconds",
                          "latitude",
                          "longitude",
                          "result",
                          "createdAt",
                          "links"
                        ]
                      }
                    },
                    "cursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opaque cursor for pagination"
                    }
                  },
                  "required": [
                    "data",
                    "cursor"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/recordings/{id}/summaries": {
      "get": {
        "summary": "Get recording summaries",
        "description": "Get recording summaries",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get recording summaries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "content": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "content"
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/users": {
      "get": {
        "summary": "Get users",
        "description": "Get users",
        "parameters": [
          {
            "schema": {
              "type": "boolean",
              "nullable": true,
              "description": "Optionally filter by users which you have disabled."
            },
            "required": false,
            "description": "Optionally filter by users which you have disabled.",
            "name": "disabled",
            "in": "query"
          },
          {
            "schema": {
              "type": "boolean",
              "nullable": true,
              "description": "Whether to exclude users with Siro emails (including bot users)"
            },
            "required": false,
            "description": "Whether to exclude users with Siro emails (including bot users)",
            "name": "excludeSiroUsers",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Optionally filter to Siro user linked to external system with this external Id"
            },
            "required": false,
            "description": "Optionally filter to Siro user linked to external system with this external Id",
            "name": "externalId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "phoneNumber": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          },
                          "memberTeamId": {
                            "type": "string",
                            "nullable": true
                          },
                          "coachTeamIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "externalId": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdAt": {
                            "type": "string",
                            "nullable": true
                          },
                          "disabled": {
                            "type": "boolean"
                          },
                          "billable": {
                            "type": "boolean"
                          },
                          "contactSettings": {
                            "type": "object",
                            "properties": {
                              "suppressEmails": {
                                "type": "boolean",
                                "description": "Whether the user should receive any emails"
                              },
                              "suppressEmailErrors": {
                                "type": "boolean",
                                "default": false,
                                "description": "If true, email-related errors will be logged but not thrown. User operations will succeed even if email operations fail. Defaults to false."
                              }
                            },
                            "description": "Contact settings for the user"
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "organizationId",
                          "phoneNumber",
                          "firstName",
                          "lastName",
                          "memberTeamId",
                          "coachTeamIds",
                          "externalId",
                          "createdAt",
                          "disabled",
                          "billable"
                        ]
                      }
                    },
                    "cursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opaque cursor for pagination"
                    }
                  },
                  "required": [
                    "data",
                    "cursor"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create user",
        "description": "Create user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "The email of the user in your system. They will receive a password reset email to this address when their user is created in Siro. "
                  },
                  "organizationId": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "description": "The temporary password for the user.Must be at least 12 chars long, including at least one uppercase, one lowercase, one number, and one symbol."
                  },
                  "phoneNumber": {
                    "type": "string",
                    "description": "The user's phone number."
                  },
                  "firstName": {
                    "type": "string",
                    "description": "The user's first name."
                  },
                  "lastName": {
                    "type": "string",
                    "description": "The user's last name."
                  },
                  "memberTeamId": {
                    "type": "string",
                    "description": "The 6 digit code for the user's team. Strongly suggested to add this."
                  },
                  "externalId": {
                    "type": "string",
                    "description": "The unique id of the resource in your CRM system. Multiple resources cannot have the same externalId within the same organization. "
                  },
                  "coachTeamIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "isAdmin": {
                    "type": "boolean"
                  },
                  "billable": {
                    "type": "boolean",
                    "description": "Whether the user is billable and should be included in the license count"
                  },
                  "contactSettings": {
                    "type": "object",
                    "properties": {
                      "suppressEmails": {
                        "type": "boolean",
                        "description": "Whether the user should receive any emails"
                      },
                      "suppressEmailErrors": {
                        "type": "boolean",
                        "default": false,
                        "description": "If true, email-related errors will be logged but not thrown. User operations will succeed even if email operations fail. Defaults to false."
                      }
                    },
                    "description": "Contact settings for the user"
                  }
                },
                "required": [
                  "email",
                  "organizationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "nullable": true
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "firstName": {
                      "type": "string",
                      "nullable": true
                    },
                    "lastName": {
                      "type": "string",
                      "nullable": true
                    },
                    "memberTeamId": {
                      "type": "string",
                      "nullable": true
                    },
                    "coachTeamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "externalId": {
                      "type": "string",
                      "nullable": true
                    },
                    "createdAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "billable": {
                      "type": "boolean"
                    },
                    "contactSettings": {
                      "type": "object",
                      "properties": {
                        "suppressEmails": {
                          "type": "boolean",
                          "description": "Whether the user should receive any emails"
                        },
                        "suppressEmailErrors": {
                          "type": "boolean",
                          "default": false,
                          "description": "If true, email-related errors will be logged but not thrown. User operations will succeed even if email operations fail. Defaults to false."
                        }
                      },
                      "description": "Contact settings for the user"
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "organizationId",
                    "phoneNumber",
                    "firstName",
                    "lastName",
                    "memberTeamId",
                    "coachTeamIds",
                    "externalId",
                    "createdAt",
                    "disabled",
                    "billable"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/users/{id}": {
      "get": {
        "summary": "Get user",
        "description": "Get user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "nullable": true
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "firstName": {
                      "type": "string",
                      "nullable": true
                    },
                    "lastName": {
                      "type": "string",
                      "nullable": true
                    },
                    "memberTeamId": {
                      "type": "string",
                      "nullable": true
                    },
                    "coachTeamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "externalId": {
                      "type": "string",
                      "nullable": true
                    },
                    "createdAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "billable": {
                      "type": "boolean"
                    },
                    "contactSettings": {
                      "type": "object",
                      "properties": {
                        "suppressEmails": {
                          "type": "boolean",
                          "description": "Whether the user should receive any emails"
                        },
                        "suppressEmailErrors": {
                          "type": "boolean",
                          "default": false,
                          "description": "If true, email-related errors will be logged but not thrown. User operations will succeed even if email operations fail. Defaults to false."
                        }
                      },
                      "description": "Contact settings for the user"
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "organizationId",
                    "phoneNumber",
                    "firstName",
                    "lastName",
                    "memberTeamId",
                    "coachTeamIds",
                    "externalId",
                    "createdAt",
                    "disabled",
                    "billable"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "Update user",
        "description": "Update user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "The user's email"
                  },
                  "phoneNumber": {
                    "type": "string",
                    "description": "The user's phone number."
                  },
                  "firstName": {
                    "type": "string",
                    "description": "The user's first name."
                  },
                  "lastName": {
                    "type": "string",
                    "description": "The user's last name."
                  },
                  "memberTeamId": {
                    "type": "string",
                    "description": "The 6 digit code for the user's team. Strongly suggested to add this."
                  },
                  "disabled": {
                    "type": "boolean",
                    "description": "This field is true for users who are no longer a part of your organization or no longer using Siro."
                  },
                  "billable": {
                    "type": "boolean",
                    "description": "Whether the user is billable and should be included in the license count"
                  },
                  "contactSettings": {
                    "type": "object",
                    "properties": {
                      "suppressEmails": {
                        "type": "boolean",
                        "description": "Whether the user should receive any emails"
                      },
                      "suppressEmailErrors": {
                        "type": "boolean",
                        "default": false,
                        "description": "If true, email-related errors will be logged but not thrown. User operations will succeed even if email operations fail. Defaults to false."
                      }
                    },
                    "description": "Contact settings for the user"
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "Organization ID of the user"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "nullable": true
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "firstName": {
                      "type": "string",
                      "nullable": true
                    },
                    "lastName": {
                      "type": "string",
                      "nullable": true
                    },
                    "memberTeamId": {
                      "type": "string",
                      "nullable": true
                    },
                    "coachTeamIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "externalId": {
                      "type": "string",
                      "nullable": true
                    },
                    "createdAt": {
                      "type": "string",
                      "nullable": true
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "billable": {
                      "type": "boolean"
                    },
                    "contactSettings": {
                      "type": "object",
                      "properties": {
                        "suppressEmails": {
                          "type": "boolean",
                          "description": "Whether the user should receive any emails"
                        },
                        "suppressEmailErrors": {
                          "type": "boolean",
                          "default": false,
                          "description": "If true, email-related errors will be logged but not thrown. User operations will succeed even if email operations fail. Defaults to false."
                        }
                      },
                      "description": "Contact settings for the user"
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "organizationId",
                    "phoneNumber",
                    "firstName",
                    "lastName",
                    "memberTeamId",
                    "coachTeamIds",
                    "externalId",
                    "createdAt",
                    "disabled",
                    "billable"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/mobile-events": {
      "get": {
        "summary": "Get mobile events for an org",
        "description": "Get mobile events for an organization with optional filtering",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Return results created AFTER the given date. \n\t\t\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
            },
            "required": false,
            "description": "Return results created AFTER the given date. \n\t\t\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\t\t\tExample: 2024-06-13T04:00:00.592Z",
            "name": "createdAtGt",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Return results created BEFORE the given date. \n\t\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
            },
            "required": false,
            "description": "Return results created BEFORE the given date. \n\t\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\t\tExample: 2024-06-13T04:00:00.592Z",
            "name": "createdAtLt",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor token for pagination."
            },
            "required": false,
            "description": "Cursor token for pagination.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 1000,
              "default": 100,
              "description": "Number of results to return per page."
            },
            "required": false,
            "description": "Number of results to return per page.",
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "recorderStateChange",
                "networkStatusChange",
                "appStateChange",
                "consentStatusChanged",
                "recordingMetadataChanged",
                "deeplinkReceived",
                "deeplinkConsumed",
                "userAuthStatusChanged"
              ],
              "description": "DEPRECATED: Use eventCodeIn. Filters to the provided eventCode only."
            },
            "required": false,
            "description": "DEPRECATED: Use eventCodeIn. Filters to the provided eventCode only.",
            "name": "eventCode",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 10,
              "description": "Filters to the provided eventCode(s). Accepts comma-separated values or repeated eventCodeIn params."
            },
            "required": false,
            "description": "Filters to the provided eventCode(s). Accepts comma-separated values or repeated eventCodeIn params.",
            "name": "eventCodeIn",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filters to the provided userId only."
            },
            "required": false,
            "description": "Filters to the provided userId only.",
            "name": "userId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Filters to the provided recordingId only."
            },
            "required": false,
            "description": "Filters to the provided recordingId only.",
            "name": "recordingId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get mobile events for an org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "recordingId": {
                              "type": "string"
                            },
                            "externalOpportunityIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "userId": {
                              "type": "string"
                            },
                            "organizationId": {
                              "type": "string"
                            },
                            "eventCode": {
                              "type": "string",
                              "enum": [
                                "recorderStateChange",
                                "networkStatusChange",
                                "appStateChange",
                                "consentStatusChanged",
                                "recordingMetadataChanged",
                                "deeplinkReceived",
                                "deeplinkConsumed",
                                "userAuthStatusChanged"
                              ]
                            },
                            "event": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "string",
                                      "enum": [
                                        "start",
                                        "resume",
                                        "pause",
                                        "stop",
                                        "cancelled"
                                      ]
                                    },
                                    "trigger": {
                                      "type": "string",
                                      "enum": [
                                        "interruption",
                                        "buttonPress",
                                        "deeplink",
                                        "maxRecordingTimeExceeded",
                                        "unknown"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "value",
                                    "trigger"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "string",
                                      "enum": [
                                        "online",
                                        "offline"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "value"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "string",
                                      "enum": [
                                        "background",
                                        "active",
                                        "inactive"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "value"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "requested",
                                        "granted",
                                        "declined"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "title": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "title"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "fullUrl": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "fullUrl"
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "status": {
                                      "type": "string",
                                      "enum": [
                                        "authenticated",
                                        "unauthenticated"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "status"
                                  ]
                                }
                              ]
                            },
                            "createdAt": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "userId",
                            "organizationId",
                            "eventCode",
                            "event",
                            "createdAt"
                          ]
                        }
                      }
                    },
                    "cursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opaque cursor for pagination"
                    }
                  },
                  "required": [
                    "data",
                    "cursor"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/mobile-events/{id}": {
      "get": {
        "summary": "Get mobile event by ID",
        "description": "Get a specific mobile event by its ID",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get mobile event by ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "recordingId": {
                      "type": "string"
                    },
                    "externalOpportunityIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "eventCode": {
                      "type": "string",
                      "enum": [
                        "recorderStateChange",
                        "networkStatusChange",
                        "appStateChange",
                        "consentStatusChanged",
                        "recordingMetadataChanged",
                        "deeplinkReceived",
                        "deeplinkConsumed",
                        "userAuthStatusChanged"
                      ]
                    },
                    "event": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "enum": [
                                "start",
                                "resume",
                                "pause",
                                "stop",
                                "cancelled"
                              ]
                            },
                            "trigger": {
                              "type": "string",
                              "enum": [
                                "interruption",
                                "buttonPress",
                                "deeplink",
                                "maxRecordingTimeExceeded",
                                "unknown"
                              ]
                            }
                          },
                          "required": [
                            "value",
                            "trigger"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "enum": [
                                "online",
                                "offline"
                              ]
                            }
                          },
                          "required": [
                            "value"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "enum": [
                                "background",
                                "active",
                                "inactive"
                              ]
                            }
                          },
                          "required": [
                            "value"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "requested",
                                "granted",
                                "declined"
                              ]
                            }
                          },
                          "required": [
                            "status"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "title"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "fullUrl": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "fullUrl"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "authenticated",
                                "unauthenticated"
                              ]
                            }
                          },
                          "required": [
                            "status"
                          ]
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "eventCode",
                    "event",
                    "createdAt"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/auth/caller-identity": {
      "get": {
        "summary": "Get details about your current auth token",
        "description": "Returns metadata about the auth token used to make this API call",
        "responses": {
          "200": {
            "description": "Get details about your current auth token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokenId": {
                      "type": "string"
                    },
                    "tokenName": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorizedOrgGroupId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group that this token is authorized to act as. Default null."
                    },
                    "parentOrgGroupTokenId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group-token that created this org-scoped token. Will be null for tokens created through the UI."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string",
                      "nullable": true,
                      "description": "The Siro uid of the user who created the token."
                    }
                  },
                  "required": [
                    "tokenId",
                    "tokenName",
                    "organizationId",
                    "authorizedOrgGroupId",
                    "parentOrgGroupTokenId",
                    "createdAt",
                    "createdBy"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/auth/tokens/{id}": {
      "get": {
        "summary": "Get a single authentication token by ID",
        "description": "Get a single authentication token within a given org by ID",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get a single authentication token by ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokenId": {
                      "type": "string"
                    },
                    "tokenName": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorizedOrgGroupId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group that this token is authorized to act as. Default null."
                    },
                    "parentOrgGroupTokenId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group-token that created this org-scoped token. Will be null for tokens created through the UI."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string",
                      "nullable": true,
                      "description": "The Siro uid of the user who created the token."
                    }
                  },
                  "required": [
                    "tokenId",
                    "tokenName",
                    "organizationId",
                    "authorizedOrgGroupId",
                    "parentOrgGroupTokenId",
                    "createdAt",
                    "createdBy"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete a single authentication token by ID",
        "description": "Delete a single authentication token within a given org by ID. Can only be used with org-group tokens.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a single authentication token by ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokenId": {
                      "type": "string"
                    },
                    "tokenName": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorizedOrgGroupId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group that this token is authorized to act as. Default null."
                    },
                    "parentOrgGroupTokenId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group-token that created this org-scoped token. Will be null for tokens created through the UI."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string",
                      "nullable": true,
                      "description": "The Siro uid of the user who created the token."
                    }
                  },
                  "required": [
                    "tokenId",
                    "tokenName",
                    "organizationId",
                    "authorizedOrgGroupId",
                    "parentOrgGroupTokenId",
                    "createdAt",
                    "createdBy"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/auth/tokens": {
      "get": {
        "summary": "List all tokens for a given org.",
        "description": "List all tokens for a given org. Can be used with org-scoped or org-group token. If org-group token, must pass selector.",
        "responses": {
          "200": {
            "description": "List all tokens for a given org.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tokenId": {
                            "type": "string"
                          },
                          "tokenName": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "authorizedOrgGroupId": {
                            "type": "string",
                            "nullable": true,
                            "description": "The ID of the org-group that this token is authorized to act as. Default null."
                          },
                          "parentOrgGroupTokenId": {
                            "type": "string",
                            "nullable": true,
                            "description": "The ID of the org-group-token that created this org-scoped token. Will be null for tokens created through the UI."
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "createdBy": {
                            "type": "string",
                            "nullable": true,
                            "description": "The Siro uid of the user who created the token."
                          }
                        },
                        "required": [
                          "tokenId",
                          "tokenName",
                          "organizationId",
                          "authorizedOrgGroupId",
                          "parentOrgGroupTokenId",
                          "createdAt",
                          "createdBy"
                        ]
                      }
                    },
                    "cursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opaque cursor for pagination"
                    }
                  },
                  "required": [
                    "data",
                    "cursor"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create a new authentication token for an organization.",
        "description": "Create a new authentication token for an organization. Can only be used with org-group tokens.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tokenName": {
                    "type": "string"
                  },
                  "organizationId": {
                    "type": "string"
                  }
                },
                "required": [
                  "tokenName",
                  "organizationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create a new authentication token for an organization.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokenId": {
                      "type": "string"
                    },
                    "tokenName": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "authorizedOrgGroupId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group that this token is authorized to act as. Default null."
                    },
                    "parentOrgGroupTokenId": {
                      "type": "string",
                      "nullable": true,
                      "description": "The ID of the org-group-token that created this org-scoped token. Will be null for tokens created through the UI."
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string",
                      "nullable": true,
                      "description": "The Siro uid of the user who created the token."
                    },
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tokenId",
                    "tokenName",
                    "organizationId",
                    "authorizedOrgGroupId",
                    "parentOrgGroupTokenId",
                    "createdAt",
                    "createdBy",
                    "token"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/oauth/apps/{clientId}": {
      "get": {
        "summary": "Get a specific OAuth app",
        "description": "This endpoint returns the OAuth app with the given client ID.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "clientId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get a specific OAuth app",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "appName": {
                          "type": "string"
                        },
                        "clientId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string",
                          "description": "The organization that owns this OAuth app."
                        },
                        "owner": {
                          "type": "string",
                          "description": "The user that created this OAuth app."
                        },
                        "deleted": {
                          "type": "boolean"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "appName",
                        "clientId",
                        "organizationId",
                        "owner",
                        "deleted",
                        "createdAt",
                        "updatedAt",
                        "deletedAt"
                      ]
                    },
                    "cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "pageSize": {
                      "type": "number"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number",
                      "nullable": true
                    },
                    "hasNextPage": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - User not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authentication error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User does not have access",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authorization error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Resource not found error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content - The request failed validation checks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path",
                          "message"
                        ]
                      }
                    },
                    "name": {
                      "type": "string",
                      "enum": [
                        "ZodError"
                      ]
                    }
                  },
                  "required": [
                    "issues",
                    "name"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Internal server error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete an OAuth application by id.",
        "description": "This endpoint will soft-delete an oauth app and revoke all associated tokens.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "clientId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete an OAuth application by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clientId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "clientId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/oauth/apps": {
      "get": {
        "summary": "Get all OAuth apps for an organization",
        "description": "This endpoint returns all registered OAuth apps for a given owner meeting the specified filters.Results can be returned using either a cursor-based pagination or a page-based pagination.If both a cursor and a page are provided, the cursor will be used.By default, results are sorted by dateCreated in descending order.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The organization that owns one or more OAuth apps."
            },
            "required": true,
            "description": "The organization that owns one or more OAuth apps.",
            "name": "organizationId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The id of the user that created one or more OAuth apps."
            },
            "required": true,
            "description": "The id of the user that created one or more OAuth apps.",
            "name": "owner",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Return OAuth apps created after this date."
            },
            "required": false,
            "description": "Return OAuth apps created after this date.",
            "name": "fromDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Return OAuth apps created before this date."
            },
            "required": false,
            "description": "Return OAuth apps created before this date.",
            "name": "toDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "The number of results to return. If omitted, 100 results will be returned."
            },
            "required": false,
            "description": "The number of results to return. If omitted, 100 results will be returned.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The cursor to paginate the results. Cursor-based pagination will always be used unless if left blank and a page number is provided."
            },
            "required": false,
            "description": "The cursor to paginate the results. Cursor-based pagination will always be used unless if left blank and a page number is provided.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "The page number to return. If omitted, the first page of results will be returned."
            },
            "required": false,
            "description": "The page number to return. If omitted, the first page of results will be returned.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "dateCreated",
                "dateUpdated"
              ],
              "default": "dateCreated",
              "description": "The field to sort the results by. If omitted, the results will be sorted by dateCreated in descending order."
            },
            "required": false,
            "description": "The field to sort the results by. If omitted, the results will be sorted by dateCreated in descending order.",
            "name": "sortField",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc",
              "description": "The direction to sort the results by. If omitted, the results will be sorted by dateCreated in descending order."
            },
            "required": false,
            "description": "The direction to sort the results by. If omitted, the results will be sorted by dateCreated in descending order.",
            "name": "sortDirection",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get all OAuth apps for an organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "appName": {
                            "type": "string"
                          },
                          "clientId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string",
                            "description": "The organization that owns this OAuth app."
                          },
                          "owner": {
                            "type": "string",
                            "description": "The user that created this OAuth app."
                          },
                          "deleted": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "appName",
                          "clientId",
                          "organizationId",
                          "owner",
                          "deleted",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ]
                      }
                    },
                    "cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "pageSize": {
                      "type": "number"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number",
                      "nullable": true
                    },
                    "hasNextPage": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - User not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authentication error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User does not have access",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authorization error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Resource not found error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content - The request failed validation checks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path",
                          "message"
                        ]
                      }
                    },
                    "name": {
                      "type": "string",
                      "enum": [
                        "ZodError"
                      ]
                    }
                  },
                  "required": [
                    "issues",
                    "name"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Internal server error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create a new OAuth application for an organization",
        "description": "This endpoint generates the client_id and client_secret you will need to generate OAuth tokens at a user scope.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "appName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "owner": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The user that created this OAuth app."
                  },
                  "organizationId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "The organization that owns this OAuth app."
                  }
                },
                "required": [
                  "appName",
                  "owner",
                  "organizationId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a new OAuth application for an organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "appName": {
                      "type": "string"
                    },
                    "clientID": {
                      "type": "string"
                    },
                    "clientSecret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "appName",
                    "clientID",
                    "clientSecret"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/oauth/apps/{clientId}/access-token/{tokenId}": {
      "get": {
        "summary": "Get a specific OAuth access token by id.",
        "description": "This endpoint returns a specific OAuth access token by id.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "clientId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "tokenId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get a specific OAuth access token by id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accessTokenId": {
                          "type": "string",
                          "description": "The ID of the OAuth access token."
                        },
                        "oAuthAppId": {
                          "type": "string",
                          "description": "The OAuth app that this token is bound to."
                        },
                        "userId": {
                          "type": "string",
                          "description": "The user that this token is bound to. This is also the subject of the token."
                        },
                        "audience": {
                          "type": "string",
                          "description": "The intended audience of the token."
                        },
                        "subject": {
                          "type": "string",
                          "description": "The subject of the token."
                        },
                        "scope": {
                          "type": "string",
                          "enum": [
                            "read",
                            "write"
                          ],
                          "description": "One of (\"read\", \"write\"). This will restrict what HTTP verbs the token has access to."
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The expiration date of the token."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The creation date of the token."
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The last update date of the token."
                        },
                        "revokedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The date the token was revoked"
                        }
                      },
                      "required": [
                        "accessTokenId",
                        "oAuthAppId",
                        "userId",
                        "audience",
                        "subject",
                        "scope",
                        "expiresAt",
                        "createdAt",
                        "updatedAt",
                        "revokedAt"
                      ]
                    },
                    "cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "pageSize": {
                      "type": "number"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number",
                      "nullable": true
                    },
                    "hasNextPage": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - User not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authentication error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User does not have access",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authorization error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Resource not found error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content - The request failed validation checks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path",
                          "message"
                        ]
                      }
                    },
                    "name": {
                      "type": "string",
                      "enum": [
                        "ZodError"
                      ]
                    }
                  },
                  "required": [
                    "issues",
                    "name"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Internal server error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Revoke an OAuth access token for a given OAuth app. ",
        "description": "Soft-delete (revoke) an OAuth access token for a given OAuth app.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "clientId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "tokenId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientSecret": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  }
                },
                "required": [
                  "clientSecret",
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Revoke an OAuth access token for a given OAuth app. ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokenId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tokenId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/oauth/apps/{clientId}/access-token": {
      "post": {
        "summary": "Create a new OAuth access token for a given OAuth app.",
        "description": "This endpoint creates a new OAuth access token at the user scope.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "clientId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientSecret": {
                    "type": "string",
                    "description": "The OAuth app client secret returned in the POST /oauth/apps response."
                  },
                  "userId": {
                    "type": "string",
                    "description": "The user that this token will be bound to"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "read",
                      "write"
                    ],
                    "description": "One of (\"read\", \"write\"). This will restrict what HTTP verbs the token has access to."
                  }
                },
                "required": [
                  "clientSecret",
                  "userId",
                  "scope"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a new OAuth access token for a given OAuth app.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accessTokenId": {
                      "type": "string"
                    },
                    "accessToken": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "accessTokenId",
                    "accessToken"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "get": {
        "summary": "Get all OAuth access tokens for a given OAuth app.",
        "description": "This endpoint returns all OAuth access tokens for a given OAuth app.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The OAuth app that the tokens are bound to."
            },
            "required": true,
            "description": "The OAuth app that the tokens are bound to.",
            "name": "clientId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The id of the user that created one or more OAuth access tokens."
            },
            "required": true,
            "description": "The id of the user that created one or more OAuth access tokens.",
            "name": "owner",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Return OAuth access tokens created after this date."
            },
            "required": false,
            "description": "Return OAuth access tokens created after this date.",
            "name": "fromDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Return OAuth access tokens created before this date."
            },
            "required": false,
            "description": "Return OAuth access tokens created before this date.",
            "name": "toDate",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "The number of results to return. If omitted, 100 results will be returned."
            },
            "required": false,
            "description": "The number of results to return. If omitted, 100 results will be returned.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The cursor to paginate the results. Cursor-based pagination will always be used unless if left blank and a page number is provided."
            },
            "required": false,
            "description": "The cursor to paginate the results. Cursor-based pagination will always be used unless if left blank and a page number is provided.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "description": "The page number to return. If omitted, the first page of results will be returned."
            },
            "required": false,
            "description": "The page number to return. If omitted, the first page of results will be returned.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "dateCreated",
                "dateUpdated"
              ],
              "default": "dateCreated",
              "description": "The field to sort the results by. If omitted, the results will be sorted by dateCreated in descending order."
            },
            "required": false,
            "description": "The field to sort the results by. If omitted, the results will be sorted by dateCreated in descending order.",
            "name": "sortField",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc",
              "description": "The direction to sort the results by. If omitted, the results will be sorted by dateCreated in descending order."
            },
            "required": false,
            "description": "The direction to sort the results by. If omitted, the results will be sorted by dateCreated in descending order.",
            "name": "sortDirection",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get all OAuth access tokens for a given OAuth app.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accessTokenId": {
                            "type": "string",
                            "description": "The ID of the OAuth access token."
                          },
                          "oAuthAppId": {
                            "type": "string",
                            "description": "The OAuth app that this token is bound to."
                          },
                          "userId": {
                            "type": "string",
                            "description": "The user that this token is bound to. This is also the subject of the token."
                          },
                          "audience": {
                            "type": "string",
                            "description": "The intended audience of the token."
                          },
                          "subject": {
                            "type": "string",
                            "description": "The subject of the token."
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write"
                            ],
                            "description": "One of (\"read\", \"write\"). This will restrict what HTTP verbs the token has access to."
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The expiration date of the token."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The creation date of the token."
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The last update date of the token."
                          },
                          "revokedAt": {
                            "type": "string",
                            "nullable": true,
                            "format": "date-time",
                            "description": "The date the token was revoked"
                          }
                        },
                        "required": [
                          "accessTokenId",
                          "oAuthAppId",
                          "userId",
                          "audience",
                          "subject",
                          "scope",
                          "expiresAt",
                          "createdAt",
                          "updatedAt",
                          "revokedAt"
                        ]
                      }
                    },
                    "cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "pageSize": {
                      "type": "number"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number",
                      "nullable": true
                    },
                    "hasNextPage": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - User not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authentication error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - User does not have access",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Authorization error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found - Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Resource not found error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content - The request failed validation checks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "issues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "received": {
                            "type": "string"
                          },
                          "path": {
                            "type": "array",
                            "items": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ]
                            }
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "path",
                          "message"
                        ]
                      }
                    },
                    "name": {
                      "type": "string",
                      "enum": [
                        "ZodError"
                      ]
                    }
                  },
                  "required": [
                    "issues",
                    "name"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Internal server error message"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/organizations": {
      "get": {
        "summary": "Get organizations",
        "description": "Get organizations",
        "responses": {
          "200": {
            "description": "Get organizations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Organization ID"
                          },
                          "adminUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Admin IDs"
                          },
                          "betaFeatures": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Beta features"
                          },
                          "consentNotRequired": {
                            "type": "boolean",
                            "description": "If consent is not required"
                          },
                          "dateCreated": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this organization was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "disabled": {
                            "type": "boolean",
                            "description": "If this organization is disabled"
                          },
                          "industries": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Industry ID"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name of this industry"
                                },
                                "description": {
                                  "type": "string",
                                  "description": "Industry description"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            "description": "Industries"
                          },
                          "integrations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Integration ID"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name of this integration"
                                },
                                "externalAccountId": {
                                  "type": "string",
                                  "description": "External Account ID"
                                },
                                "integrationPlatform": {
                                  "type": "string",
                                  "enum": [
                                    "MERGE",
                                    "SIRO_CUSTOM_INPUT",
                                    "SERVICE_TITAN",
                                    "COMPANY_CAM",
                                    "INGAGE",
                                    "LEAD_PERFECTION",
                                    "SPOTIO"
                                  ],
                                  "description": "Integration platform"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The date at which this integration was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The date at which this integration was updated.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                                },
                                "deletedAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "The date at which this integration was deleted.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ).\n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                                },
                                "isActive": {
                                  "type": "boolean",
                                  "description": "If this integration is currently active"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "externalAccountId",
                                "integrationPlatform",
                                "createdAt",
                                "updatedAt",
                                "deletedAt",
                                "isActive"
                              ]
                            },
                            "description": "Integrations"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this organization"
                          },
                          "ownerUid": {
                            "type": "string",
                            "description": "Owner ID"
                          },
                          "teams": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Team ID"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Name of this team"
                                },
                                "coachUids": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "IDs of coaches"
                                },
                                "memberUids": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "IDs of members"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "coachUids",
                                "memberUids"
                              ]
                            },
                            "description": "Teams"
                          }
                        },
                        "required": [
                          "id",
                          "industries",
                          "integrations",
                          "teams"
                        ]
                      }
                    },
                    "cursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opaque cursor for pagination"
                    }
                  },
                  "required": [
                    "data",
                    "cursor"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create an organization",
        "description": "Create a specific organization",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the organization"
                  },
                  "orgGroupIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Organization Group ID"
                    },
                    "description": "Organization Groups that you want to add this organization to"
                  },
                  "adminUids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Admin ID"
                    },
                    "description": "The admins of this organization"
                  },
                  "disabled": {
                    "type": "boolean"
                  },
                  "industryIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Industry ID"
                    },
                    "description": "Industries that this organization belongs to"
                  },
                  "ownerUid": {
                    "type": "string",
                    "description": "Owner ID"
                  }
                },
                "required": [
                  "name",
                  "orgGroupIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create an organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Organization ID"
                    },
                    "adminUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Admin IDs"
                    },
                    "betaFeatures": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Beta features"
                    },
                    "consentNotRequired": {
                      "type": "boolean",
                      "description": "If consent is not required"
                    },
                    "dateCreated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The date at which this organization was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                    },
                    "disabled": {
                      "type": "boolean",
                      "description": "If this organization is disabled"
                    },
                    "industries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Industry ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this industry"
                          },
                          "description": {
                            "type": "string",
                            "description": "Industry description"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "description": "Industries"
                    },
                    "integrations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Integration ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this integration"
                          },
                          "externalAccountId": {
                            "type": "string",
                            "description": "External Account ID"
                          },
                          "integrationPlatform": {
                            "type": "string",
                            "enum": [
                              "MERGE",
                              "SIRO_CUSTOM_INPUT",
                              "SERVICE_TITAN",
                              "COMPANY_CAM",
                              "INGAGE",
                              "LEAD_PERFECTION",
                              "SPOTIO"
                            ],
                            "description": "Integration platform"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was updated.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was deleted.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ).\n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "isActive": {
                            "type": "boolean",
                            "description": "If this integration is currently active"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "externalAccountId",
                          "integrationPlatform",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "isActive"
                        ]
                      },
                      "description": "Integrations"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of this organization"
                    },
                    "ownerUid": {
                      "type": "string",
                      "description": "Owner ID"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Team ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this team"
                          },
                          "coachUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of coaches"
                          },
                          "memberUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of members"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "coachUids",
                          "memberUids"
                        ]
                      },
                      "description": "Teams"
                    }
                  },
                  "required": [
                    "id",
                    "industries",
                    "integrations",
                    "teams"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/organizations/{id}": {
      "get": {
        "summary": "Get an organization",
        "description": "Get a specific organization",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Organization ID"
            },
            "required": true,
            "description": "Organization ID",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get an organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Organization ID"
                    },
                    "adminUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Admin IDs"
                    },
                    "betaFeatures": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Beta features"
                    },
                    "consentNotRequired": {
                      "type": "boolean",
                      "description": "If consent is not required"
                    },
                    "dateCreated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The date at which this organization was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                    },
                    "disabled": {
                      "type": "boolean",
                      "description": "If this organization is disabled"
                    },
                    "industries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Industry ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this industry"
                          },
                          "description": {
                            "type": "string",
                            "description": "Industry description"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "description": "Industries"
                    },
                    "integrations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Integration ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this integration"
                          },
                          "externalAccountId": {
                            "type": "string",
                            "description": "External Account ID"
                          },
                          "integrationPlatform": {
                            "type": "string",
                            "enum": [
                              "MERGE",
                              "SIRO_CUSTOM_INPUT",
                              "SERVICE_TITAN",
                              "COMPANY_CAM",
                              "INGAGE",
                              "LEAD_PERFECTION",
                              "SPOTIO"
                            ],
                            "description": "Integration platform"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was updated.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was deleted.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ).\n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "isActive": {
                            "type": "boolean",
                            "description": "If this integration is currently active"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "externalAccountId",
                          "integrationPlatform",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "isActive"
                        ]
                      },
                      "description": "Integrations"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of this organization"
                    },
                    "ownerUid": {
                      "type": "string",
                      "description": "Owner ID"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Team ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this team"
                          },
                          "coachUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of coaches"
                          },
                          "memberUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of members"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "coachUids",
                          "memberUids"
                        ]
                      },
                      "description": "Teams"
                    }
                  },
                  "required": [
                    "id",
                    "industries",
                    "integrations",
                    "teams"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "summary": "Update an organization",
        "description": "Update a specific organization",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Organization ID"
            },
            "required": true,
            "description": "Organization ID",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the organization"
                  },
                  "adminUids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Admin ID"
                    },
                    "description": "The admins of this organization"
                  },
                  "disabled": {
                    "type": "boolean"
                  },
                  "industryIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Industry ID"
                    },
                    "description": "Industries that this organization belongs to"
                  },
                  "ownerUid": {
                    "type": "string",
                    "description": "Owner ID"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update an organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Organization ID"
                    },
                    "adminUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Admin IDs"
                    },
                    "betaFeatures": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Beta features"
                    },
                    "consentNotRequired": {
                      "type": "boolean",
                      "description": "If consent is not required"
                    },
                    "dateCreated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The date at which this organization was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                    },
                    "disabled": {
                      "type": "boolean",
                      "description": "If this organization is disabled"
                    },
                    "industries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Industry ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this industry"
                          },
                          "description": {
                            "type": "string",
                            "description": "Industry description"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "description": "Industries"
                    },
                    "integrations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Integration ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this integration"
                          },
                          "externalAccountId": {
                            "type": "string",
                            "description": "External Account ID"
                          },
                          "integrationPlatform": {
                            "type": "string",
                            "enum": [
                              "MERGE",
                              "SIRO_CUSTOM_INPUT",
                              "SERVICE_TITAN",
                              "COMPANY_CAM",
                              "INGAGE",
                              "LEAD_PERFECTION",
                              "SPOTIO"
                            ],
                            "description": "Integration platform"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was created.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was updated.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ). \n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "deletedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "The date at which this integration was deleted.\n\t\t\t\tFormat: ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss.sssZ).\n\t\t\t\tExample: 2024-06-13T04:00:00.592Z"
                          },
                          "isActive": {
                            "type": "boolean",
                            "description": "If this integration is currently active"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "externalAccountId",
                          "integrationPlatform",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "isActive"
                        ]
                      },
                      "description": "Integrations"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of this organization"
                    },
                    "ownerUid": {
                      "type": "string",
                      "description": "Owner ID"
                    },
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Team ID"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of this team"
                          },
                          "coachUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of coaches"
                          },
                          "memberUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of members"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "coachUids",
                          "memberUids"
                        ]
                      },
                      "description": "Teams"
                    }
                  },
                  "required": [
                    "id",
                    "industries",
                    "integrations",
                    "teams"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/integrations/connections": {
      "get": {
        "summary": "Get all integration connections for a single org",
        "description": "Returns all integration connections for an org, optionally filtered by platform",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "MERGE",
                "SIRO_CUSTOM_INPUT",
                "SERVICE_TITAN",
                "COMPANY_CAM",
                "INGAGE",
                "LEAD_PERFECTION",
                "SPOTIO",
                "SALESFORCE",
                "SOLUTION_VIEW",
                "CALENDAR_ONLY",
                "AUTHENTICOM",
                "FORTELLIS"
              ],
              "description": "Platform to filter events by"
            },
            "required": false,
            "description": "Platform to filter events by",
            "name": "integrationPlatform",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get all integration connections for a single org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "externalAccountId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "integrationPlatform": {
                            "type": "string",
                            "enum": [
                              "MERGE",
                              "SIRO_CUSTOM_INPUT",
                              "SERVICE_TITAN",
                              "COMPANY_CAM",
                              "INGAGE",
                              "LEAD_PERFECTION",
                              "SPOTIO"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "ISO 8601 date string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "description": "ISO 8601 date string"
                          },
                          "isActive": {
                            "type": "boolean",
                            "description": "Whether the integration is actively syncing data"
                          },
                          "syncStatus": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "modelName": {
                                  "type": "string"
                                },
                                "modelSyncStatus": {
                                  "type": "string",
                                  "enum": [
                                    "SYNCING",
                                    "UP_TO_DATE",
                                    "ERROR"
                                  ]
                                },
                                "modelModifiedAfter": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "createdAt": {
                                  "type": "string"
                                },
                                "updatedAt": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "id",
                                "modelName",
                                "modelSyncStatus",
                                "modelModifiedAfter",
                                "createdAt",
                                "updatedAt"
                              ]
                            }
                          },
                          "syncTranscript": {
                            "type": "boolean",
                            "description": "Whether the transcript will be included in the sync payload"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "externalAccountId",
                          "organizationId",
                          "integrationPlatform",
                          "createdAt",
                          "updatedAt",
                          "isActive",
                          "syncStatus"
                        ]
                      }
                    },
                    "cursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opaque cursor for pagination"
                    }
                  },
                  "required": [
                    "data",
                    "cursor"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create a new integration connection for a given org",
        "description": "Create a new integration connection for a given org",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the integration connection"
                  },
                  "integrationPlatform": {
                    "type": "string",
                    "enum": [
                      "MERGE",
                      "SIRO_CUSTOM_INPUT",
                      "SERVICE_TITAN",
                      "COMPANY_CAM",
                      "INGAGE",
                      "LEAD_PERFECTION",
                      "SPOTIO"
                    ],
                    "description": "The type of integration connection"
                  },
                  "externalAccountId": {
                    "type": "string",
                    "description": "External account id (typically maps to a tenant)"
                  },
                  "isActive": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the connection is active"
                  }
                },
                "required": [
                  "name",
                  "integrationPlatform",
                  "externalAccountId"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a new integration connection for a given org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "externalAccountId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "integrationPlatform": {
                      "type": "string",
                      "enum": [
                        "MERGE",
                        "SIRO_CUSTOM_INPUT",
                        "SERVICE_TITAN",
                        "COMPANY_CAM",
                        "INGAGE",
                        "LEAD_PERFECTION",
                        "SPOTIO"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "isActive": {
                      "type": "boolean",
                      "description": "Whether the integration is actively syncing data"
                    },
                    "syncStatus": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "modelName": {
                            "type": "string"
                          },
                          "modelSyncStatus": {
                            "type": "string",
                            "enum": [
                              "SYNCING",
                              "UP_TO_DATE",
                              "ERROR"
                            ]
                          },
                          "modelModifiedAfter": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "modelName",
                          "modelSyncStatus",
                          "modelModifiedAfter",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "syncTranscript": {
                      "type": "boolean",
                      "description": "Whether the transcript will be included in the sync payload"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "externalAccountId",
                    "organizationId",
                    "integrationPlatform",
                    "createdAt",
                    "updatedAt",
                    "isActive",
                    "syncStatus"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Integration platform not supported",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Duplicate connection for integration platform for org",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/integrations/connections/{id}": {
      "get": {
        "summary": "Get a single integration connection within a single org",
        "description": "Get a single integration connection within a single org",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the integration connection to fetch"
            },
            "required": true,
            "description": "ID of the integration connection to fetch",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get a single integration connection within a single org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "externalAccountId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "integrationPlatform": {
                      "type": "string",
                      "enum": [
                        "MERGE",
                        "SIRO_CUSTOM_INPUT",
                        "SERVICE_TITAN",
                        "COMPANY_CAM",
                        "INGAGE",
                        "LEAD_PERFECTION",
                        "SPOTIO"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "isActive": {
                      "type": "boolean",
                      "description": "Whether the integration is actively syncing data"
                    },
                    "syncStatus": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "modelName": {
                            "type": "string"
                          },
                          "modelSyncStatus": {
                            "type": "string",
                            "enum": [
                              "SYNCING",
                              "UP_TO_DATE",
                              "ERROR"
                            ]
                          },
                          "modelModifiedAfter": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "modelName",
                          "modelSyncStatus",
                          "modelModifiedAfter",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "syncTranscript": {
                      "type": "boolean",
                      "description": "Whether the transcript will be included in the sync payload"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "externalAccountId",
                    "organizationId",
                    "integrationPlatform",
                    "createdAt",
                    "updatedAt",
                    "isActive",
                    "syncStatus"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Integration connection not found or you do not have permission to view it.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "summary": "Update a single integration connection within a given org",
        "description": "Update a single integration connection within a given org",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the integration connection to update"
            },
            "required": true,
            "description": "ID of the integration connection to update",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New name of the integration connection"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "New active status for the integration connection"
                  },
                  "syncTranscript": {
                    "type": "boolean",
                    "description": "Whether the transcript will be included in the sync payload"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update a single integration connection within a given org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "externalAccountId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "integrationPlatform": {
                      "type": "string",
                      "enum": [
                        "MERGE",
                        "SIRO_CUSTOM_INPUT",
                        "SERVICE_TITAN",
                        "COMPANY_CAM",
                        "INGAGE",
                        "LEAD_PERFECTION",
                        "SPOTIO"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "isActive": {
                      "type": "boolean",
                      "description": "Whether the integration is actively syncing data"
                    },
                    "syncStatus": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "modelName": {
                            "type": "string"
                          },
                          "modelSyncStatus": {
                            "type": "string",
                            "enum": [
                              "SYNCING",
                              "UP_TO_DATE",
                              "ERROR"
                            ]
                          },
                          "modelModifiedAfter": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "modelName",
                          "modelSyncStatus",
                          "modelModifiedAfter",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "syncTranscript": {
                      "type": "boolean",
                      "description": "Whether the transcript will be included in the sync payload"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "externalAccountId",
                    "organizationId",
                    "integrationPlatform",
                    "createdAt",
                    "updatedAt",
                    "isActive",
                    "syncStatus"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Integration connection not found or you do not have permission to view it.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete a single integration connection within a single org",
        "description": "Delete a single integration connection within a single org",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the integration connection to fetch"
            },
            "required": true,
            "description": "ID of the integration connection to fetch",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a single integration connection within a single org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "externalAccountId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "integrationPlatform": {
                      "type": "string",
                      "enum": [
                        "MERGE",
                        "SIRO_CUSTOM_INPUT",
                        "SERVICE_TITAN",
                        "COMPANY_CAM",
                        "INGAGE",
                        "LEAD_PERFECTION",
                        "SPOTIO"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "ISO 8601 date string"
                    },
                    "isActive": {
                      "type": "boolean",
                      "description": "Whether the integration is actively syncing data"
                    },
                    "syncStatus": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "modelName": {
                            "type": "string"
                          },
                          "modelSyncStatus": {
                            "type": "string",
                            "enum": [
                              "SYNCING",
                              "UP_TO_DATE",
                              "ERROR"
                            ]
                          },
                          "modelModifiedAfter": {
                            "type": "string",
                            "nullable": true
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "id",
                          "modelName",
                          "modelSyncStatus",
                          "modelModifiedAfter",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "syncTranscript": {
                      "type": "boolean",
                      "description": "Whether the transcript will be included in the sync payload"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "externalAccountId",
                    "organizationId",
                    "integrationPlatform",
                    "createdAt",
                    "updatedAt",
                    "isActive",
                    "syncStatus"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Integration connection not found or you do not have permission to view it.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/integrations/salesforce": {
      "put": {
        "summary": "Upsert Salesforce integration authentication details",
        "description": "Upsert Salesforce integration authentication details",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "namespace": {
                    "type": "string"
                  },
                  "org_id": {
                    "type": "string"
                  },
                  "instance_url": {
                    "type": "string"
                  },
                  "refresh_token": {
                    "type": "string",
                    "default": "",
                    "description": "Deprecated -- Username for JWT Bearer OAuthflow should be used going forward"
                  },
                  "username": {
                    "type": "string",
                    "description": "Username for JWT Bearer OAuth flow"
                  },
                  "is_prod": {
                    "type": "boolean",
                    "nullable": true
                  },
                  "use_prod_eca": {
                    "type": "boolean",
                    "nullable": true
                  }
                },
                "required": [
                  "namespace",
                  "org_id",
                  "instance_url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upsert Salesforce integration authentication details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrationConnectionId": {
                      "type": "string"
                    },
                    "isActive": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "integrationConnectionId",
                    "isActive"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/organizations/{orgId}/teams": {
      "get": {
        "summary": "Get all teams for an org",
        "description": "Returns all teams for an org with pagination",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Organization ID to fetch teams for"
            },
            "required": true,
            "description": "Organization ID to fetch teams for",
            "name": "orgId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "required": false,
            "name": "pageSize",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get all teams for an org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Team ID"
                          },
                          "name": {
                            "type": "string",
                            "nullable": true,
                            "description": "Team name"
                          },
                          "organizationId": {
                            "type": "string",
                            "description": "Organization this team belongs to"
                          },
                          "coachUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Array of coach user IDs"
                          },
                          "coachManifest": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "email": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "firstName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "lastName": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "email",
                                "firstName",
                                "lastName"
                              ]
                            },
                            "description": "Map of coach UIDs to their manifest data"
                          },
                          "memberUids": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Array of member user IDs"
                          },
                          "memberManifest": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "email": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "firstName": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "lastName": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "email",
                                "firstName",
                                "lastName"
                              ]
                            },
                            "description": "Map of member UIDs to their manifest data"
                          },
                          "newUserDefaultConversationTypes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Array of conversation type IDs"
                          },
                          "createdAt": {
                            "type": "string",
                            "nullable": true,
                            "description": "ISO 8601 date string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "organizationId",
                          "coachUids",
                          "coachManifest",
                          "memberUids",
                          "memberManifest",
                          "newUserDefaultConversationTypes",
                          "createdAt"
                        ]
                      }
                    },
                    "cursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Opaque cursor for pagination"
                    }
                  },
                  "required": [
                    "data",
                    "cursor"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create a new team for an org",
        "description": "Create a new team for an org",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Organization ID"
            },
            "required": true,
            "description": "Organization ID",
            "name": "orgId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Team name"
                  },
                  "coachUids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Array of coach user IDs"
                  },
                  "memberUids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Array of member user IDs"
                  },
                  "newUserDefaultConversationTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Array of conversation type IDs"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create a new team for an org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Team ID"
                    },
                    "name": {
                      "type": "string",
                      "nullable": true,
                      "description": "Team name"
                    },
                    "organizationId": {
                      "type": "string",
                      "description": "Organization this team belongs to"
                    },
                    "coachUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of coach user IDs"
                    },
                    "coachManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of coach UIDs to their manifest data"
                    },
                    "memberUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of member user IDs"
                    },
                    "memberManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of member UIDs to their manifest data"
                    },
                    "newUserDefaultConversationTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of conversation type IDs"
                    },
                    "createdAt": {
                      "type": "string",
                      "nullable": true,
                      "description": "ISO 8601 date string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "organizationId",
                    "coachUids",
                    "coachManifest",
                    "memberUids",
                    "memberManifest",
                    "newUserDefaultConversationTypes",
                    "createdAt"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/core/organizations/{orgId}/teams/{teamId}": {
      "get": {
        "summary": "Get a single team within a given org",
        "description": "Get a single team within a given org",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Organization ID"
            },
            "required": true,
            "description": "Organization ID",
            "name": "orgId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the team to fetch"
            },
            "required": true,
            "description": "ID of the team to fetch",
            "name": "teamId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get a single team within a given org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Team ID"
                    },
                    "name": {
                      "type": "string",
                      "nullable": true,
                      "description": "Team name"
                    },
                    "organizationId": {
                      "type": "string",
                      "description": "Organization this team belongs to"
                    },
                    "coachUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of coach user IDs"
                    },
                    "coachManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of coach UIDs to their manifest data"
                    },
                    "memberUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of member user IDs"
                    },
                    "memberManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of member UIDs to their manifest data"
                    },
                    "newUserDefaultConversationTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of conversation type IDs"
                    },
                    "createdAt": {
                      "type": "string",
                      "nullable": true,
                      "description": "ISO 8601 date string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "organizationId",
                    "coachUids",
                    "coachManifest",
                    "memberUids",
                    "memberManifest",
                    "newUserDefaultConversationTypes",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Team not found or you do not have permission to view it.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "summary": "Update a single team within a single org",
        "description": "Update a single team within a single org",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Organization ID"
            },
            "required": true,
            "description": "Organization ID",
            "name": "orgId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the team to update"
            },
            "required": true,
            "description": "ID of the team to update",
            "name": "teamId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New team name"
                  },
                  "coachUids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "New array of coach user IDs"
                  },
                  "memberUids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "New array of member user IDs"
                  },
                  "newUserDefaultConversationTypes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "New array of conversation type IDs"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update a single team within a single org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Team ID"
                    },
                    "name": {
                      "type": "string",
                      "nullable": true,
                      "description": "Team name"
                    },
                    "organizationId": {
                      "type": "string",
                      "description": "Organization this team belongs to"
                    },
                    "coachUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of coach user IDs"
                    },
                    "coachManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of coach UIDs to their manifest data"
                    },
                    "memberUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of member user IDs"
                    },
                    "memberManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of member UIDs to their manifest data"
                    },
                    "newUserDefaultConversationTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of conversation type IDs"
                    },
                    "createdAt": {
                      "type": "string",
                      "nullable": true,
                      "description": "ISO 8601 date string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "organizationId",
                    "coachUids",
                    "coachManifest",
                    "memberUids",
                    "memberManifest",
                    "newUserDefaultConversationTypes",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Team not found or you do not have permission to update it.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Hard-delete a single team within a single org",
        "description": "Hard-delete a single team within a single org",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Organization ID"
            },
            "required": true,
            "description": "Organization ID",
            "name": "orgId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the team to delete"
            },
            "required": true,
            "description": "ID of the team to delete",
            "name": "teamId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Hard-delete a single team within a single org",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Team ID"
                    },
                    "name": {
                      "type": "string",
                      "nullable": true,
                      "description": "Team name"
                    },
                    "organizationId": {
                      "type": "string",
                      "description": "Organization this team belongs to"
                    },
                    "coachUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of coach user IDs"
                    },
                    "coachManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of coach UIDs to their manifest data"
                    },
                    "memberUids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of member user IDs"
                    },
                    "memberManifest": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "email": {
                            "type": "string",
                            "nullable": true
                          },
                          "firstName": {
                            "type": "string",
                            "nullable": true
                          },
                          "lastName": {
                            "type": "string",
                            "nullable": true
                          }
                        },
                        "required": [
                          "email",
                          "firstName",
                          "lastName"
                        ]
                      },
                      "description": "Map of member UIDs to their manifest data"
                    },
                    "newUserDefaultConversationTypes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of conversation type IDs"
                    },
                    "createdAt": {
                      "type": "string",
                      "nullable": true,
                      "description": "ISO 8601 date string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "organizationId",
                    "coachUids",
                    "coachManifest",
                    "memberUids",
                    "memberManifest",
                    "newUserDefaultConversationTypes",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Team not found or you do not have permission to delete it.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/accounts/{id}": {
      "get": {
        "summary": "Get an account",
        "description": "Get an account",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get an account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string",
                      "description": "The ID of the account in the external system (e.g. Salesforce)"
                    },
                    "latitude": {
                      "type": "number"
                    },
                    "longitude": {
                      "type": "number"
                    },
                    "addresses": {
                      "type": "array",
                      "items": {
                        "nullable": true
                      }
                    },
                    "phoneNumbers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "emailAddresses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "The date the account was created"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "The date the account was last updated"
                    }
                  },
                  "required": [
                    "id",
                    "externalId",
                    "addresses",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "Update an account",
        "description": "Update an account",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "latitude": {
                    "type": "number"
                  },
                  "longitude": {
                    "type": "number"
                  },
                  "phoneNumbers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "emailAddresses": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "addresses": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string"
                        },
                        "street": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "zip": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "country",
                        "street",
                        "city",
                        "state",
                        "zip"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update an account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string",
                      "description": "The ID of the account in the external system (e.g. Salesforce)"
                    },
                    "latitude": {
                      "type": "number"
                    },
                    "longitude": {
                      "type": "number"
                    },
                    "addresses": {
                      "type": "array",
                      "items": {
                        "nullable": true
                      }
                    },
                    "phoneNumbers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "emailAddresses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "The date the account was created"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "The date the account was last updated"
                    }
                  },
                  "required": [
                    "id",
                    "externalId",
                    "addresses",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete an account",
        "description": "Delete an accounts",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete an account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/accounts": {
      "get": {
        "summary": "Get accounts",
        "description": "Get accounts",
        "responses": {
          "200": {
            "description": "Get accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the account in the external system (e.g. Salesforce)"
                      },
                      "latitude": {
                        "type": "number"
                      },
                      "longitude": {
                        "type": "number"
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "nullable": true
                        }
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "name": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "The date the account was created"
                      },
                      "updatedAt": {
                        "type": "string",
                        "description": "The date the account was last updated"
                      }
                    },
                    "required": [
                      "id",
                      "externalId",
                      "addresses",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create an account",
        "description": "Create an account",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the account in the external system (e.g. Salesforce)"
                      },
                      "name": {
                        "type": "string"
                      },
                      "latitude": {
                        "type": "number"
                      },
                      "longitude": {
                        "type": "number"
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "country": {
                              "type": "string"
                            },
                            "street": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string"
                            },
                            "zip": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "country",
                            "street",
                            "city",
                            "state",
                            "zip"
                          ]
                        }
                      }
                    },
                    "required": [
                      "externalId",
                      "latitude",
                      "longitude"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the account in the external system (e.g. Salesforce)"
                      },
                      "name": {
                        "type": "string"
                      },
                      "latitude": {
                        "type": "number"
                      },
                      "longitude": {
                        "type": "number"
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "country": {
                              "type": "string"
                            },
                            "street": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string"
                            },
                            "zip": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "country",
                            "street",
                            "city",
                            "state",
                            "zip"
                          ]
                        }
                      }
                    },
                    "required": [
                      "externalId",
                      "addresses"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create an account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string",
                      "description": "The ID of the account in the external system (e.g. Salesforce)"
                    },
                    "latitude": {
                      "type": "number"
                    },
                    "longitude": {
                      "type": "number"
                    },
                    "addresses": {
                      "type": "array",
                      "items": {
                        "nullable": true
                      }
                    },
                    "phoneNumbers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "emailAddresses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "name": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "The date the account was created"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "The date the account was last updated"
                    }
                  },
                  "required": [
                    "id",
                    "externalId",
                    "addresses",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/opportunities/{id}": {
      "get": {
        "summary": "Get an opportunity",
        "description": "Get an opportunity",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get an opportunity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string",
                      "description": "The ID of the opportunity in the external system (e.g. Salesforce)"
                    },
                    "name": {
                      "type": "string",
                      "nullable": true,
                      "description": "The name of the opportunity"
                    },
                    "amount": {
                      "type": "number",
                      "description": "The dollar amount of the opportunity"
                    },
                    "closedAt": {
                      "type": "string",
                      "description": "The closure date of the opportunity"
                    },
                    "disposition": {
                      "type": "string",
                      "description": "\"WON\" | \"LOST\" | \"OPEN\""
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "The date the opportunity was created"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "The date the opportunity was last updated"
                    },
                    "recordingId": {
                      "type": "string",
                      "description": "The ID of the recording associated to the opportunity"
                    },
                    "accountId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "account": {
                      "nullable": true
                    },
                    "opportunityUsers": {
                      "type": "array",
                      "items": {
                        "nullable": true
                      }
                    }
                  },
                  "required": [
                    "id",
                    "externalId",
                    "createdAt",
                    "updatedAt",
                    "organizationId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete an opportunity",
        "description": "Delete an opportunity",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete an opportunity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/opportunities": {
      "get": {
        "summary": "Get opportunities",
        "description": "Get opportunities",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "recordingId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "externalId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get opportunities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string",
                            "description": "The ID of the opportunity in the external system (e.g. Salesforce)"
                          },
                          "name": {
                            "type": "string",
                            "nullable": true,
                            "description": "The name of the opportunity"
                          },
                          "amount": {
                            "type": "number",
                            "description": "The dollar amount of the opportunity"
                          },
                          "closedAt": {
                            "type": "string",
                            "description": "The closure date of the opportunity"
                          },
                          "disposition": {
                            "type": "string",
                            "description": "\"WON\" | \"LOST\" | \"OPEN\""
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "The date the opportunity was created"
                          },
                          "updatedAt": {
                            "type": "string",
                            "description": "The date the opportunity was last updated"
                          },
                          "recordingId": {
                            "type": "string",
                            "description": "The ID of the recording associated to the opportunity"
                          },
                          "accountId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "account": {
                            "nullable": true
                          },
                          "opportunityUsers": {
                            "type": "array",
                            "items": {
                              "nullable": true
                            }
                          }
                        },
                        "required": [
                          "id",
                          "externalId",
                          "createdAt",
                          "updatedAt",
                          "organizationId"
                        ]
                      }
                    },
                    "cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "pageSize": {
                      "type": "number"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number",
                      "nullable": true
                    },
                    "hasNextPage": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/opportunity-users/{id}": {
      "get": {
        "summary": "Get an opportunity user",
        "description": "Get an opportunity user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get an opportunity user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "opportunityId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "amountPercentage": {
                      "type": "number"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "integrationConnectionId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "opportunityId",
                    "userId",
                    "organizationId",
                    "createdAt",
                    "updatedAt",
                    "integrationConnectionId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "Update an opportunity user",
        "description": "Update an opportunity user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "opportunityId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "amountPercentage": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update an opportunity user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "opportunityId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "amountPercentage": {
                      "type": "number"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "integrationConnectionId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "opportunityId",
                    "userId",
                    "organizationId",
                    "createdAt",
                    "updatedAt",
                    "integrationConnectionId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete an opportunity user",
        "description": "Delete an opportunity user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete an opportunity user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/opportunity-users": {
      "get": {
        "summary": "Get opportunity users",
        "description": "Get opportunity users",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "opportunityId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "userId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get opportunity users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "opportunityId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "amountPercentage": {
                        "type": "number"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "integrationConnectionId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "opportunityId",
                      "userId",
                      "organizationId",
                      "createdAt",
                      "updatedAt",
                      "integrationConnectionId"
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create an opportunity user",
        "description": "Create an opportunity user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "opportunityId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "amountPercentage": {
                    "type": "number"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create an opportunity user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "opportunityId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "amountPercentage": {
                      "type": "number"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "integrationConnectionId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "opportunityId",
                    "userId",
                    "organizationId",
                    "createdAt",
                    "updatedAt",
                    "integrationConnectionId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/sync/opportunities": {
      "put": {
        "summary": "Sync an opportunity",
        "description": "Sync an opportunity",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "description": "The ID of the opportunity in the external system"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the opportunity"
                  },
                  "amount": {
                    "type": "number",
                    "description": "The dollar amount of the opportunity"
                  },
                  "closedAt": {
                    "type": "string",
                    "description": "The closure date of the opportunity in string format e.g. 2024-02-28 20:09:58.692"
                  },
                  "remoteCreatedAt": {
                    "type": "string",
                    "description": "date the opportunity was created"
                  },
                  "lastActivityAt": {
                    "type": "string",
                    "description": "date of last external update"
                  },
                  "deletedAt": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "The datetime when this record was deleted in the external system"
                  },
                  "disposition": {
                    "type": "string",
                    "enum": [
                      "OPEN",
                      "LOST",
                      "WON"
                    ],
                    "description": "\"WON\" | \"LOST\" | \"OPEN\""
                  },
                  "accountId": {
                    "type": "string",
                    "nullable": true,
                    "description": "Internal SIRO accountId override for this opportunity. OPTIONAL -- only use if you know the internal value of the Account as it will override the account object args."
                  },
                  "account": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the account in the external system."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the account"
                      },
                      "latitude": {
                        "type": "number",
                        "description": "The latitude of the account"
                      },
                      "longitude": {
                        "type": "number",
                        "description": "The longitude of the account"
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "country": {
                              "type": "string"
                            },
                            "street": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string"
                            },
                            "zip": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "country",
                            "street",
                            "city",
                            "state",
                            "zip"
                          ]
                        },
                        "description": "The address(es) associated to the account"
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The phone number(s) for the account"
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The email address(es) for the account"
                      },
                      "lastActivityAt": {
                        "type": "string",
                        "description": "The datetime of the last activity on this record in the external system"
                      },
                      "deletedAt": {
                        "type": "string",
                        "nullable": true,
                        "format": "date-time",
                        "description": "The datetime when this record was deleted in the external system"
                      },
                      "owner": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "externalId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "externalId"
                        ],
                        "description": "The owner user of this record in the external system (optional)"
                      },
                      "mergedToExternalId": {
                        "type": "string",
                        "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                      },
                      "mergedFromExternalIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                      }
                    },
                    "description": "The associated account for this opportunity. Note: supplying just an externalId will resolve to an already-synced account"
                  },
                  "contact": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the contact in the external system"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the contact"
                      },
                      "latitude": {
                        "type": "number",
                        "description": "The latitude of the contact"
                      },
                      "longitude": {
                        "type": "number",
                        "description": "The longitude of the contact"
                      },
                      "account": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "externalId": {
                            "type": "string",
                            "description": "The ID of the account in the external system."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the account"
                          },
                          "latitude": {
                            "type": "number",
                            "description": "The latitude of the account"
                          },
                          "longitude": {
                            "type": "number",
                            "description": "The longitude of the account"
                          },
                          "addresses": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "country": {
                                  "type": "string"
                                },
                                "street": {
                                  "type": "string"
                                },
                                "city": {
                                  "type": "string"
                                },
                                "state": {
                                  "type": "string"
                                },
                                "zip": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "country",
                                "street",
                                "city",
                                "state",
                                "zip"
                              ]
                            },
                            "description": "The address(es) associated to the account"
                          },
                          "phoneNumbers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The phone number(s) for the account"
                          },
                          "emailAddresses": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The email address(es) for the account"
                          },
                          "lastActivityAt": {
                            "type": "string",
                            "description": "The datetime of the last activity on this record in the external system"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "format": "date-time",
                            "description": "The datetime when this record was deleted in the external system"
                          },
                          "owner": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "externalId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "externalId"
                            ],
                            "description": "The owner user of this record in the external system (optional)"
                          },
                          "mergedToExternalId": {
                            "type": "string",
                            "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                          },
                          "mergedFromExternalIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                          }
                        },
                        "description": "The associated account for this contact. Note: supplying just an externalId will resolve to an already-synced account"
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "country": {
                              "type": "string"
                            },
                            "street": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string"
                            },
                            "zip": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "country",
                            "street",
                            "city",
                            "state",
                            "zip"
                          ]
                        },
                        "description": "The address(es) associated with this contact"
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The phone number(s) associated with this contact"
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The email address(es) associated with this contact"
                      },
                      "lastActivityAt": {
                        "type": "string",
                        "description": "The datetime of the last activity on this record in the external system"
                      },
                      "deletedAt": {
                        "type": "string",
                        "nullable": true,
                        "format": "date-time",
                        "description": "The datetime when this record was deleted in the external system"
                      },
                      "owner": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "externalId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "externalId"
                        ],
                        "description": "The owner of this record in the external system (optional)"
                      },
                      "mergedToExternalId": {
                        "type": "string",
                        "description": "If this Contact was merged into another, the surviving Contact externalId. Will migrate all existing references from this Contact to the surviving Contact."
                      },
                      "mergedFromExternalIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "If other Contacts were merged into this one, their externalIds. Will migrate all existing references from those Contacts to this Contact."
                      }
                    },
                    "required": [
                      "externalId"
                    ],
                    "description": "(DEPRECATED IN FAVOR OF CONTACTS ARRAY) The associated contact for this opportunity. Note: supplying just an externalId will resolve to an already-synced contact"
                  },
                  "opportunityContacts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the contact in the external system"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the contact"
                        },
                        "latitude": {
                          "type": "number",
                          "description": "The latitude of the contact"
                        },
                        "longitude": {
                          "type": "number",
                          "description": "The longitude of the contact"
                        },
                        "account": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string",
                              "description": "The ID of the account in the external system."
                            },
                            "name": {
                              "type": "string",
                              "description": "The name of the account"
                            },
                            "latitude": {
                              "type": "number",
                              "description": "The latitude of the account"
                            },
                            "longitude": {
                              "type": "number",
                              "description": "The longitude of the account"
                            },
                            "addresses": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "country": {
                                    "type": "string"
                                  },
                                  "street": {
                                    "type": "string"
                                  },
                                  "city": {
                                    "type": "string"
                                  },
                                  "state": {
                                    "type": "string"
                                  },
                                  "zip": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "country",
                                  "street",
                                  "city",
                                  "state",
                                  "zip"
                                ]
                              },
                              "description": "The address(es) associated to the account"
                            },
                            "phoneNumbers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "The phone number(s) for the account"
                            },
                            "emailAddresses": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "The email address(es) for the account"
                            },
                            "lastActivityAt": {
                              "type": "string",
                              "description": "The datetime of the last activity on this record in the external system"
                            },
                            "deletedAt": {
                              "type": "string",
                              "nullable": true,
                              "format": "date-time",
                              "description": "The datetime when this record was deleted in the external system"
                            },
                            "owner": {
                              "type": "object",
                              "nullable": true,
                              "properties": {
                                "externalId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "externalId"
                              ],
                              "description": "The owner user of this record in the external system (optional)"
                            },
                            "mergedToExternalId": {
                              "type": "string",
                              "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                            },
                            "mergedFromExternalIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                            }
                          },
                          "description": "The associated account for this contact. Note: supplying just an externalId will resolve to an already-synced account"
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "country": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "country",
                              "street",
                              "city",
                              "state",
                              "zip"
                            ]
                          },
                          "description": "The address(es) associated with this contact"
                        },
                        "phoneNumbers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The phone number(s) associated with this contact"
                        },
                        "emailAddresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The email address(es) associated with this contact"
                        },
                        "lastActivityAt": {
                          "type": "string",
                          "description": "The datetime of the last activity on this record in the external system"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system"
                        },
                        "owner": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "externalId"
                          ],
                          "description": "The owner of this record in the external system (optional)"
                        },
                        "mergedToExternalId": {
                          "type": "string",
                          "description": "If this Contact was merged into another, the surviving Contact externalId. Will migrate all existing references from this Contact to the surviving Contact."
                        },
                        "mergedFromExternalIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "If other Contacts were merged into this one, their externalIds. Will migrate all existing references from those Contacts to this Contact."
                        },
                        "isPrimary": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "externalId"
                      ]
                    },
                    "description": "The associated contacts for this opportunity. Note: supplying just an externalId will resolve to an already-synced contact"
                  },
                  "opportunityUsers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The user's externalId in the external system"
                        },
                        "email": {
                          "type": "string",
                          "description": "The user's email, preferably their email in Siro"
                        },
                        "shareOfSale": {
                          "type": "number",
                          "description": "The user's fractional share of the sale, e.g. 0.5 for 50% or 1 for 100% (Optional)"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user, e.g. John Smith"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system (Optional)"
                        }
                      },
                      "required": [
                        "externalId"
                      ]
                    },
                    "description": "The users associated with this opportunity"
                  }
                },
                "required": [
                  "externalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync an opportunity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the opportunity in the external system (e.g. Salesforce)"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true,
                          "description": "The name of the opportunity"
                        },
                        "amount": {
                          "type": "number",
                          "description": "The dollar amount of the opportunity"
                        },
                        "closedAt": {
                          "type": "string",
                          "description": "The closure date of the opportunity"
                        },
                        "disposition": {
                          "type": "string",
                          "description": "\"WON\" | \"LOST\" | \"OPEN\""
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "The date the opportunity was created"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "The date the opportunity was last updated"
                        },
                        "recordingId": {
                          "type": "string",
                          "description": "The ID of the recording associated to the opportunity"
                        },
                        "accountId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "account": {
                          "nullable": true
                        },
                        "opportunityUsers": {
                          "type": "array",
                          "items": {
                            "nullable": true
                          }
                        }
                      },
                      "required": [
                        "id",
                        "externalId",
                        "createdAt",
                        "updatedAt",
                        "organizationId"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/sync/batch/opportunities": {
      "put": {
        "summary": "Sync a batch of opportunities",
        "description": "Sync a batch of opportunities",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "externalId": {
                      "type": "string",
                      "description": "The ID of the opportunity in the external system"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the opportunity"
                    },
                    "amount": {
                      "type": "number",
                      "description": "The dollar amount of the opportunity"
                    },
                    "closedAt": {
                      "type": "string",
                      "description": "The closure date of the opportunity in string format e.g. 2024-02-28 20:09:58.692"
                    },
                    "remoteCreatedAt": {
                      "type": "string",
                      "description": "date the opportunity was created"
                    },
                    "lastActivityAt": {
                      "type": "string",
                      "description": "date of last external update"
                    },
                    "deletedAt": {
                      "type": "string",
                      "nullable": true,
                      "format": "date-time",
                      "description": "The datetime when this record was deleted in the external system"
                    },
                    "disposition": {
                      "type": "string",
                      "enum": [
                        "OPEN",
                        "LOST",
                        "WON"
                      ],
                      "description": "\"WON\" | \"LOST\" | \"OPEN\""
                    },
                    "accountId": {
                      "type": "string",
                      "nullable": true,
                      "description": "Internal SIRO accountId override for this opportunity. OPTIONAL -- only use if you know the internal value of the Account as it will override the account object args."
                    },
                    "account": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the account in the external system."
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the account"
                        },
                        "latitude": {
                          "type": "number",
                          "description": "The latitude of the account"
                        },
                        "longitude": {
                          "type": "number",
                          "description": "The longitude of the account"
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "country": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "country",
                              "street",
                              "city",
                              "state",
                              "zip"
                            ]
                          },
                          "description": "The address(es) associated to the account"
                        },
                        "phoneNumbers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The phone number(s) for the account"
                        },
                        "emailAddresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The email address(es) for the account"
                        },
                        "lastActivityAt": {
                          "type": "string",
                          "description": "The datetime of the last activity on this record in the external system"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system"
                        },
                        "owner": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "externalId"
                          ],
                          "description": "The owner user of this record in the external system (optional)"
                        },
                        "mergedToExternalId": {
                          "type": "string",
                          "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                        },
                        "mergedFromExternalIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                        }
                      },
                      "description": "The associated account for this opportunity. Note: supplying just an externalId will resolve to an already-synced account"
                    },
                    "contact": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the contact in the external system"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the contact"
                        },
                        "latitude": {
                          "type": "number",
                          "description": "The latitude of the contact"
                        },
                        "longitude": {
                          "type": "number",
                          "description": "The longitude of the contact"
                        },
                        "account": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string",
                              "description": "The ID of the account in the external system."
                            },
                            "name": {
                              "type": "string",
                              "description": "The name of the account"
                            },
                            "latitude": {
                              "type": "number",
                              "description": "The latitude of the account"
                            },
                            "longitude": {
                              "type": "number",
                              "description": "The longitude of the account"
                            },
                            "addresses": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "country": {
                                    "type": "string"
                                  },
                                  "street": {
                                    "type": "string"
                                  },
                                  "city": {
                                    "type": "string"
                                  },
                                  "state": {
                                    "type": "string"
                                  },
                                  "zip": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "country",
                                  "street",
                                  "city",
                                  "state",
                                  "zip"
                                ]
                              },
                              "description": "The address(es) associated to the account"
                            },
                            "phoneNumbers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "The phone number(s) for the account"
                            },
                            "emailAddresses": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "The email address(es) for the account"
                            },
                            "lastActivityAt": {
                              "type": "string",
                              "description": "The datetime of the last activity on this record in the external system"
                            },
                            "deletedAt": {
                              "type": "string",
                              "nullable": true,
                              "format": "date-time",
                              "description": "The datetime when this record was deleted in the external system"
                            },
                            "owner": {
                              "type": "object",
                              "nullable": true,
                              "properties": {
                                "externalId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "externalId"
                              ],
                              "description": "The owner user of this record in the external system (optional)"
                            },
                            "mergedToExternalId": {
                              "type": "string",
                              "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                            },
                            "mergedFromExternalIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                            }
                          },
                          "description": "The associated account for this contact. Note: supplying just an externalId will resolve to an already-synced account"
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "country": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "country",
                              "street",
                              "city",
                              "state",
                              "zip"
                            ]
                          },
                          "description": "The address(es) associated with this contact"
                        },
                        "phoneNumbers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The phone number(s) associated with this contact"
                        },
                        "emailAddresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The email address(es) associated with this contact"
                        },
                        "lastActivityAt": {
                          "type": "string",
                          "description": "The datetime of the last activity on this record in the external system"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system"
                        },
                        "owner": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "externalId"
                          ],
                          "description": "The owner of this record in the external system (optional)"
                        },
                        "mergedToExternalId": {
                          "type": "string",
                          "description": "If this Contact was merged into another, the surviving Contact externalId. Will migrate all existing references from this Contact to the surviving Contact."
                        },
                        "mergedFromExternalIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "If other Contacts were merged into this one, their externalIds. Will migrate all existing references from those Contacts to this Contact."
                        }
                      },
                      "required": [
                        "externalId"
                      ],
                      "description": "(DEPRECATED IN FAVOR OF CONTACTS ARRAY) The associated contact for this opportunity. Note: supplying just an externalId will resolve to an already-synced contact"
                    },
                    "opportunityContacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "externalId": {
                            "type": "string",
                            "description": "The ID of the contact in the external system"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the contact"
                          },
                          "latitude": {
                            "type": "number",
                            "description": "The latitude of the contact"
                          },
                          "longitude": {
                            "type": "number",
                            "description": "The longitude of the contact"
                          },
                          "account": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "externalId": {
                                "type": "string",
                                "description": "The ID of the account in the external system."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the account"
                              },
                              "latitude": {
                                "type": "number",
                                "description": "The latitude of the account"
                              },
                              "longitude": {
                                "type": "number",
                                "description": "The longitude of the account"
                              },
                              "addresses": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "country": {
                                      "type": "string"
                                    },
                                    "street": {
                                      "type": "string"
                                    },
                                    "city": {
                                      "type": "string"
                                    },
                                    "state": {
                                      "type": "string"
                                    },
                                    "zip": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "country",
                                    "street",
                                    "city",
                                    "state",
                                    "zip"
                                  ]
                                },
                                "description": "The address(es) associated to the account"
                              },
                              "phoneNumbers": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "The phone number(s) for the account"
                              },
                              "emailAddresses": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "The email address(es) for the account"
                              },
                              "lastActivityAt": {
                                "type": "string",
                                "description": "The datetime of the last activity on this record in the external system"
                              },
                              "deletedAt": {
                                "type": "string",
                                "nullable": true,
                                "format": "date-time",
                                "description": "The datetime when this record was deleted in the external system"
                              },
                              "owner": {
                                "type": "object",
                                "nullable": true,
                                "properties": {
                                  "externalId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "externalId"
                                ],
                                "description": "The owner user of this record in the external system (optional)"
                              },
                              "mergedToExternalId": {
                                "type": "string",
                                "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                              },
                              "mergedFromExternalIds": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                              }
                            },
                            "description": "The associated account for this contact. Note: supplying just an externalId will resolve to an already-synced account"
                          },
                          "addresses": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "country": {
                                  "type": "string"
                                },
                                "street": {
                                  "type": "string"
                                },
                                "city": {
                                  "type": "string"
                                },
                                "state": {
                                  "type": "string"
                                },
                                "zip": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "country",
                                "street",
                                "city",
                                "state",
                                "zip"
                              ]
                            },
                            "description": "The address(es) associated with this contact"
                          },
                          "phoneNumbers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The phone number(s) associated with this contact"
                          },
                          "emailAddresses": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The email address(es) associated with this contact"
                          },
                          "lastActivityAt": {
                            "type": "string",
                            "description": "The datetime of the last activity on this record in the external system"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "format": "date-time",
                            "description": "The datetime when this record was deleted in the external system"
                          },
                          "owner": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "externalId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "externalId"
                            ],
                            "description": "The owner of this record in the external system (optional)"
                          },
                          "mergedToExternalId": {
                            "type": "string",
                            "description": "If this Contact was merged into another, the surviving Contact externalId. Will migrate all existing references from this Contact to the surviving Contact."
                          },
                          "mergedFromExternalIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "If other Contacts were merged into this one, their externalIds. Will migrate all existing references from those Contacts to this Contact."
                          },
                          "isPrimary": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "externalId"
                        ]
                      },
                      "description": "The associated contacts for this opportunity. Note: supplying just an externalId will resolve to an already-synced contact"
                    },
                    "opportunityUsers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "externalId": {
                            "type": "string",
                            "description": "The user's externalId in the external system"
                          },
                          "email": {
                            "type": "string",
                            "description": "The user's email, preferably their email in Siro"
                          },
                          "shareOfSale": {
                            "type": "number",
                            "description": "The user's fractional share of the sale, e.g. 0.5 for 50% or 1 for 100% (Optional)"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user, e.g. John Smith"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "format": "date-time",
                            "description": "The datetime when this record was deleted in the external system (Optional)"
                          }
                        },
                        "required": [
                          "externalId"
                        ]
                      },
                      "description": "The users associated with this opportunity"
                    }
                  },
                  "required": [
                    "externalId"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync a batch of opportunities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string",
                            "description": "The ID of the opportunity in the external system (e.g. Salesforce)"
                          },
                          "name": {
                            "type": "string",
                            "nullable": true,
                            "description": "The name of the opportunity"
                          },
                          "amount": {
                            "type": "number",
                            "description": "The dollar amount of the opportunity"
                          },
                          "closedAt": {
                            "type": "string",
                            "description": "The closure date of the opportunity"
                          },
                          "disposition": {
                            "type": "string",
                            "description": "\"WON\" | \"LOST\" | \"OPEN\""
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "The date the opportunity was created"
                          },
                          "updatedAt": {
                            "type": "string",
                            "description": "The date the opportunity was last updated"
                          },
                          "recordingId": {
                            "type": "string",
                            "description": "The ID of the recording associated to the opportunity"
                          },
                          "accountId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "account": {
                            "nullable": true
                          },
                          "opportunityUsers": {
                            "type": "array",
                            "items": {
                              "nullable": true
                            }
                          }
                        },
                        "required": [
                          "id",
                          "externalId",
                          "createdAt",
                          "updatedAt",
                          "organizationId"
                        ]
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/engagements/{id}": {
      "get": {
        "summary": "Get an engagement",
        "description": "Get an engagement",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get an engagement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string",
                      "description": "The ID of the engagement in the external system (e.g. Salesforce)"
                    },
                    "engagementType": {
                      "type": "string",
                      "description": "The type of the engagement"
                    },
                    "direction": {
                      "type": "string",
                      "description": "\"INBOUND\" | \"OUTBOUND\""
                    },
                    "subject": {
                      "type": "string",
                      "description": "The subject of the engagement"
                    },
                    "content": {
                      "type": "string",
                      "description": "The content of the engagement"
                    },
                    "startTime": {
                      "type": "string",
                      "description": "The start time of the engagement"
                    },
                    "startTimeLocalized": {
                      "type": "string",
                      "description": "Localized dateTime of the engagement, without timezone info"
                    },
                    "endTime": {
                      "type": "string",
                      "description": "The end time of the engagement"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "The date the engagement was created"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "The date the engagement was last updated"
                    },
                    "recordingId": {
                      "type": "string",
                      "description": "The ID of the recording associated to the engagement"
                    },
                    "opportunityId": {
                      "type": "string",
                      "description": "The ID of the opportunity associated to the engagement"
                    },
                    "accountId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "account": {
                      "nullable": true
                    },
                    "engagementUsers": {
                      "type": "array",
                      "items": {
                        "nullable": true
                      }
                    }
                  },
                  "required": [
                    "id",
                    "externalId",
                    "engagementType",
                    "createdAt",
                    "updatedAt",
                    "organizationId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete an engagement",
        "description": "Delete an engagement",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete an engagement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/engagements": {
      "get": {
        "summary": "Get engagements",
        "description": "Get engagements",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "recordingId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "externalId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get engagements",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string",
                            "description": "The ID of the engagement in the external system (e.g. Salesforce)"
                          },
                          "engagementType": {
                            "type": "string",
                            "description": "The type of the engagement"
                          },
                          "direction": {
                            "type": "string",
                            "description": "\"INBOUND\" | \"OUTBOUND\""
                          },
                          "subject": {
                            "type": "string",
                            "description": "The subject of the engagement"
                          },
                          "content": {
                            "type": "string",
                            "description": "The content of the engagement"
                          },
                          "startTime": {
                            "type": "string",
                            "description": "The start time of the engagement"
                          },
                          "startTimeLocalized": {
                            "type": "string",
                            "description": "Localized dateTime of the engagement, without timezone info"
                          },
                          "endTime": {
                            "type": "string",
                            "description": "The end time of the engagement"
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "The date the engagement was created"
                          },
                          "updatedAt": {
                            "type": "string",
                            "description": "The date the engagement was last updated"
                          },
                          "recordingId": {
                            "type": "string",
                            "description": "The ID of the recording associated to the engagement"
                          },
                          "opportunityId": {
                            "type": "string",
                            "description": "The ID of the opportunity associated to the engagement"
                          },
                          "accountId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "account": {
                            "nullable": true
                          },
                          "engagementUsers": {
                            "type": "array",
                            "items": {
                              "nullable": true
                            }
                          }
                        },
                        "required": [
                          "id",
                          "externalId",
                          "engagementType",
                          "createdAt",
                          "updatedAt",
                          "organizationId"
                        ]
                      }
                    },
                    "cursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "nullable": true
                        }
                      ]
                    },
                    "pageSize": {
                      "type": "number"
                    },
                    "limit": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number",
                      "nullable": true
                    },
                    "hasNextPage": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/users/{id}/engagements": {
      "get": {
        "summary": "Get user engagement list",
        "description": "Get ordered engagement list for a specified user",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Deprecated"
            },
            "required": false,
            "description": "Deprecated",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "number"
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "startingAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "startingBefore",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get user engagement list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the engagement in the external system (e.g. Salesforce)"
                      },
                      "engagementType": {
                        "type": "string",
                        "description": "The type of the engagement"
                      },
                      "direction": {
                        "type": "string",
                        "description": "\"INBOUND\" | \"OUTBOUND\""
                      },
                      "subject": {
                        "type": "string",
                        "description": "The subject of the engagement"
                      },
                      "content": {
                        "type": "string",
                        "description": "The content of the engagement"
                      },
                      "startTime": {
                        "type": "string",
                        "description": "The start time of the engagement"
                      },
                      "startTimeLocalized": {
                        "type": "string",
                        "description": "Localized dateTime of the engagement, without timezone info"
                      },
                      "endTime": {
                        "type": "string",
                        "description": "The end time of the engagement"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "The date the engagement was created"
                      },
                      "updatedAt": {
                        "type": "string",
                        "description": "The date the engagement was last updated"
                      },
                      "recordingId": {
                        "type": "string",
                        "description": "The ID of the recording associated to the engagement"
                      },
                      "opportunityId": {
                        "type": "string",
                        "description": "The ID of the opportunity associated to the engagement"
                      },
                      "accountId": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "account": {
                        "nullable": true
                      },
                      "engagementUsers": {
                        "type": "array",
                        "items": {
                          "nullable": true
                        }
                      }
                    },
                    "required": [
                      "id",
                      "externalId",
                      "engagementType",
                      "createdAt",
                      "updatedAt",
                      "organizationId"
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/engagement-users/{id}": {
      "get": {
        "summary": "Get an engagement user",
        "description": "Get an engagement user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get an engagement user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "engagementId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "integrationConnectionId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "engagementId",
                    "userId",
                    "organizationId",
                    "createdAt",
                    "updatedAt",
                    "integrationConnectionId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "Update an engagement user",
        "description": "Update an engagement user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "engagementId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update an engagement user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "engagementId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "integrationConnectionId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "engagementId",
                    "userId",
                    "organizationId",
                    "createdAt",
                    "updatedAt",
                    "integrationConnectionId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Delete an engagement user",
        "description": "Delete an engagement user",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete an engagement user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/engagement-users": {
      "get": {
        "summary": "Get engagement users",
        "description": "Get engagement users",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "engagementId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "userId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get engagement users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "engagementId": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "integrationConnectionId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "engagementId",
                      "userId",
                      "organizationId",
                      "createdAt",
                      "updatedAt",
                      "integrationConnectionId"
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Create an engagement user",
        "description": "Create an engagement user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "engagementId": {
                    "type": "string"
                  },
                  "userId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create an engagement user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "engagementId": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "integrationConnectionId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "engagementId",
                    "userId",
                    "organizationId",
                    "createdAt",
                    "updatedAt",
                    "integrationConnectionId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/sync/engagements": {
      "put": {
        "summary": "Sync an engagement",
        "description": "Sync an engagement",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "description": "The ID of the engagement in the external system"
                  },
                  "direction": {
                    "type": "string",
                    "nullable": true,
                    "enum": [
                      "INBOUND",
                      "OUTBOUND"
                    ],
                    "description": "The direction of the engagement (INBOUND/OUTBOUND)"
                  },
                  "content": {
                    "type": "string",
                    "nullable": true,
                    "description": "The content of the engagement"
                  },
                  "subject": {
                    "type": "string",
                    "nullable": true,
                    "description": "The subject of the engagement"
                  },
                  "startTime": {
                    "type": "string",
                    "nullable": true,
                    "description": "start dateTime of the engagement in UTC."
                  },
                  "startTimeLocalized": {
                    "type": "string",
                    "nullable": true,
                    "description": "Localized dateTime of the engagement, without timezone info. When present, the frontend will display this as-is without timezone conversion, overriding startTime for display purposes."
                  },
                  "endTime": {
                    "type": "string",
                    "nullable": true,
                    "description": "end dateTime of the engagement"
                  },
                  "remoteCreatedAt": {
                    "type": "string",
                    "nullable": true,
                    "description": "external engagement creation datetime"
                  },
                  "remoteUpdatedAt": {
                    "type": "string",
                    "nullable": true,
                    "description": "external engagement update datetime"
                  },
                  "deletedAt": {
                    "type": "string",
                    "nullable": true,
                    "format": "date-time",
                    "description": "The datetime when this record was deleted in the external system"
                  },
                  "engagementTypeId": {
                    "type": "string",
                    "nullable": true,
                    "description": "Internal SIRO engagementTypeId override for this engagement. OPTIONAL -- only use if you know the internal value of the engagement type as it will override the engagementType object args."
                  },
                  "engagementType": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the engagement type in the external system (if applicable)"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the engagementType"
                      },
                      "activityType": {
                        "type": "string",
                        "enum": [
                          "MEETING",
                          "CALL",
                          "APPOINTMENT",
                          "EMAIL",
                          "TEXT",
                          "EVENT",
                          "SIRO_EVENT",
                          "SIRO_BOT_RECORDING"
                        ],
                        "description": "Type of activity. Note: SIRO will only consider certain types as \"Appointments\" for our appointment flows: [MEETING, EVENT, APPOINTMENT]"
                      }
                    },
                    "required": [
                      "name",
                      "activityType"
                    ],
                    "description": "The type of this engagement"
                  },
                  "account": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the account in the external system."
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the account"
                      },
                      "latitude": {
                        "type": "number",
                        "description": "The latitude of the account"
                      },
                      "longitude": {
                        "type": "number",
                        "description": "The longitude of the account"
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "country": {
                              "type": "string"
                            },
                            "street": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string"
                            },
                            "zip": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "country",
                            "street",
                            "city",
                            "state",
                            "zip"
                          ]
                        },
                        "description": "The address(es) associated to the account"
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The phone number(s) for the account"
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The email address(es) for the account"
                      },
                      "lastActivityAt": {
                        "type": "string",
                        "description": "The datetime of the last activity on this record in the external system"
                      },
                      "deletedAt": {
                        "type": "string",
                        "nullable": true,
                        "format": "date-time",
                        "description": "The datetime when this record was deleted in the external system"
                      },
                      "owner": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "externalId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "externalId"
                        ],
                        "description": "The owner user of this record in the external system (optional)"
                      },
                      "mergedToExternalId": {
                        "type": "string",
                        "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                      },
                      "mergedFromExternalIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                      }
                    },
                    "description": "The associated account for this engagement. Note: supplying just an externalId will resolve to an already-synced account"
                  },
                  "engagementUsers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The user's externalId in the external system"
                        },
                        "email": {
                          "type": "string",
                          "description": "The user's email, preferably their email in Siro"
                        },
                        "shareOfSale": {
                          "type": "number",
                          "description": "The user's fractional share of the sale, e.g. 0.5 for 50% or 1 for 100% (Optional)"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the user, e.g. John Smith"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system (Optional)"
                        }
                      },
                      "required": [
                        "externalId"
                      ]
                    },
                    "description": "The users associated with this engagement"
                  },
                  "opportunity": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the opportunity in the external system"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the opportunity"
                      },
                      "amount": {
                        "type": "number",
                        "description": "The dollar amount of the opportunity"
                      },
                      "closedAt": {
                        "type": "string",
                        "description": "The closure date of the opportunity"
                      },
                      "remoteCreatedAt": {
                        "type": "string",
                        "description": "The datetime the opportunity was created in the external system"
                      },
                      "lastActivityAt": {
                        "type": "string",
                        "description": "The datetime of the last activity on this opportunity"
                      },
                      "disposition": {
                        "type": "string",
                        "enum": [
                          "OPEN",
                          "LOST",
                          "WON"
                        ],
                        "description": "The disposition of the opportunity (WON, LOST, or OPEN)"
                      },
                      "copyEngagementRelationships": {
                        "type": "boolean",
                        "description": "When true, copies the available engagement relationships (contact, account, users)"
                      }
                    },
                    "required": [
                      "externalId"
                    ],
                    "description": "The associated opportunity for this engagement. Note: supplying just an externalId will resolve to an already-synced opportunity"
                  },
                  "lead": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the lead in the external system"
                      },
                      "firstName": {
                        "type": "string",
                        "description": "The first name of the lead"
                      },
                      "lastName": {
                        "type": "string",
                        "description": "The last name of the lead"
                      },
                      "latitude": {
                        "type": "number",
                        "description": "The latitude of the lead"
                      },
                      "longitude": {
                        "type": "number",
                        "description": "The longitude of the lead"
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "country": {
                              "type": "string"
                            },
                            "street": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string"
                            },
                            "zip": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "country",
                            "street",
                            "city",
                            "state",
                            "zip"
                          ]
                        },
                        "description": "The address(es) associated with this lead"
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The phone number(s) associated with this lead"
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The email address(es) associated with this lead"
                      },
                      "lastActivityAt": {
                        "type": "string",
                        "description": "The datetime of the last activity on this record in the external system"
                      },
                      "deletedAt": {
                        "type": "string",
                        "nullable": true,
                        "format": "date-time",
                        "description": "The datetime when this record was deleted in the external system"
                      },
                      "owner": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "externalId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "externalId"
                        ],
                        "description": "The owner of this record in the external system (optional)"
                      },
                      "mergedToExternalId": {
                        "type": "string",
                        "description": "If this Lead was merged into another, the surviving Lead externalId. Will migrate all existing references from this Lead to the surviving Lead."
                      },
                      "mergedFromExternalIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "If other Leads were merged into this one, their externalIds. Will migrate all existing references from those Leads to this Lead."
                      }
                    },
                    "required": [
                      "externalId"
                    ],
                    "description": "The associated lead for this engagement"
                  },
                  "contact": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "externalId": {
                        "type": "string",
                        "description": "The ID of the contact in the external system"
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the contact"
                      },
                      "latitude": {
                        "type": "number",
                        "description": "The latitude of the contact"
                      },
                      "longitude": {
                        "type": "number",
                        "description": "The longitude of the contact"
                      },
                      "account": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "externalId": {
                            "type": "string",
                            "description": "The ID of the account in the external system."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the account"
                          },
                          "latitude": {
                            "type": "number",
                            "description": "The latitude of the account"
                          },
                          "longitude": {
                            "type": "number",
                            "description": "The longitude of the account"
                          },
                          "addresses": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "country": {
                                  "type": "string"
                                },
                                "street": {
                                  "type": "string"
                                },
                                "city": {
                                  "type": "string"
                                },
                                "state": {
                                  "type": "string"
                                },
                                "zip": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "country",
                                "street",
                                "city",
                                "state",
                                "zip"
                              ]
                            },
                            "description": "The address(es) associated to the account"
                          },
                          "phoneNumbers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The phone number(s) for the account"
                          },
                          "emailAddresses": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The email address(es) for the account"
                          },
                          "lastActivityAt": {
                            "type": "string",
                            "description": "The datetime of the last activity on this record in the external system"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "format": "date-time",
                            "description": "The datetime when this record was deleted in the external system"
                          },
                          "owner": {
                            "type": "object",
                            "nullable": true,
                            "properties": {
                              "externalId": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "externalId"
                            ],
                            "description": "The owner user of this record in the external system (optional)"
                          },
                          "mergedToExternalId": {
                            "type": "string",
                            "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                          },
                          "mergedFromExternalIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                          }
                        },
                        "description": "The associated account for this contact. Note: supplying just an externalId will resolve to an already-synced account"
                      },
                      "addresses": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "country": {
                              "type": "string"
                            },
                            "street": {
                              "type": "string"
                            },
                            "city": {
                              "type": "string"
                            },
                            "state": {
                              "type": "string"
                            },
                            "zip": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "country",
                            "street",
                            "city",
                            "state",
                            "zip"
                          ]
                        },
                        "description": "The address(es) associated with this contact"
                      },
                      "phoneNumbers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The phone number(s) associated with this contact"
                      },
                      "emailAddresses": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The email address(es) associated with this contact"
                      },
                      "lastActivityAt": {
                        "type": "string",
                        "description": "The datetime of the last activity on this record in the external system"
                      },
                      "deletedAt": {
                        "type": "string",
                        "nullable": true,
                        "format": "date-time",
                        "description": "The datetime when this record was deleted in the external system"
                      },
                      "owner": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "externalId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "externalId"
                        ],
                        "description": "The owner of this record in the external system (optional)"
                      },
                      "mergedToExternalId": {
                        "type": "string",
                        "description": "If this Contact was merged into another, the surviving Contact externalId. Will migrate all existing references from this Contact to the surviving Contact."
                      },
                      "mergedFromExternalIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "If other Contacts were merged into this one, their externalIds. Will migrate all existing references from those Contacts to this Contact."
                      }
                    },
                    "required": [
                      "externalId"
                    ],
                    "description": "The associated contact for this engagement. Note: supplying just an externalId will resolve to an already-synced contact"
                  }
                },
                "required": [
                  "externalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync an engagement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the engagement in the external system (e.g. Salesforce)"
                        },
                        "engagementType": {
                          "type": "string",
                          "description": "The type of the engagement"
                        },
                        "direction": {
                          "type": "string",
                          "description": "\"INBOUND\" | \"OUTBOUND\""
                        },
                        "subject": {
                          "type": "string",
                          "description": "The subject of the engagement"
                        },
                        "content": {
                          "type": "string",
                          "description": "The content of the engagement"
                        },
                        "startTime": {
                          "type": "string",
                          "description": "The start time of the engagement"
                        },
                        "startTimeLocalized": {
                          "type": "string",
                          "description": "Localized dateTime of the engagement, without timezone info"
                        },
                        "endTime": {
                          "type": "string",
                          "description": "The end time of the engagement"
                        },
                        "createdAt": {
                          "type": "string",
                          "description": "The date the engagement was created"
                        },
                        "updatedAt": {
                          "type": "string",
                          "description": "The date the engagement was last updated"
                        },
                        "recordingId": {
                          "type": "string",
                          "description": "The ID of the recording associated to the engagement"
                        },
                        "opportunityId": {
                          "type": "string",
                          "description": "The ID of the opportunity associated to the engagement"
                        },
                        "accountId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "account": {
                          "nullable": true
                        },
                        "engagementUsers": {
                          "type": "array",
                          "items": {
                            "nullable": true
                          }
                        }
                      },
                      "required": [
                        "id",
                        "externalId",
                        "engagementType",
                        "createdAt",
                        "updatedAt",
                        "organizationId"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/sync/engagements/soft-delete-removed": {
      "post": {
        "summary": "Soft-delete engagements removed upstream within a window",
        "description": "Given an exhaustive set of engagement externalIds for a startTime window, soft-delete any engagements on this connection in that window that are not in the set.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "validExternalIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Exhaustive set of engagement externalIds currently present upstream for this window. Any engagement on this connection whose startTime falls in [fromTime, toTime] but is NOT in this list will be soft-deleted."
                  },
                  "fromTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Inclusive lower bound on engagement.startTime."
                  },
                  "toTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Inclusive upper bound on engagement.startTime."
                  }
                },
                "required": [
                  "validExternalIds",
                  "fromTime",
                  "toTime"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Soft-delete engagements removed upstream within a window",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "success"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/sync/batch/engagements": {
      "put": {
        "summary": "Sync a batch of engagements",
        "description": "Sync a batch of engagements",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "externalId": {
                      "type": "string",
                      "description": "The ID of the engagement in the external system"
                    },
                    "direction": {
                      "type": "string",
                      "nullable": true,
                      "enum": [
                        "INBOUND",
                        "OUTBOUND"
                      ],
                      "description": "The direction of the engagement (INBOUND/OUTBOUND)"
                    },
                    "content": {
                      "type": "string",
                      "nullable": true,
                      "description": "The content of the engagement"
                    },
                    "subject": {
                      "type": "string",
                      "nullable": true,
                      "description": "The subject of the engagement"
                    },
                    "startTime": {
                      "type": "string",
                      "nullable": true,
                      "description": "start dateTime of the engagement in UTC."
                    },
                    "startTimeLocalized": {
                      "type": "string",
                      "nullable": true,
                      "description": "Localized dateTime of the engagement, without timezone info. When present, the frontend will display this as-is without timezone conversion, overriding startTime for display purposes."
                    },
                    "endTime": {
                      "type": "string",
                      "nullable": true,
                      "description": "end dateTime of the engagement"
                    },
                    "remoteCreatedAt": {
                      "type": "string",
                      "nullable": true,
                      "description": "external engagement creation datetime"
                    },
                    "remoteUpdatedAt": {
                      "type": "string",
                      "nullable": true,
                      "description": "external engagement update datetime"
                    },
                    "deletedAt": {
                      "type": "string",
                      "nullable": true,
                      "format": "date-time",
                      "description": "The datetime when this record was deleted in the external system"
                    },
                    "engagementTypeId": {
                      "type": "string",
                      "nullable": true,
                      "description": "Internal SIRO engagementTypeId override for this engagement. OPTIONAL -- only use if you know the internal value of the engagement type as it will override the engagementType object args."
                    },
                    "engagementType": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the engagement type in the external system (if applicable)"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the engagementType"
                        },
                        "activityType": {
                          "type": "string",
                          "enum": [
                            "MEETING",
                            "CALL",
                            "APPOINTMENT",
                            "EMAIL",
                            "TEXT",
                            "EVENT",
                            "SIRO_EVENT",
                            "SIRO_BOT_RECORDING"
                          ],
                          "description": "Type of activity. Note: SIRO will only consider certain types as \"Appointments\" for our appointment flows: [MEETING, EVENT, APPOINTMENT]"
                        }
                      },
                      "required": [
                        "name",
                        "activityType"
                      ],
                      "description": "The type of this engagement"
                    },
                    "account": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the account in the external system."
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the account"
                        },
                        "latitude": {
                          "type": "number",
                          "description": "The latitude of the account"
                        },
                        "longitude": {
                          "type": "number",
                          "description": "The longitude of the account"
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "country": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "country",
                              "street",
                              "city",
                              "state",
                              "zip"
                            ]
                          },
                          "description": "The address(es) associated to the account"
                        },
                        "phoneNumbers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The phone number(s) for the account"
                        },
                        "emailAddresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The email address(es) for the account"
                        },
                        "lastActivityAt": {
                          "type": "string",
                          "description": "The datetime of the last activity on this record in the external system"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system"
                        },
                        "owner": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "externalId"
                          ],
                          "description": "The owner user of this record in the external system (optional)"
                        },
                        "mergedToExternalId": {
                          "type": "string",
                          "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                        },
                        "mergedFromExternalIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                        }
                      },
                      "description": "The associated account for this engagement. Note: supplying just an externalId will resolve to an already-synced account"
                    },
                    "engagementUsers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "externalId": {
                            "type": "string",
                            "description": "The user's externalId in the external system"
                          },
                          "email": {
                            "type": "string",
                            "description": "The user's email, preferably their email in Siro"
                          },
                          "shareOfSale": {
                            "type": "number",
                            "description": "The user's fractional share of the sale, e.g. 0.5 for 50% or 1 for 100% (Optional)"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the user, e.g. John Smith"
                          },
                          "deletedAt": {
                            "type": "string",
                            "nullable": true,
                            "format": "date-time",
                            "description": "The datetime when this record was deleted in the external system (Optional)"
                          }
                        },
                        "required": [
                          "externalId"
                        ]
                      },
                      "description": "The users associated with this engagement"
                    },
                    "opportunity": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the opportunity in the external system"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the opportunity"
                        },
                        "amount": {
                          "type": "number",
                          "description": "The dollar amount of the opportunity"
                        },
                        "closedAt": {
                          "type": "string",
                          "description": "The closure date of the opportunity"
                        },
                        "remoteCreatedAt": {
                          "type": "string",
                          "description": "The datetime the opportunity was created in the external system"
                        },
                        "lastActivityAt": {
                          "type": "string",
                          "description": "The datetime of the last activity on this opportunity"
                        },
                        "disposition": {
                          "type": "string",
                          "enum": [
                            "OPEN",
                            "LOST",
                            "WON"
                          ],
                          "description": "The disposition of the opportunity (WON, LOST, or OPEN)"
                        },
                        "copyEngagementRelationships": {
                          "type": "boolean",
                          "description": "When true, copies the available engagement relationships (contact, account, users)"
                        }
                      },
                      "required": [
                        "externalId"
                      ],
                      "description": "The associated opportunity for this engagement. Note: supplying just an externalId will resolve to an already-synced opportunity"
                    },
                    "lead": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the lead in the external system"
                        },
                        "firstName": {
                          "type": "string",
                          "description": "The first name of the lead"
                        },
                        "lastName": {
                          "type": "string",
                          "description": "The last name of the lead"
                        },
                        "latitude": {
                          "type": "number",
                          "description": "The latitude of the lead"
                        },
                        "longitude": {
                          "type": "number",
                          "description": "The longitude of the lead"
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "country": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "country",
                              "street",
                              "city",
                              "state",
                              "zip"
                            ]
                          },
                          "description": "The address(es) associated with this lead"
                        },
                        "phoneNumbers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The phone number(s) associated with this lead"
                        },
                        "emailAddresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The email address(es) associated with this lead"
                        },
                        "lastActivityAt": {
                          "type": "string",
                          "description": "The datetime of the last activity on this record in the external system"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system"
                        },
                        "owner": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "externalId"
                          ],
                          "description": "The owner of this record in the external system (optional)"
                        },
                        "mergedToExternalId": {
                          "type": "string",
                          "description": "If this Lead was merged into another, the surviving Lead externalId. Will migrate all existing references from this Lead to the surviving Lead."
                        },
                        "mergedFromExternalIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "If other Leads were merged into this one, their externalIds. Will migrate all existing references from those Leads to this Lead."
                        }
                      },
                      "required": [
                        "externalId"
                      ],
                      "description": "The associated lead for this engagement"
                    },
                    "contact": {
                      "type": "object",
                      "nullable": true,
                      "properties": {
                        "externalId": {
                          "type": "string",
                          "description": "The ID of the contact in the external system"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the contact"
                        },
                        "latitude": {
                          "type": "number",
                          "description": "The latitude of the contact"
                        },
                        "longitude": {
                          "type": "number",
                          "description": "The longitude of the contact"
                        },
                        "account": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string",
                              "description": "The ID of the account in the external system."
                            },
                            "name": {
                              "type": "string",
                              "description": "The name of the account"
                            },
                            "latitude": {
                              "type": "number",
                              "description": "The latitude of the account"
                            },
                            "longitude": {
                              "type": "number",
                              "description": "The longitude of the account"
                            },
                            "addresses": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "country": {
                                    "type": "string"
                                  },
                                  "street": {
                                    "type": "string"
                                  },
                                  "city": {
                                    "type": "string"
                                  },
                                  "state": {
                                    "type": "string"
                                  },
                                  "zip": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "country",
                                  "street",
                                  "city",
                                  "state",
                                  "zip"
                                ]
                              },
                              "description": "The address(es) associated to the account"
                            },
                            "phoneNumbers": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "The phone number(s) for the account"
                            },
                            "emailAddresses": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "The email address(es) for the account"
                            },
                            "lastActivityAt": {
                              "type": "string",
                              "description": "The datetime of the last activity on this record in the external system"
                            },
                            "deletedAt": {
                              "type": "string",
                              "nullable": true,
                              "format": "date-time",
                              "description": "The datetime when this record was deleted in the external system"
                            },
                            "owner": {
                              "type": "object",
                              "nullable": true,
                              "properties": {
                                "externalId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "externalId"
                              ],
                              "description": "The owner user of this record in the external system (optional)"
                            },
                            "mergedToExternalId": {
                              "type": "string",
                              "description": "If this Account was merged into another, the surviving Account externalId. Will migrate all existing references from this Account to the surviving Account."
                            },
                            "mergedFromExternalIds": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "If other Accounts were merged into this one, their externalIds. Will migrate all existing references from those Accounts to this Account."
                            }
                          },
                          "description": "The associated account for this contact. Note: supplying just an externalId will resolve to an already-synced account"
                        },
                        "addresses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "country": {
                                "type": "string"
                              },
                              "street": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "state": {
                                "type": "string"
                              },
                              "zip": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "country",
                              "street",
                              "city",
                              "state",
                              "zip"
                            ]
                          },
                          "description": "The address(es) associated with this contact"
                        },
                        "phoneNumbers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The phone number(s) associated with this contact"
                        },
                        "emailAddresses": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The email address(es) associated with this contact"
                        },
                        "lastActivityAt": {
                          "type": "string",
                          "description": "The datetime of the last activity on this record in the external system"
                        },
                        "deletedAt": {
                          "type": "string",
                          "nullable": true,
                          "format": "date-time",
                          "description": "The datetime when this record was deleted in the external system"
                        },
                        "owner": {
                          "type": "object",
                          "nullable": true,
                          "properties": {
                            "externalId": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "externalId"
                          ],
                          "description": "The owner of this record in the external system (optional)"
                        },
                        "mergedToExternalId": {
                          "type": "string",
                          "description": "If this Contact was merged into another, the surviving Contact externalId. Will migrate all existing references from this Contact to the surviving Contact."
                        },
                        "mergedFromExternalIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "If other Contacts were merged into this one, their externalIds. Will migrate all existing references from those Contacts to this Contact."
                        }
                      },
                      "required": [
                        "externalId"
                      ],
                      "description": "The associated contact for this engagement. Note: supplying just an externalId will resolve to an already-synced contact"
                    }
                  },
                  "required": [
                    "externalId"
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync a batch of engagements",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string",
                            "description": "The ID of the engagement in the external system (e.g. Salesforce)"
                          },
                          "engagementType": {
                            "type": "string",
                            "description": "The type of the engagement"
                          },
                          "direction": {
                            "type": "string",
                            "description": "\"INBOUND\" | \"OUTBOUND\""
                          },
                          "subject": {
                            "type": "string",
                            "description": "The subject of the engagement"
                          },
                          "content": {
                            "type": "string",
                            "description": "The content of the engagement"
                          },
                          "startTime": {
                            "type": "string",
                            "description": "The start time of the engagement"
                          },
                          "startTimeLocalized": {
                            "type": "string",
                            "description": "Localized dateTime of the engagement, without timezone info"
                          },
                          "endTime": {
                            "type": "string",
                            "description": "The end time of the engagement"
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "The date the engagement was created"
                          },
                          "updatedAt": {
                            "type": "string",
                            "description": "The date the engagement was last updated"
                          },
                          "recordingId": {
                            "type": "string",
                            "description": "The ID of the recording associated to the engagement"
                          },
                          "opportunityId": {
                            "type": "string",
                            "description": "The ID of the opportunity associated to the engagement"
                          },
                          "accountId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "account": {
                            "nullable": true
                          },
                          "engagementUsers": {
                            "type": "array",
                            "items": {
                              "nullable": true
                            }
                          }
                        },
                        "required": [
                          "id",
                          "externalId",
                          "engagementType",
                          "createdAt",
                          "updatedAt",
                          "organizationId"
                        ]
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/integrations/briefs": {
      "put": {
        "summary": "Create a brief",
        "description": "Create a brief",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string"
                  },
                  "jobId": {
                    "type": "string"
                  },
                  "appointmentId": {
                    "type": "string"
                  },
                  "tenantId": {
                    "type": "string"
                  },
                  "technicianId": {
                    "type": "string"
                  },
                  "audioUrl": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "externalId",
                  "jobId",
                  "appointmentId",
                  "tenantId",
                  "technicianId",
                  "audioUrl",
                  "message"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create a brief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "siroId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "siroId"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/audit/logs": {
      "get": {
        "summary": "Get audit logs",
        "description": "Get audit logs for an organization.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Opaque cursor token for pagination."
            },
            "required": false,
            "description": "Opaque cursor token for pagination.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 100,
              "default": 25,
              "description": "Number of results to return per page."
            },
            "required": false,
            "description": "Number of results to return per page.",
            "name": "pageSize",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Get audit logs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "tokenId": {
                        "type": "string"
                      },
                      "endpoint": {
                        "type": "string"
                      },
                      "method": {
                        "type": "string"
                      },
                      "ts": {
                        "type": "number"
                      },
                      "body": {
                        "type": "object",
                        "properties": {}
                      },
                      "userId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "organizationId",
                      "tokenId",
                      "endpoint",
                      "method",
                      "ts",
                      "body"
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://functions.siro.ai/api-externalApi",
      "description": "Siro API external API endpoint"
    }
  ]
}