{ "openapi": "3.1.0", "info": { "title": "OpenInt OpenAPI", "version": "0.0.0" }, "servers": [ { "url": "https://openint.dev/api/v0" } ], "paths": { "/health": { "get": { "operationId": "health", "summary": "Health check", "tags": ["Internal"], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/debug/raw-schemas": { "get": { "operationId": "getRawSchemas", "description": "Get raw schemas", "tags": ["Internal"], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/connect/token": { "post": { "operationId": "createConnectToken", "tags": ["Connect"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "endUserId": { "type": "string", "minLength": 1, "description": "Anything that uniquely identifies the end user that you will be sending the magic link to" }, "validityInSeconds": { "type": "number", "default": 2592000, "description": "How long the magic link will be valid for (in seconds) before it expires" } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string" } }, "required": ["token"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/connect/magic-link": { "post": { "operationId": "createMagicLink", "tags": ["Connect"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "endUserId": { "type": "string", "minLength": 1, "description": "Anything that uniquely identifies the end user that you will be sending the magic link to" }, "validityInSeconds": { "type": "number", "default": 2592000, "description": "How long the magic link will be valid for (in seconds) before it expires" }, "displayName": { "type": ["string", "null"], "description": "What to call user by" }, "redirectUrl": { "type": ["string", "null"], "description": "Where to send user to after connect / if they press back button" }, "connectorName": { "type": ["string", "null"], "description": "Filter connector config by connector name" }, "connectorConfigDisplayName": { "type": ["string", "null"], "description": "Filter connector config by displayName " }, "connectorConfigId": { "type": "string", "description": "Must start with 'ccfg_'" }, "showExisting": { "type": "boolean", "default": true } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string" } }, "required": ["url"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/passthrough": { "post": { "operationId": "passthrough", "tags": ["Internal"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "method": { "type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"] }, "path": { "type": "string" }, "query": { "type": "object", "additionalProperties": {} }, "headers": { "type": "object", "additionalProperties": {} }, "body": { "type": "object", "additionalProperties": {} } }, "required": ["method", "path"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/resource/{id}/source_sync": { "post": { "operationId": "sourceSync", "description": "Return records that would have otherwise been emitted during a sync and return it instead", "tags": ["Internal"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'reso_'" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "state": { "type": "object", "additionalProperties": {} }, "streams": { "type": "object", "additionalProperties": { "type": "boolean" } } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/resource": { "post": { "operationId": "createResource", "tags": ["Core"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "connectorConfigId": { "type": "string", "description": "Must start with 'ccfg_'" }, "settings": { "type": ["object", "null"], "additionalProperties": {} }, "displayName": { "type": ["string", "null"] }, "endUserId": { "type": ["string", "null"], "minLength": 1 }, "disabled": { "type": "boolean" }, "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" }, "integrationId": { "type": ["string", "null"], "description": "Must start with 'int_'" } }, "required": ["connectorConfigId"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "get": { "operationId": "listResources", "tags": ["Core"], "parameters": [ { "in": "query", "name": "limit", "schema": { "type": "number" } }, { "in": "query", "name": "offset", "schema": { "type": "number" } }, { "in": "query", "name": "endUserId", "schema": { "type": ["string", "null"], "minLength": 1 } }, { "in": "query", "name": "connectorConfigId", "schema": { "type": ["string", "null"], "description": "Must start with 'ccfg_'" } }, { "in": "query", "name": "connectorName", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "forceRefresh", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Resource" } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/resource/{id}": { "patch": { "operationId": "updateResource", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'reso_'" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "settings": { "type": ["object", "null"], "additionalProperties": {} }, "displayName": { "type": ["string", "null"] }, "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" }, "disabled": { "type": "boolean" }, "endUserId": { "type": ["string", "null"], "minLength": 1 }, "integrationId": { "type": ["string", "null"], "description": "Must start with 'int_'" } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Resource" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "delete": { "operationId": "deleteResource", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'reso_'" }, "required": true }, { "in": "query", "name": "skipRevoke", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "get": { "operationId": "getResource", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'reso_'" }, "required": true }, { "in": "query", "name": "forceRefresh", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Resource" } ], "type": "object", "properties": { "connector_config": { "type": "object", "properties": { "id": { "type": "string", "description": "Must start with 'ccfg_'" }, "orgId": { "type": "string", "description": "Must start with 'org_'" }, "connectorName": { "type": "string" } }, "required": ["id", "orgId", "connectorName"] } }, "required": ["connector_config"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/resource/{id}/_check": { "post": { "operationId": "checkResource", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'reso_'" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "skipCache": { "type": ["boolean", "null"] }, "import": { "type": ["boolean", "null"] }, "updateWebhook": { "type": ["boolean", "null"] }, "sandboxSimulateUpdate": { "type": ["boolean", "null"] }, "sandboxSimulateDisconnect": { "type": ["boolean", "null"] } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/resource/{id}/_sync": { "post": { "operationId": "syncResource", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'reso_'" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "async": { "type": ["boolean", "null"], "description": "Run sync in the background, not compatible with other options for now..." }, "metaOnly": { "type": ["boolean", "null"], "description": "Only sync resource metadata and skip pipelines " }, "fullResync": { "type": ["boolean", "null"], "description": "Remove `state` of pipeline and trigger a full resync" }, "todo_upstreamRefresh": { "type": ["boolean", "null"], "description": "\n Triggers provider to refresh data from its source\n https://plaid.com/docs/api/products/transactions/#transactionsrefresh\n This may also load historical transactions. For example,\n Finicity treats historical transaction as premium service.\n " }, "todo_removeUnsyncedData": { "type": ["boolean", "null"], "description": "\n See coda's implmementation. Requires adding a new message to the sync protocol\n to remove all data from a particular source_id" } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/connector_config": { "get": { "operationId": "adminListConnectorConfigs", "tags": ["Core"], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectorConfig" } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "adminUpsertConnectorConfig", "tags": ["Core"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Must start with 'ccfg_'" }, "connectorName": { "type": "string" }, "orgId": { "type": "string", "description": "Must start with 'org_'" }, "config": { "type": ["object", "null"], "additionalProperties": {} }, "displayName": { "type": ["string", "null"] }, "defaultPipeOut": { "type": ["object", "null"], "properties": { "streams": { "type": ["object", "null"], "additionalProperties": { "type": "boolean" } }, "links": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/Link" }, "description": "Array of transformations that the data gets piped through on the way out. Typically used for things like unification / normalization." }, "destination_id": { "type": "string", "description": "Defaults to the org-wide postgres" } }, "description": "Automatically sync data from any resources associated with this config to the destination resource, which is typically a Postgres database. Think ETL" }, "defaultPipeIn": { "type": ["object", "null"], "properties": { "links": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/Link" }, "description": "Array of transformations that the data gets piped through on the way out. Typically used for things like unification / normalization." }, "source_id": { "type": "string", "description": "Must start with 'reso_'" } }, "required": ["source_id"], "description": "Automatically sync data from any resources associated with this config to the destination resource, which is typically a Postgres database. Think ETL" }, "disabled": { "type": "boolean", "title": "Disabled", "description": "When disabled it will not be used for connection portal. Essentially a reversible soft-delete" } }, "required": ["orgId"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorConfig" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/connector_config/{id}": { "patch": { "operationId": "adminUpdateConnectorConfig", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'ccfg_'" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" }, "displayName": { "type": ["string", "null"] }, "disabled": { "type": "boolean", "title": "Disabled", "description": "When disabled it will not be used for connection portal. Essentially a reversible soft-delete" } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorConfig" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "delete": { "operationId": "adminDeleteConnectorConfig", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'ccfg_'" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "get": { "operationId": "adminGetConnectorConfig", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'ccfg_'" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConnectorConfig" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/connector_config_info": { "get": { "operationId": "listConnectorConfigInfos", "description": "For end user authentication and list a limited set of non private data", "tags": ["Core"], "parameters": [ { "in": "query", "name": "type", "schema": { "type": ["string", "null"], "enum": ["source", "destination"] } }, { "in": "query", "name": "id", "schema": { "type": ["string", "null"], "description": "Must start with 'ccfg_'" } }, { "in": "query", "name": "connectorName", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Must start with 'ccfg_'" }, "envName": { "type": ["string", "null"] }, "displayName": { "type": ["string", "null"] }, "connectorName": { "type": "string" }, "isSource": { "type": "boolean" }, "isDestination": { "type": "boolean" }, "verticals": { "type": "array", "items": { "type": "string", "enum": [ "banking", "accounting", "crm", "sales-engagement", "engagement", "commerce", "expense-management", "enrichment", "database", "flat-files-and-spreadsheets", "file-storage", "streaming", "personal-finance", "other", "hris", "payroll", "calendar", "ats", "email" ] } } }, "required": [ "id", "connectorName", "isSource", "isDestination", "verticals" ] } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/connector": { "get": { "operationId": "listConnectorMetas", "description": "Get catalog of all available connectors", "tags": ["Connectors"], "parameters": [ { "in": "query", "name": "includeOas", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/connector/{name}": { "get": { "operationId": "getConnectorMeta", "tags": ["Connectors"], "parameters": [ { "in": "path", "name": "name", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "includeOas", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/connector/{name}/oas": { "get": { "operationId": "getConnectorOpenApiSpec", "tags": ["Connectors"], "parameters": [ { "in": "path", "name": "name", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "original", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/connector/{name}/schemas": { "get": { "operationId": "getConnectorSchemas", "tags": ["Connectors"], "parameters": [ { "in": "path", "name": "name", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "type", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/connector/{name}/integrations": { "get": { "operationId": "listConnectorIntegrations", "tags": ["Connectors"], "parameters": [ { "in": "path", "name": "name", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } }, { "in": "query", "name": "search_text", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/core.integration" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/configured_integrations": { "get": { "operationId": "listConfiguredIntegrations", "tags": ["Connectors"], "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } }, { "in": "query", "name": "search_text", "schema": { "type": "string" } }, { "in": "query", "name": "connector_config_ids", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/core.configured_integration" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/pipeline": { "get": { "operationId": "listPipelines", "tags": ["Core"], "parameters": [ { "in": "query", "name": "limit", "schema": { "type": "number" } }, { "in": "query", "name": "offset", "schema": { "type": "number" } }, { "in": "query", "name": "resourceIds", "schema": { "type": "array", "items": { "type": "string", "description": "Must start with 'reso_'" } } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Pipeline" } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "createPipeline", "tags": ["Core"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Must start with 'pipe_'" }, "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" }, "disabled": { "type": "boolean" }, "sourceId": { "type": "string", "description": "Must start with 'reso_'" }, "streams": { "type": ["object", "null"], "additionalProperties": { "type": "object", "properties": { "disabled": { "type": "boolean" }, "fields": { "type": "array", "items": { "type": "string" } } } } }, "destinationId": { "type": "string", "description": "Must start with 'reso_'" } }, "required": ["id"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pipeline" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/pipeline/{id}": { "patch": { "operationId": "updatePipeline", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'pipe_'" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" }, "disabled": { "type": "boolean" }, "streams": { "type": ["object", "null"], "additionalProperties": { "type": "object", "properties": { "disabled": { "type": "boolean" }, "fields": { "type": "array", "items": { "type": "string" } } } } } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pipeline" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "delete": { "operationId": "deletePipeline", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'pipe_'" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean", "enum": [true] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/pipeline/{id}/_sync": { "post": { "operationId": "syncPipeline", "tags": ["Core"], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Must start with 'pipe_'" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "async": { "type": ["boolean", "null"], "description": "Run sync in the background, not compatible with other options for now..." }, "metaOnly": { "type": ["boolean", "null"], "description": "Only sync resource metadata and skip pipelines " }, "fullResync": { "type": ["boolean", "null"], "description": "Remove `state` of pipeline and trigger a full resync" }, "todo_upstreamRefresh": { "type": ["boolean", "null"], "description": "\n Triggers provider to refresh data from its source\n https://plaid.com/docs/api/products/transactions/#transactionsrefresh\n This may also load historical transactions. For example,\n Finicity treats historical transaction as premium service.\n " }, "todo_removeUnsyncedData": { "type": ["boolean", "null"], "description": "\n See coda's implmementation. Requires adding a new message to the sync protocol\n to remove all data from a particular source_id" } } } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/core/sync_run": { "get": { "operationId": "listSyncRuns", "tags": ["Core"], "parameters": [ { "in": "query", "name": "limit", "schema": { "type": "number" } }, { "in": "query", "name": "offset", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/viewer": { "get": { "operationId": "getViewer", "summary": "Get current viewer accessing the API", "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Viewer" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/viewer/organization": { "get": { "operationId": "getCurrentOrganization", "summary": "Get current organization of viewer accessing the API", "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Must start with 'org_'" }, "slug": { "type": ["string", "null"] }, "publicMetadata": { "type": "object", "properties": { "database_url": { "type": "string", "title": "PostgreSQL Database URL", "description": "This is where data from resources are synced to by default", "example": "postgres://username:password@host:port/database" }, "synced_data_schema": { "type": "string", "title": "Synced Data Schema", "description": "Postgres schema to pipe data synced from end user resources into. Defaults to \"synced\" if missing." }, "webhook_url": { "type": "string", "title": "Webhook URL", "description": "Events like sync.completed and connection.created can be sent to url of your choosing" }, "migrate_tables": { "type": "boolean", "title": "Migrate Tables", "description": "If enabled, table migrations will be run if needed when entities are persisted", "default": true } } } }, "required": ["id", "publicMetadata"] } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/openapi.json": { "get": { "operationId": "public-getOpenapiDocument", "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/contact": { "get": { "operationId": "salesEngagement-listContacts", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_page_cursor": { "type": ["string", "null"] }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.contact" } } }, "required": ["items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/sequence": { "get": { "operationId": "salesEngagement-listSequences", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_page_cursor": { "type": ["string", "null"] }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.sequence" } } }, "required": ["items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/sequence_state": { "get": { "operationId": "salesEngagement-listSequenceStates", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_page_cursor": { "type": ["string", "null"] }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.sequenceState" } } }, "required": ["items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "salesEngagement-insertSequenceState", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "type": "object", "properties": { "contact_id": { "type": "string", "example": "9f3e97fd-4d5d-4efc-959d-bbebfac079f5" }, "mailbox_id": { "type": "string", "example": "ae4be028-9078-4850-a0bf-d2112b7c4d11" }, "sequence_id": { "type": "string", "example": "b854e510-1c40-4ef6-ade4-8eb35f49d331" }, "user_id": { "type": ["string", "null"], "example": "c590dc63-8e43-48a4-8154-1fbb00ac936b" } }, "required": ["contact_id", "mailbox_id", "sequence_id"] } }, "required": ["record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] } } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/user": { "get": { "operationId": "salesEngagement-listUsers", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_page_cursor": { "type": ["string", "null"] }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.user" } } }, "required": ["items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/account": { "get": { "operationId": "salesEngagement-listAccounts", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_page_cursor": { "type": ["string", "null"] }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.account" } } }, "required": ["items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/mailbox": { "get": { "operationId": "salesEngagement-listMailboxes", "parameters": [ { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_page_cursor": { "type": ["string", "null"] }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.mailbox" } } }, "required": ["items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/account/_upsert": { "post": { "operationId": "salesEngagement-upsertAccount", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "type": "object", "properties": { "name": { "type": ["string", "null"], "example": "My Company" }, "domain": { "type": ["string", "null"], "example": "mycompany.com" }, "owner_id": { "type": ["string", "null"], "example": "9f3e97fd-4d5d-4efc-959d-bbebfac079f5" }, "account_id": { "type": ["string", "null"], "example": "ae4be028-9078-4850-a0bf-d2112b7c4d11" }, "custom_fields": { "type": ["object", "null"], "additionalProperties": {} } } }, "upsert_on": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the account to upsert on. Supported for Outreach, Salesloft, and Apollo." }, "domain": { "type": "string", "description": "The domain of the account to upsert on. Only supported for Outreach and Salesloft." } } } }, "required": ["record", "upsert_on"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] } } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/sales-engagement/contact/_upsert": { "post": { "operationId": "salesEngagement-upsertContact", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "type": "object", "properties": { "first_name": { "type": ["string", "null"], "example": "James" }, "last_name": { "type": ["string", "null"], "example": "Smith" }, "job_title": { "type": ["string", "null"], "example": "CEO" }, "address": { "type": "object", "properties": { "city": { "type": ["string", "null"] }, "country": { "type": ["string", "null"] }, "postal_code": { "type": ["string", "null"] }, "state": { "type": ["string", "null"] }, "street_1": { "type": ["string", "null"] }, "street_2": { "type": ["string", "null"] } }, "example": { "city": "San Francisco", "country": "US", "postal_code": "94107", "state": "CA", "street_1": "525 Brannan", "street_2": null } }, "email_addresses": { "type": "array", "items": { "type": "object", "properties": { "email_address": { "type": "string" }, "email_address_type": { "type": ["string", "null"], "enum": ["primary", "personal", "work"] } }, "required": ["email_address"] }, "example": [ { "email_address": "hello@revtron.ai", "email_address_type": "work" } ] }, "phone_numbers": { "type": "array", "items": { "type": "object", "properties": { "phone_number": { "type": "string" }, "phone_number_type": { "type": "string", "enum": [ "primary", "work", "home", "mobile", "other" ] } }, "required": ["phone_number", "phone_number_type"] }, "example": [ { "phone_number": "+14151234567", "phone_number_type": "work" } ] }, "owner_id": { "type": ["string", "null"], "example": "9f3e97fd-4d5d-4efc-959d-bbebfac079f5" }, "account_id": { "type": ["string", "null"], "example": "ae4be028-9078-4850-a0bf-d2112b7c4d11" }, "custom_fields": { "type": ["object", "null"], "additionalProperties": {} } }, "required": ["address", "email_addresses", "phone_numbers"] }, "upsert_on": { "type": "object", "properties": { "email": { "type": "string", "description": "Contact email to upsert on. Supported for Outreach, Salesloft, and Apollo." } } } }, "required": ["record", "upsert_on"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] } } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/{entity}/_count": { "get": { "operationId": "crm-countEntity", "parameters": [ { "in": "path", "name": "entity", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "count": { "type": "number" } }, "required": ["count"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/account": { "get": { "operationId": "crm-listAccounts", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/crm.account" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "crm-createAccount", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.account_input" } }, "required": ["record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.account" } }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/account/{id}": { "get": { "operationId": "crm-getAccount", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.account" }, "raw": {} }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "patch": { "operationId": "crm-updateAccount", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.account_input" } }, "required": ["record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.account" } }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/account/_batch_read": { "post": { "operationId": "crm-batchReadAccounts", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["ids", "properties"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/crm.account" } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/account/_upsert": { "post": { "operationId": "crm-upsertAccount", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "upsert_on": { "type": "object", "properties": { "key": { "type": "string", "enum": ["domain", "website"], "description": "The key to upsert on. Only `website` is supported for Salesforce, while both `domain` and `website` are supported for Hubspot." }, "values": { "type": "array", "items": { "type": "string" }, "description": "The values to upsert on. If more than one value is provided, it will act as a logical OR. If more than one account is found that matches, then an error will be thrown." } }, "required": ["key", "values"] }, "record": { "$ref": "#/components/schemas/crm.account_input" } }, "required": ["upsert_on", "record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.account" } }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/contact": { "get": { "operationId": "crm-listContacts", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/crm.contact" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "crm-createContact", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.contact_input" } }, "required": ["record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.contact" } }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/contact/{id}": { "get": { "operationId": "crm-getContact", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.contact" }, "raw": {} }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "patch": { "operationId": "crm-updateContact", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.contact_input" } }, "required": ["record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.contact" } }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/contact/_batch_read": { "post": { "operationId": "crm-batchReadContacts", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "string" } }, "properties": { "type": "array", "items": { "type": "string" } } }, "required": ["ids", "properties"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/crm.contact" } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/contact/_upsert": { "post": { "operationId": "crm-upsertContact", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "upsert_on": { "type": "object", "properties": { "key": { "type": "string", "enum": ["email"], "description": "The key to upsert on. Only `email` is supported for all providers." }, "values": { "type": "array", "items": { "type": "string" }, "description": "The values to upsert on. If more than one value is provided, it will act as a logical OR. If more than one record is found that matches, then an error will be thrown." } }, "required": ["key", "values"] }, "record": { "$ref": "#/components/schemas/crm.contact_input" } }, "required": ["upsert_on", "record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.contact" } }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/lead": { "get": { "operationId": "crm-listLeads", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/crm.lead" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/lead/{id}": { "get": { "operationId": "crm-getLead", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.lead" }, "raw": {} }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/opportunity": { "get": { "operationId": "crm-listOpportunities", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/crm.opportunity" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/opportunity/{id}": { "get": { "operationId": "crm-getOpportunity", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.opportunity" }, "raw": {} }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/note": { "get": { "operationId": "crm-listNotes", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/crm.note" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "crm-createNote", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.note_input" } }, "required": ["record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.note" } }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/user": { "get": { "operationId": "crm-listUsers", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/crm.user" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/user/{id}": { "get": { "operationId": "crm-getUser", "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "$ref": "#/components/schemas/crm.user" }, "raw": {} }, "required": ["record"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/custom_objects/{object_name}": { "get": { "operationId": "crm-listCustomObjectRecords", "parameters": [ { "in": "path", "name": "object_name", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": {} } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "crm-createCustomObjectRecord", "parameters": [ { "in": "path", "name": "object_name", "schema": { "type": "string" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "record": { "type": "object", "additionalProperties": {} } }, "required": ["record"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "record": {}, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/warning" } } } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/metadata/objects": { "get": { "operationId": "crm-metadataListObjects", "parameters": [ { "in": "query", "name": "type", "schema": { "type": "string", "enum": ["standard", "custom"] } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/crm.meta.object" } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "crm-metadataCreateObject", "description": "Create custom object schema", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": ["string", "null"] }, "labels": { "type": "object", "properties": { "singular": { "type": "string" }, "plural": { "type": "string" } }, "required": ["singular", "plural"] }, "primary_field_id": { "type": "string" }, "fields": { "type": "array", "items": { "$ref": "#/components/schemas/crm.meta.custom_object_field" }, "minItems": 1 } }, "required": [ "name", "description", "labels", "primary_field_id", "fields" ] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crm.meta.object" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/metadata/objects/{object_name}/properties": { "get": { "operationId": "crm-metadataListObjectProperties", "parameters": [ { "in": "path", "name": "object_name", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/crm.meta.property" } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } }, "post": { "operationId": "crm-metadataCreateObjectProperty", "parameters": [ { "in": "path", "name": "object_name", "schema": { "type": "string" }, "required": true } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "The machine name of the property as it appears in the third-party Provider", "example": "FirstName" }, "label": { "type": "string", "description": "The human-readable name of the property as provided by the third-party Provider.", "example": "First Name" }, "type": { "type": "string", "description": "The type of the property as provided by the third-party Provider. These types are not unified by OpenInt. For Intercom, this is string, integer, boolean, or object. For Outreach, this is integer, boolean, number, array, or string.", "example": "string" }, "raw_details": { "type": "object", "additionalProperties": {}, "description": "The raw details of the property as provided by the third-party Provider, if available.", "example": {} } }, "required": ["id", "label"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/crm.meta.property" } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/crm/metadata/associations": { "post": { "operationId": "crm-metadataCreateAssociation", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "source_object": { "type": "string" }, "target_object": { "type": "string" }, "suggested_key_name": { "type": "string", "description": "The underlying provider may change this (e.g. adding `__c` for Salesforce)." }, "display_name": { "type": "string" } }, "required": [ "source_object", "target_object", "suggested_key_name", "display_name" ] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "association_schema": { "$ref": "#/components/schemas/crm.meta.association_schema" }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/warning" } } }, "required": ["association_schema"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/banking/account": { "get": { "operationId": "banking-listAccounts", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/banking.account" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/banking/merchant": { "get": { "operationId": "banking-listMerchants", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/banking.merchant" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/banking/category": { "get": { "operationId": "banking-listCategories", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/banking.category" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/banking/transaction": { "get": { "operationId": "banking-listTransactions", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/banking.transaction" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/account": { "get": { "operationId": "accounting-listAccounts", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": ["string", "null"] }, "name": { "type": "string" }, "type": { "type": "string" } }, "required": ["id", "name", "type"] } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/expense": { "get": { "operationId": "accounting-listExpenses", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "amount": { "type": "number" }, "currency": { "type": "string" }, "payment_account": { "type": "string" } }, "required": [ "id", "amount", "currency", "payment_account" ] } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/vendor": { "get": { "operationId": "accounting-listVendors", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["id", "name", "url"] } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/balance-sheet": { "get": { "operationId": "accounting-getBalanceSheet", "parameters": [ { "in": "query", "name": "start_date", "schema": { "type": "string" } }, { "in": "query", "name": "end_date", "schema": { "type": "string" } }, { "in": "query", "name": "sort_order", "schema": { "type": "string" } }, { "in": "query", "name": "customer", "schema": { "type": "string" } }, { "in": "query", "name": "department", "schema": { "type": "string" } }, { "in": "query", "name": "date_macro", "schema": { "type": "string" } }, { "in": "query", "name": "summarize_by", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "startPeriod": { "type": "string", "format": "date" }, "endPeriod": { "type": "string", "format": "date" }, "currency": { "type": "string" }, "accountingStandard": { "type": "string" }, "totalCurrentAssets": { "type": ["number", "null"] }, "totalFixedAssets": { "type": ["number", "null"] }, "totalAssets": { "type": ["number", "null"] }, "totalCurrentLiabilities": { "type": ["number", "null"] }, "totalLongTermLiabilities": { "type": ["number", "null"] }, "totalLiabilities": { "type": ["number", "null"] }, "openingBalanceEquity": { "type": ["number", "null"] }, "netIncome": { "type": ["number", "null"] }, "totalEquity": { "type": ["number", "null"] }, "totalLiabilitiesAndEquity": { "type": ["number", "null"] } }, "required": [ "startPeriod", "endPeriod", "currency", "accountingStandard", "totalCurrentAssets", "totalFixedAssets", "totalAssets", "totalCurrentLiabilities", "totalLongTermLiabilities", "totalLiabilities", "openingBalanceEquity", "netIncome", "totalEquity", "totalLiabilitiesAndEquity" ] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/profit-and-loss": { "get": { "operationId": "accounting-getProfitAndLoss", "parameters": [ { "in": "query", "name": "start_date", "schema": { "type": "string" } }, { "in": "query", "name": "end_date", "schema": { "type": "string" } }, { "in": "query", "name": "sort_order", "schema": { "type": "string" } }, { "in": "query", "name": "customer", "schema": { "type": "string" } }, { "in": "query", "name": "department", "schema": { "type": "string" } }, { "in": "query", "name": "date_macro", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "reportName": { "type": "string" }, "startPeriod": { "type": "string", "format": "date" }, "endPeriod": { "type": "string", "format": "date" }, "currency": { "type": "string" }, "accountingStandard": { "type": "string" }, "totalIncome": { "type": ["number", "null"] }, "grossProfit": { "type": ["number", "null"] }, "totalExpenses": { "type": ["number", "null"] }, "netOperatingIncome": { "type": ["number", "null"] }, "netIncome": { "type": ["number", "null"] } }, "required": [ "reportName", "startPeriod", "endPeriod", "currency", "accountingStandard", "totalIncome", "grossProfit", "totalExpenses", "netOperatingIncome", "netIncome" ] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/cash-flow": { "get": { "operationId": "accounting-getCashFlow", "parameters": [ { "in": "query", "name": "start_date", "schema": { "type": "string" } }, { "in": "query", "name": "end_date", "schema": { "type": "string" } }, { "in": "query", "name": "sort_order", "schema": { "type": "string" } }, { "in": "query", "name": "customer", "schema": { "type": "string" } }, { "in": "query", "name": "department", "schema": { "type": "string" } }, { "in": "query", "name": "date_macro", "schema": { "type": "string" } }, { "in": "query", "name": "summarize_by", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "reportName": { "type": "string" }, "startPeriod": { "type": "string", "format": "date" }, "endPeriod": { "type": "string", "format": "date" }, "currency": { "type": "string" }, "netIncome": { "type": ["number", "null"] }, "totalOperatingAdjustments": { "type": ["number", "null"] }, "netCashFromOperatingActivities": { "type": ["number", "null"] }, "netCashFromFinancingActivities": { "type": ["number", "null"] }, "netCashIncrease": { "type": ["number", "null"] }, "endingCash": { "type": ["number", "null"] } }, "required": [ "reportName", "startPeriod", "endPeriod", "currency", "netIncome", "totalOperatingAdjustments", "netCashFromOperatingActivities", "netCashFromFinancingActivities", "netCashIncrease", "endingCash" ] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/transaction-list": { "get": { "operationId": "accounting-getTransactionList", "parameters": [ { "in": "query", "name": "start_date", "schema": { "type": "string" } }, { "in": "query", "name": "end_date", "schema": { "type": "string" } }, { "in": "query", "name": "sort_order", "schema": { "type": "string" } }, { "in": "query", "name": "customer", "schema": { "type": "string" } }, { "in": "query", "name": "department", "schema": { "type": "string" } }, { "in": "query", "name": "date_macro", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "reportName": { "type": "string" }, "startPeriod": { "type": "string" }, "endPeriod": { "type": "string" }, "currency": { "type": "string" }, "transactions": { "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string" }, "transactionType": { "type": "string" }, "documentNumber": { "type": "string" }, "posting": { "type": "string" }, "name": { "type": "string" }, "department": { "type": "string" }, "memo": { "type": "string" }, "account": { "type": "string" }, "split": { "type": "string" }, "amount": { "type": "number" } }, "required": ["date", "transactionType", "amount"] } } }, "required": [ "reportName", "startPeriod", "endPeriod", "currency", "transactions" ] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/customer-balance": { "get": { "operationId": "accounting-getCustomerBalance", "parameters": [ { "in": "query", "name": "start_date", "schema": { "type": "string" } }, { "in": "query", "name": "end_date", "schema": { "type": "string" } }, { "in": "query", "name": "sort_order", "schema": { "type": "string" } }, { "in": "query", "name": "customer", "schema": { "type": "string" } }, { "in": "query", "name": "department", "schema": { "type": "string" } }, { "in": "query", "name": "date_macro", "schema": { "type": "string" } }, { "in": "query", "name": "summarize_by", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "reportName": { "type": "string" }, "reportDate": { "type": "string" }, "currency": { "type": "string" }, "entries": { "type": "array", "items": { "type": "object", "properties": { "customerId": { "type": "string" }, "customerName": { "type": "string" }, "balance": { "type": "number" } }, "required": ["customerId", "customerName", "balance"] } }, "totalBalance": { "type": "number" } }, "required": [ "reportName", "reportDate", "currency", "entries", "totalBalance" ] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/customer-income": { "get": { "operationId": "accounting-getCustomerIncome", "parameters": [ { "in": "query", "name": "start_date", "schema": { "type": "string" } }, { "in": "query", "name": "end_date", "schema": { "type": "string" } }, { "in": "query", "name": "sort_order", "schema": { "type": "string" } }, { "in": "query", "name": "customer", "schema": { "type": "string" } }, { "in": "query", "name": "department", "schema": { "type": "string" } }, { "in": "query", "name": "date_macro", "schema": { "type": "string" } }, { "in": "query", "name": "summarize_by", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "reportName": { "type": "string" }, "startPeriod": { "type": "string" }, "endPeriod": { "type": "string" }, "currency": { "type": "string" }, "entries": { "type": "array", "items": { "type": "object", "properties": { "customerId": { "type": "string" }, "customerName": { "type": "string" }, "totalIncome": { "type": "number" }, "totalExpenses": { "type": "number" }, "netIncome": { "type": "number" } }, "required": [ "customerId", "customerName", "totalIncome", "totalExpenses", "netIncome" ] } }, "totalIncome": { "type": "number" }, "totalExpenses": { "type": "number" }, "netIncome": { "type": "number" } }, "required": [ "reportName", "startPeriod", "endPeriod", "currency", "entries", "totalIncome", "totalExpenses", "netIncome" ] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/bank-accounts": { "get": { "operationId": "accounting-getBankAccounts", "parameters": [ { "in": "query", "name": "customer", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "updated": { "type": "string" }, "name": { "type": "string" }, "accountNumber": { "type": "string" }, "default": { "type": "boolean" }, "created": { "type": "string" }, "inputType": { "type": "string" }, "phone": { "type": "string" }, "accountType": { "type": "string" }, "routingNumber": { "type": "string" }, "id": { "type": "string" } }, "required": [ "updated", "name", "accountNumber", "default", "created", "inputType", "phone", "accountType", "routingNumber", "id" ] } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/accounting/payment-receipt": { "get": { "operationId": "accounting-getPaymentReceipts", "parameters": [ { "in": "query", "name": "customer_transaction_id", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/pta/account": { "get": { "operationId": "pta-listAccounts", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": {} } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/pta/transaction": { "get": { "operationId": "pta-listTransactions", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": {} } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/pta/commodity": { "get": { "operationId": "pta-listCommodities", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": {} } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/ats/job": { "get": { "operationId": "ats-listJobs", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ats.job" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/ats/job/{jobId}/opening": { "get": { "operationId": "ats-listJobOpenings", "parameters": [ { "in": "path", "name": "jobId", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ats.opening" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/ats/offer": { "get": { "operationId": "ats-listOffers", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ats.offer" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/ats/candidate": { "get": { "operationId": "ats-listCandidates", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ats.candidate" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/ats/department": { "get": { "operationId": "ats-listDepartments", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ats.department" } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/hris/individual": { "get": { "operationId": "hris-listIndividual", "parameters": [ { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "raw_data": { "type": "object", "additionalProperties": {} } }, "required": ["id"] } } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/etl/read/{stream}": { "get": { "operationId": "etl-readStream", "parameters": [ { "in": "path", "name": "stream", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "sync_mode", "schema": { "type": "string", "enum": ["full", "incremental"] } }, { "in": "query", "name": "cursor", "schema": { "type": ["string", "null"] } }, { "in": "query", "name": "page_size", "schema": { "type": "number" } }, { "in": "query", "name": "fields", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "next_cursor": { "type": ["string", "null"] }, "has_next_page": { "type": "boolean" }, "items": { "type": "array", "items": {} } }, "required": ["has_next_page", "items"] } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.NOT_FOUND" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/etl/discover": { "get": { "operationId": "etl-discover", "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "streams": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "json_schema": { "type": "object", "additionalProperties": {} }, "source_defined_primary_key": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } } }, "required": ["name", "json_schema"] } }, "type": { "type": "string", "enum": ["CATALOG"] } }, "required": ["streams", "type"] } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/etl/read": { "post": { "operationId": "etl-read", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "catalog": { "type": "object", "properties": { "streams": { "type": "array", "items": { "type": "object", "properties": { "stream": { "type": "object", "properties": { "name": { "type": "string" }, "json_schema": { "type": "object", "additionalProperties": {} }, "source_defined_primary_key": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } } }, "required": ["name", "json_schema"] }, "sync_mode": { "type": "string", "enum": ["full_refresh", "incremental"] }, "additional_fields": { "type": "array", "items": { "type": "string" } } }, "required": ["stream", "sync_mode"] } } }, "required": ["streams"] }, "state": { "type": "object", "properties": { "shared_state": { "type": "object", "additionalProperties": {} }, "stream_states": { "type": "array", "items": { "type": "object", "properties": { "stream_description": { "type": "object", "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } }, "required": ["name", "namespace"] }, "stream_state": { "type": "object", "additionalProperties": {} } }, "required": ["stream_description", "stream_state"] } } }, "required": ["stream_states"] } }, "required": ["catalog", "state"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "record": { "type": "object", "properties": { "data": {}, "stream": { "type": "string" } }, "required": ["stream"] }, "type": { "type": "string", "enum": ["RECORD"] } }, "required": ["record", "type"] } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } }, "/unified/etl/write": { "post": { "operationId": "etl-write", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "properties": { "record": { "type": "object", "properties": { "data": {}, "stream": { "type": "string" } }, "required": ["stream"] }, "type": { "type": "string", "enum": ["RECORD"] } }, "required": ["record", "type"] } } }, "required": ["messages"] } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "streams": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "json_schema": { "type": "object", "additionalProperties": {} }, "source_defined_primary_key": { "type": "array", "items": { "type": "array", "items": { "type": "string" } } } }, "required": ["name", "json_schema"] } }, "type": { "type": "string", "enum": ["CATALOG"] } }, "required": ["streams", "type"] }, { "type": "object", "properties": { "record": { "type": "object", "properties": { "data": {}, "stream": { "type": "string" } }, "required": ["stream"] }, "type": { "type": "string", "enum": ["RECORD"] } }, "required": ["record", "type"] }, { "type": "object", "properties": { "state": {}, "type": { "type": "string", "enum": ["STATE"] } }, "required": ["type"] } ] } } } } }, "400": { "description": "Invalid input data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.BAD_REQUEST" } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" } } } } } } } }, "webhooks": { "sync.completed": { "post": { "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/webhooks.sync.completed" } } } }, "responses": {} } } }, "components": { "securitySchemes": { "apikey": { "type": "apiKey", "name": "x-apikey", "in": "header" }, "resourceId": { "type": "apiKey", "name": "x-resource-id", "in": "header" } }, "schemas": { "webhooks.sync.completed": { "type": "object", "properties": { "data": { "type": "object", "properties": { "pipeline_id": { "type": "string", "description": "Must start with 'pipe_'" }, "source_id": { "type": "string", "description": "Must start with 'reso_'" }, "destination_id": { "type": "string", "description": "Must start with 'reso_'" } }, "required": ["pipeline_id", "source_id", "destination_id"] }, "name": { "type": "string", "enum": ["sync.completed"] }, "id": { "type": "string" } }, "required": ["data", "name"] }, "error.INTERNAL_SERVER_ERROR": { "type": "object", "properties": { "message": { "type": "string", "description": "The error message", "example": "Internal server error" }, "code": { "type": "string", "description": "The error code", "example": "INTERNAL_SERVER_ERROR" }, "issues": { "type": "array", "items": { "type": "object", "properties": { "message": { "type": "string" } }, "required": ["message"] }, "description": "An array of issues that were responsible for the error", "example": [] } }, "required": ["message", "code"], "title": "Error", "description": "The error information", "example": { "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": [] } }, "error.BAD_REQUEST": { "type": "object", "properties": { "message": { "type": "string", "description": "The error message", "example": "Invalid input data" }, "code": { "type": "string", "description": "The error code", "example": "BAD_REQUEST" }, "issues": { "type": "array", "items": { "type": "object", "properties": { "message": { "type": "string" } }, "required": ["message"] }, "description": "An array of issues that were responsible for the error", "example": [] } }, "required": ["message", "code"], "title": "Error", "description": "The error information", "example": { "code": "BAD_REQUEST", "message": "Invalid input data", "issues": [] } }, "Resource": { "type": "object", "properties": { "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "id": { "type": "string", "description": "Must start with 'reso_'" }, "connectorName": { "type": "string", "description": "Unique name of the connector" }, "displayName": { "type": ["string", "null"] }, "endUserId": { "type": ["string", "null"], "minLength": 1 }, "connectorConfigId": { "type": "string", "description": "Must start with 'ccfg_'" }, "integrationId": { "type": ["string", "null"], "description": "Must start with 'int_'" }, "settings": { "type": ["object", "null"], "additionalProperties": {} }, "standard": { "type": ["object", "null"], "properties": { "displayName": { "type": "string" }, "status": { "type": ["string", "null"], "enum": ["healthy", "disconnected", "error", "manual"] }, "statusMessage": { "type": ["string", "null"] }, "labels": { "type": "array", "items": { "type": "string" } } }, "required": ["displayName"] }, "disabled": { "type": "boolean" }, "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" } }, "required": [ "createdAt", "updatedAt", "id", "connectorName", "connectorConfigId" ] }, "error.NOT_FOUND": { "type": "object", "properties": { "message": { "type": "string", "description": "The error message", "example": "Not found" }, "code": { "type": "string", "description": "The error code", "example": "NOT_FOUND" }, "issues": { "type": "array", "items": { "type": "object", "properties": { "message": { "type": "string" } }, "required": ["message"] }, "description": "An array of issues that were responsible for the error", "example": [] } }, "required": ["message", "code"], "title": "Error", "description": "The error information", "example": { "code": "NOT_FOUND", "message": "Not found", "issues": [] } }, "ConnectorConfig": { "type": "object", "properties": { "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "id": { "type": "string", "description": "Must start with 'ccfg_'" }, "connectorName": { "type": "string" }, "config": { "type": ["object", "null"], "additionalProperties": {} }, "orgId": { "type": "string", "description": "Must start with 'org_'" }, "displayName": { "type": ["string", "null"] }, "disabled": { "type": "boolean", "title": "Disabled", "description": "When disabled it will not be used for connection portal. Essentially a reversible soft-delete" }, "defaultPipeOut": { "type": ["object", "null"], "properties": { "streams": { "type": ["object", "null"], "additionalProperties": { "type": "boolean" } }, "links": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/Link" }, "description": "Array of transformations that the data gets piped through on the way out. Typically used for things like unification / normalization." }, "destination_id": { "type": "string", "description": "Defaults to the org-wide postgres" } }, "description": "Automatically sync data from any resources associated with this config to the destination resource, which is typically a Postgres database. Think ETL" }, "defaultPipeIn": { "type": ["object", "null"], "properties": { "links": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/Link" }, "description": "Array of transformations that the data gets piped through on the way out. Typically used for things like unification / normalization." }, "source_id": { "type": "string", "description": "Must start with 'reso_'" } }, "required": ["source_id"], "description": "Automatically sync data from any resources associated with this config to the destination resource, which is typically a Postgres database. Think ETL" }, "envName": { "type": ["string", "null"] }, "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" } }, "required": ["createdAt", "updatedAt", "id", "connectorName", "orgId"] }, "Link": { "type": "string", "enum": [ "banking", "prefix_connector_name", "single_table", "ats", "ag_column_rename" ] }, "core.integration": { "type": "object", "properties": { "id": { "type": "string" }, "updated_at": { "type": "string", "description": "ISO8601 date string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" }, "logo_url": { "type": ["string", "null"] }, "login_url": { "type": ["string", "null"] }, "verticals": { "type": ["array", "null"], "items": { "type": "string", "enum": [ "banking", "accounting", "crm", "sales-engagement", "engagement", "commerce", "expense-management", "enrichment", "database", "flat-files-and-spreadsheets", "file-storage", "streaming", "personal-finance", "other", "hris", "payroll", "calendar", "ats", "email" ] } }, "connector_name": { "type": "string" } }, "required": ["id", "name", "connector_name"] }, "core.configured_integration": { "allOf": [ { "$ref": "#/components/schemas/core.integration" } ], "type": "object", "properties": { "connector_config_id": { "type": "string", "description": "Must start with 'ccfg_'" } }, "required": ["connector_config_id"] }, "Pipeline": { "type": "object", "properties": { "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "id": { "type": "string", "description": "Must start with 'pipe_'" }, "sourceId": { "type": "string", "description": "Must start with 'reso_'" }, "sourceState": { "type": "object", "additionalProperties": {} }, "sourceVertical": { "type": ["string", "null"] }, "streams": { "type": ["object", "null"], "additionalProperties": { "type": "object", "properties": { "disabled": { "type": "boolean" }, "fields": { "type": "array", "items": { "type": "string" } } } } }, "destinationId": { "type": "string", "description": "Must start with 'reso_'" }, "destinationState": { "type": "object", "additionalProperties": {} }, "destinationVertical": { "type": ["string", "null"] }, "linkOptions": { "type": ["array", "null"], "items": {} }, "lastSyncStartedAt": { "type": ["string", "null"] }, "lastSyncCompletedAt": { "type": ["string", "null"] }, "disabled": { "type": "boolean" }, "metadata": { "description": "\n JSON object can can be used to associate arbitrary metadata to\n avoid needing a separate 1-1 table just for simple key values in your application.\n During updates this object will be shallowly merged\n" } }, "required": ["createdAt", "updatedAt", "id"] }, "Viewer": { "oneOf": [ { "type": "object", "properties": { "role": { "type": "string", "enum": ["anon"] } }, "required": ["role"] }, { "type": "object", "properties": { "role": { "type": "string", "enum": ["end_user"] }, "endUserId": { "type": "string", "minLength": 1 }, "orgId": { "type": "string", "description": "Must start with 'org_'" } }, "required": ["role", "endUserId", "orgId"] }, { "type": "object", "properties": { "role": { "type": "string", "enum": ["user"] }, "userId": { "type": "string", "description": "Must start with 'user_'" }, "orgId": { "type": ["string", "null"], "description": "Must start with 'org_'" }, "extra": { "type": "object", "additionalProperties": {}, "description": "Currently clerk user" } }, "required": ["role", "userId"] }, { "type": "object", "properties": { "role": { "type": "string", "enum": ["org"] }, "orgId": { "type": "string", "description": "Must start with 'org_'" }, "extra": { "type": "object", "additionalProperties": {}, "description": "Currently clerk organization" } }, "required": ["role", "orgId"] }, { "type": "object", "properties": { "role": { "type": "string", "enum": ["system"] } }, "required": ["role"] } ] }, "sales-engagement.contact": { "type": "object", "properties": { "id": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "owner_id": { "type": "string" }, "account_id": { "type": "string" }, "job_title": { "type": "string" }, "address": { "$ref": "#/components/schemas/sales-engagement.address" }, "email_addresses": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.email_address" } }, "phone_numbers": { "type": "array", "items": { "$ref": "#/components/schemas/sales-engagement.phone_number" } }, "open_count": { "type": "number" }, "click_count": { "type": "number" }, "reply_count": { "type": "number" }, "bounced_count": { "type": "number" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "is_deleted": { "type": "boolean" }, "last_modified_at": { "type": "string" }, "raw_data": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "id", "first_name", "last_name", "owner_id", "job_title", "address", "email_addresses", "phone_numbers", "open_count", "click_count", "reply_count", "bounced_count", "created_at", "updated_at", "is_deleted", "last_modified_at" ] }, "sales-engagement.address": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "postal_code": { "type": "string" }, "state": { "type": "string" }, "street_1": { "type": "string" }, "street_2": { "type": "string" } }, "required": [ "city", "country", "postal_code", "state", "street_1", "street_2" ] }, "sales-engagement.email_address": { "type": "object", "properties": { "email_address": { "type": "string" }, "email_address_type": { "type": "string", "enum": ["primary", "personal", "work", "other"] } }, "required": ["email_address", "email_address_type"] }, "sales-engagement.phone_number": { "type": "object", "properties": { "phone_number": { "type": "string" }, "phone_number_type": { "type": "string", "enum": ["primary", "work", "home", "mobile", "other"] } }, "required": ["phone_number", "phone_number_type"] }, "sales-engagement.sequence": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "is_deleted": { "type": "boolean" }, "last_modified_at": { "type": "string" }, "owner_id": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "num_steps": { "type": "number" }, "metrics": { "type": "object", "properties": {}, "additionalProperties": {} }, "is_enabled": { "type": "boolean" }, "raw_data": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "id", "created_at", "updated_at", "is_deleted", "last_modified_at", "owner_id", "tags", "num_steps", "is_enabled" ] }, "sales-engagement.sequenceState": { "type": "object", "properties": { "id": { "type": "string" }, "state": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "is_deleted": { "type": "boolean" }, "last_modified_at": { "type": "string" }, "sequence_id": { "type": "string" }, "contact_id": { "type": "string" }, "mailbox_id": { "type": "string" }, "user_id": { "type": "string" }, "raw_data": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "id", "state", "created_at", "updated_at", "is_deleted", "last_modified_at", "sequence_id", "contact_id", "mailbox_id", "user_id" ] }, "sales-engagement.user": { "type": "object", "properties": { "id": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "email": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "is_deleted": { "type": "boolean" }, "last_modified_at": { "type": "string" }, "raw_data": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "id", "first_name", "last_name", "email", "created_at", "updated_at", "is_deleted", "last_modified_at" ] }, "sales-engagement.account": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "is_deleted": { "type": "boolean" }, "last_modified_at": { "type": "string" }, "domain": { "type": "string" }, "owner_id": { "type": "string" }, "raw_data": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "id", "name", "created_at", "updated_at", "is_deleted", "last_modified_at", "domain", "owner_id" ] }, "sales-engagement.mailbox": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "is_deleted": { "type": "boolean" }, "last_modified_at": { "type": "string" }, "user_id": { "type": "string" }, "raw_data": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "id", "email", "created_at", "updated_at", "is_deleted", "last_modified_at", "user_id" ] }, "crm.account": { "type": "object", "properties": { "id": { "type": "string" }, "updated_at": { "type": "string", "description": "ISO8601 date string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "name": { "type": ["string", "null"] }, "is_deleted": { "type": ["boolean", "null"] }, "website": { "type": ["string", "null"] }, "industry": { "type": ["string", "null"] }, "number_of_employees": { "type": ["number", "null"] }, "owner_id": { "type": ["string", "null"] }, "created_at": { "type": ["string", "null"] }, "description": { "type": ["string", "null"], "example": "Integration API" }, "last_activity_at": { "type": ["string", "null"], "description": "date-time" }, "addresses": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/crm.address" } }, "phone_numbers": { "type": ["array", "null"], "items": { "type": "object", "properties": { "phone_number": { "type": ["string", "null"] }, "phone_number_type": { "$ref": "#/components/schemas/crm.phone_number_type" } }, "required": ["phone_number", "phone_number_type"] } }, "lifecycle_stage": { "oneOf": [ { "$ref": "#/components/schemas/crm.lifecycle_stage" }, { "type": "null" } ] }, "last_modified_at": { "type": ["string", "null"] } }, "required": ["id", "updated_at"] }, "crm.address": { "type": "object", "properties": { "address_type": { "$ref": "#/components/schemas/crm.address_type" }, "city": { "type": ["string", "null"] }, "country": { "type": ["string", "null"] }, "postal_code": { "type": ["string", "null"] }, "state": { "type": ["string", "null"] }, "street_1": { "type": ["string", "null"] }, "street_2": { "type": ["string", "null"] } }, "required": [ "address_type", "city", "country", "postal_code", "state", "street_1", "street_2" ] }, "crm.address_type": { "type": "string", "enum": ["primary", "mailing", "other", "billing", "shipping"] }, "crm.phone_number_type": { "type": "string", "enum": ["primary", "mobile", "fax", "other"] }, "crm.lifecycle_stage": { "type": "string", "enum": [ "subscriber", "lead", "marketingqualifiedlead", "salesqualifiedlead", "opportunity", "customer", "evangelist", "other" ] }, "crm.account_input": { "type": "object", "properties": { "description": { "type": ["string", "null"], "example": "Integration API" }, "industry": { "type": ["string", "null"] }, "name": { "type": ["string", "null"] }, "number_of_employees": { "type": ["number", "null"] }, "website": { "type": ["string", "null"] }, "addresses": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/crm.address" } }, "phone_numbers": { "type": ["array", "null"], "items": { "type": "object", "properties": { "phone_number": { "type": ["string", "null"] }, "phone_number_type": { "$ref": "#/components/schemas/crm.phone_number_type" } }, "required": ["phone_number", "phone_number_type"] } }, "owner_id": { "type": ["string", "null"] }, "lifecycle_stage": { "oneOf": [ { "$ref": "#/components/schemas/crm.lifecycle_stage" }, { "type": "null" } ] }, "passthrough_fields": { "type": ["object", "null"], "additionalProperties": {} } } }, "crm.contact": { "type": "object", "properties": { "id": { "type": "string" }, "updated_at": { "type": "string", "description": "ISO8601 date string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "first_name": { "type": ["string", "null"] }, "last_name": { "type": ["string", "null"] }, "email": { "type": ["string", "null"], "description": "Primary email address" }, "phone": { "type": ["string", "null"], "description": "Primary phone number" } }, "required": ["id", "updated_at"] }, "crm.contact_input": { "type": "object", "properties": { "first_name": { "type": ["string", "null"] }, "last_name": { "type": ["string", "null"] }, "email": { "type": ["string", "null"], "description": "Primary email address" }, "phone": { "type": ["string", "null"], "description": "Primary phone number" }, "passthrough_fields": { "type": ["object", "null"], "additionalProperties": {} } } }, "crm.lead": { "type": "object", "properties": { "id": { "type": "string" }, "updated_at": { "type": "string", "description": "ISO8601 date string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "name": { "type": ["string", "null"] }, "first_name": { "type": ["string", "null"] }, "last_name": { "type": ["string", "null"] }, "owner_id": { "type": ["string", "null"] }, "title": { "type": ["string", "null"] }, "company": { "type": ["string", "null"] }, "converted_date": { "type": ["string", "null"] }, "lead_source": { "type": ["string", "null"] }, "converted_account_id": { "type": ["string", "null"] }, "converted_contact_id": { "type": ["string", "null"] }, "addresses": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/crm.address" } }, "email_addresses": { "type": ["array", "null"], "items": { "$ref": "#/components/schemas/crm.email_address" } }, "phone_numbers": { "type": ["array", "null"], "items": { "type": "object", "properties": { "phone_number": { "type": ["string", "null"] }, "phone_number_type": { "$ref": "#/components/schemas/crm.phone_number_type" } }, "required": ["phone_number", "phone_number_type"] } }, "created_at": { "type": ["string", "null"] }, "is_deleted": { "type": ["boolean", "null"] }, "last_modified_at": { "type": ["string", "null"] } }, "required": ["id", "updated_at"] }, "crm.email_address": { "type": "object", "properties": { "email_address": { "type": "string" }, "email_address_type": { "$ref": "#/components/schemas/crm.email_address_type" } }, "required": ["email_address", "email_address_type"] }, "crm.email_address_type": { "type": "string", "enum": ["primary", "work", "other"] }, "crm.opportunity": { "type": "object", "properties": { "id": { "type": "string" }, "updated_at": { "type": "string", "description": "ISO8601 date string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "name": { "type": ["string", "null"] }, "description": { "type": ["string", "null"] }, "owner_id": { "type": ["string", "null"] }, "status": { "oneOf": [ { "$ref": "#/components/schemas/crm.opportunity_status" }, { "type": "null" } ] }, "stage": { "type": ["string", "null"] }, "close_date": { "type": ["string", "null"] }, "account_id": { "type": ["string", "null"] }, "pipeline": { "type": ["string", "null"] }, "amount": { "type": ["number", "null"] }, "last_activity_at": { "type": ["string", "null"] }, "created_at": { "type": ["string", "null"] }, "is_deleted": { "type": ["boolean", "null"] }, "last_modified_at": { "type": ["string", "null"] } }, "required": ["id", "updated_at"] }, "crm.opportunity_status": { "type": "string", "enum": ["OPEN", "WON", "LOST"] }, "crm.note": { "type": "object", "properties": { "id": { "type": "string" }, "updated_at": { "type": "string", "description": "ISO8601 date string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "content": { "type": ["string", "null"] } }, "required": ["id", "updated_at"] }, "crm.note_input": { "type": "object", "properties": { "content": { "type": ["string", "null"] }, "passthrough_fields": { "type": ["object", "null"], "additionalProperties": {} }, "account_id": { "type": "string", "description": "The ID of the company to associate the note to." } } }, "crm.user": { "type": "object", "properties": { "id": { "type": "string" }, "updated_at": { "type": "string", "description": "ISO8601 date string" }, "raw_data": { "type": "object", "additionalProperties": {} }, "name": { "type": ["string", "null"] }, "email": { "type": ["string", "null"] }, "is_active": { "type": ["boolean", "null"] }, "created_at": { "type": ["string", "null"] }, "is_deleted": { "type": ["boolean", "null"] }, "last_modified_at": { "type": ["string", "null"] } }, "required": ["id", "updated_at"] }, "warning": { "type": "object", "properties": { "title": { "type": "string" }, "problem_type": { "type": "string" }, "detail": { "type": "string" } } }, "crm.meta.object": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"] }, "crm.meta.custom_object_field": { "type": "object", "properties": { "id": { "type": "string", "description": "The machine name of the property as it appears in the third-party Provider. In Salesforce, this must end with `__c`." }, "label": { "type": "string", "description": "The human-readable name of the property as provided by the third-party Provider." }, "description": { "type": "string", "description": "A description of the field." }, "is_required": { "type": "boolean", "description": "Whether or not this field is required. Must be false for Salesforce boolean fields." }, "default_value": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ], "description": "The default value for the property. Only supported for Salesforce." }, "group_name": { "type": "string", "description": "Only applicable for Hubspot. If specified, OpenInt will attempt to attach the field to this group if it exists, or create it if it doesn't.", "example": "my group" }, "type": { "$ref": "#/components/schemas/crm.meta.property_type" }, "precision": { "type": "number", "description": "Only applicable in Salesforce. If not given, will default to 18." }, "scale": { "type": "number", "description": "Only applicable in Salesforce. If not given, will default to 0." }, "options": { "type": "array", "items": { "$ref": "#/components/schemas/crm.meta.pick_list_option" }, "description": "The list of options for a picklist/multipicklist field." }, "raw_details": { "type": "object", "additionalProperties": {}, "description": "The raw details of the property as provided by the third-party Provider, if available." } }, "required": ["id", "label", "type"] }, "crm.meta.property_type": { "type": "string", "enum": [ "text", "textarea", "number", "picklist", "multipicklist", "date", "datetime", "boolean", "url", "other" ], "description": ":::note\n`picklist` and `multipicklist` property types are currently only supported in Salesforce and Hubspot\n:::\n\n:::note\n`url` property type currently is only natively supported in Salesforce.\n:::" }, "crm.meta.pick_list_option": { "type": "object", "properties": { "label": { "type": "string", "example": "Option 1" }, "value": { "type": "string", "example": "option_1" }, "description": { "type": "string" }, "hidden": { "type": "boolean", "description": "Defaults to false." } }, "required": ["label", "value"] }, "crm.meta.property": { "type": "object", "properties": { "id": { "type": "string", "description": "The machine name of the property as it appears in the third-party Provider", "example": "FirstName" }, "label": { "type": "string", "description": "The human-readable name of the property as provided by the third-party Provider.", "example": "First Name" }, "type": { "type": "string", "description": "The type of the property as provided by the third-party Provider. These types are not unified by OpenInt. For Intercom, this is string, integer, boolean, or object. For Outreach, this is integer, boolean, number, array, or string.", "example": "string" }, "raw_details": { "type": "object", "additionalProperties": {}, "description": "The raw details of the property as provided by the third-party Provider, if available.", "example": {} } }, "required": ["id", "label"] }, "crm.meta.association_schema": { "type": "object", "properties": { "id": { "type": "string" }, "source_object": { "type": "string", "example": "contact" }, "target_object": { "type": "string", "example": "my_custom_object" }, "display_name": { "type": "string" } }, "required": ["id", "source_object", "target_object", "display_name"] }, "banking.account": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "current_balance": { "type": "number" }, "currency": { "type": "string" } }, "required": ["id", "name"] }, "banking.merchant": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "url": { "type": ["string", "null"] } }, "required": ["id", "name"] }, "banking.category": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"] }, "banking.transaction": { "type": "object", "properties": { "id": { "type": "string" }, "date": { "type": "string" }, "description": { "type": ["string", "null"] }, "category_id": { "type": ["string", "null"] }, "category_name": { "type": ["string", "null"] }, "amount": { "type": "number" }, "currency": { "type": "string" }, "merchant_id": { "type": ["string", "null"] }, "merchant_name": { "type": ["string", "null"] }, "account_id": { "type": ["string", "null"] }, "account_name": { "type": ["string", "null"] } }, "required": ["id", "date", "amount", "currency"] }, "ats.job": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string" }, "modified_at": { "type": "string" }, "name": { "type": "string" }, "confidential": { "type": "boolean" }, "departments": { "type": "array", "items": { "$ref": "#/components/schemas/ats.department" } }, "offices": { "type": ["array", "null"], "items": { "type": "object", "additionalProperties": {} } }, "hiring_managers": {}, "recruiters": { "type": ["array", "null"], "items": { "type": "object", "additionalProperties": {} } }, "raw_data": { "type": "object", "additionalProperties": {} } }, "required": [ "id", "created_at", "modified_at", "name", "confidential", "departments" ], "description": "An (open) role" }, "ats.department": { "type": "object", "properties": { "id": { "type": ["string", "null"] }, "created_at": { "type": ["string", "null"] }, "modified_at": { "type": ["string", "null"] }, "name": { "type": ["string", "null"] }, "parent_id": { "type": ["string", "null"] }, "parent_department_external_id": { "type": ["string", "null"] }, "child_ids": { "type": ["array", "null"], "items": { "type": ["string", "null"] } }, "child_department_external_ids": { "type": ["array", "null"], "items": { "type": ["string", "null"] } }, "raw_data": { "type": "object", "additionalProperties": {} } }, "description": "A department in an organization" }, "ats.opening": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string" }, "modified_at": { "type": "string" }, "status": { "type": "string" }, "job_id": { "type": "string" }, "raw_data": { "type": "object", "additionalProperties": {} } }, "required": ["id", "created_at", "modified_at", "status", "job_id"], "description": "An opening for a job" }, "ats.offer": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string" }, "modified_at": { "type": "string" }, "application": { "type": ["string", "null"] }, "closed_at": { "type": ["string", "null"] }, "sent_at": { "type": ["string", "null"] }, "start_date": { "type": ["string", "null"] }, "status": { "type": ["string", "null"] }, "raw_data": { "type": "object", "additionalProperties": {} } }, "required": ["id", "created_at", "modified_at"], "description": "An offer to a candidate" }, "ats.candidate": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": ["string", "null"] }, "modified_at": { "type": ["string", "null"] }, "name": { "type": ["string", "null"] }, "first_name": { "type": ["string", "null"] }, "last_name": { "type": ["string", "null"] }, "company": { "type": ["string", "null"] }, "title": { "type": ["string", "null"] }, "last_interaction_at": { "type": ["string", "null"] }, "is_private": { "type": ["boolean", "null"] }, "can_email": { "type": ["boolean", "null"] }, "locations": { "type": ["array", "null"], "items": {} }, "phone_numbers": { "type": ["array", "null"], "items": { "type": "object", "additionalProperties": {} } }, "email_addresses": { "type": ["array", "null"], "items": { "type": "object", "additionalProperties": {} } }, "tags": { "type": ["array", "null"], "items": { "type": "string" } }, "applications": { "type": ["array", "null"], "items": {} }, "attachments": { "type": ["array", "null"], "items": {} }, "raw_data": { "type": "object", "additionalProperties": {} } }, "required": ["id"], "description": "A candidate for a job" } } }, "security": [ { "apikey": [], "resourceId": [] } ] }