openapi: 3.0.3 info: title: Baserow API spec Admin Integrations API version: 2.2.2 description: 'For more information about our REST API, please visit [this page](https://baserow.io/docs/apis%2Frest-api). For more information about our deprecation policy, please visit [this page](https://baserow.io/docs/apis%2Fdeprecations).' contact: url: https://baserow.io/contact license: name: MIT url: https://github.com/baserow/baserow/blob/develop/LICENSE tags: - name: Integrations paths: /api/application/{application_id}/integrations/: get: operationId: list_application_integrations description: Lists all the integrations of the application related to the provided parameter if the user has access to the related application's workspace. If the workspace is related to a template, then this endpoint will be publicly accessible. parameters: - in: path name: application_id schema: type: integer description: Returns only the integrations of the application related to the provided Id. required: true tags: - Integrations security: - UserSource JWT: [] - JWT: [] - {} responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/IntegrationIntegration' description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_APPLICATION_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' post: operationId: create_application_integration description: Creates a new integration parameters: - in: header name: ClientSessionId schema: type: string format: uuid description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone. - in: path name: application_id schema: type: integer description: Creates an integration for the application related to the provided value. required: true tags: - Integrations requestBody: content: application/json: schema: $ref: '#/components/schemas/IntegrationCreateIntegration' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/IntegrationCreateIntegration' multipart/form-data: schema: $ref: '#/components/schemas/IntegrationCreateIntegration' security: - UserSource JWT: [] - JWT: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/IntegrationIntegration' description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_REQUEST_BODY_VALIDATION detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_APPLICATION_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' /api/integration/{integration_id}/: patch: operationId: update_application_integration description: Updates an existing integration. parameters: - in: header name: ClientSessionId schema: type: string format: uuid description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone. - in: path name: integration_id schema: type: integer description: The id of the integration required: true tags: - Integrations requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedIntegrationUpdateIntegration' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedIntegrationUpdateIntegration' multipart/form-data: schema: $ref: '#/components/schemas/PatchedIntegrationUpdateIntegration' security: - UserSource JWT: [] - JWT: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/IntegrationIntegration' description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_REQUEST_BODY_VALIDATION detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_INTEGRATION_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' delete: operationId: delete_application_integration description: Deletes the integration related by the given id. parameters: - in: header name: ClientSessionId schema: type: string format: uuid description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone. - in: path name: integration_id schema: type: integer description: The id of the integration required: true tags: - Integrations security: - UserSource JWT: [] - JWT: [] responses: '204': description: No response body '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_REQUEST_BODY_VALIDATION detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_INTEGRATION_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' /api/integration/{integration_id}/move/: patch: operationId: move_application_integration description: Moves the integration in the application before another integration or at the end of the application if no before integration is given. The integrations must belong to the same application. parameters: - in: header name: ClientSessionId schema: type: string format: uuid description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone. - in: path name: integration_id schema: type: integer description: The id of the integration to move required: true tags: - Integrations requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedMoveIntegration' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedMoveIntegration' multipart/form-data: schema: $ref: '#/components/schemas/PatchedMoveIntegration' security: - UserSource JWT: [] - JWT: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/IntegrationIntegration' description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_REQUEST_BODY_VALIDATION - ERROR_INTEGRATION_NOT_IN_SAME_APPLICATION detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_INTEGRATION_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' components: schemas: AIIntegrationCreateIntegration: type: object description: 'This serializer allow to set the type of an integration and the integration id before which we want to insert the new integration.' properties: before_id: type: integer description: If provided, creates the integration before the integration with the given id. type: allOf: - $ref: '#/components/schemas/Type20cEnum' description: 'The type of the integration. * `local_baserow` - local_baserow * `smtp` - smtp * `ai` - ai * `slack_bot` - slack_bot' name: type: string maxLength: 255 ai_settings: description: 'Per-provider AI settings overrides. If a provider key is not present, workspace settings are inherited. If present, these values override workspace settings. Structure: {"openai": {"api_key": "...", "models": [...], "organization": ""}, ...}' required: - name - type LocalBaserowDatabaseApplication: type: object properties: id: type: integer readOnly: true name: type: string maxLength: 160 order: type: integer maximum: 2147483647 minimum: 0 type: type: string readOnly: true workspace: allOf: - $ref: '#/components/schemas/Workspace' description: The workspace that the application belongs to. created_on: type: string format: date-time readOnly: true tables: type: array items: $ref: '#/components/schemas/LocalBaserowTable' description: This field is specific to the `database` application and contains an array of tables that are in the database. views: type: array items: $ref: '#/components/schemas/LocalBaserowView' description: This field is specific to the `database` application and contains an array of views that are in the tables. required: - created_on - id - name - order - tables - type - views - workspace SlackBotIntegrationUpdateIntegration: type: object properties: name: type: string maxLength: 255 token: type: string description: The Bot User OAuth Token listed in your Slack bot's OAuth & Permissions page. maxLength: 255 required: - token PatchedMoveIntegration: type: object properties: before_id: type: integer nullable: true description: If provided, the integration is moved before the integration with this Id. Otherwise the integration is placed at the end of the page. SMTPIntegrationCreateIntegration: type: object description: 'This serializer allow to set the type of an integration and the integration id before which we want to insert the new integration.' properties: before_id: type: integer description: If provided, creates the integration before the integration with the given id. type: allOf: - $ref: '#/components/schemas/Type20cEnum' description: 'The type of the integration. * `local_baserow` - local_baserow * `smtp` - smtp * `ai` - ai * `slack_bot` - slack_bot' name: type: string maxLength: 255 host: type: string description: The SMTP server hostname or IP address. maxLength: 255 port: type: integer maximum: 2147483647 minimum: 0 description: The SMTP server port. use_tls: type: boolean description: Whether to use TLS encryption. username: type: string nullable: true description: The SMTP username for authentication. maxLength: 255 password: type: string nullable: true description: The SMTP password for authentication. maxLength: 255 required: - host - name - type AIIntegrationUpdateIntegration: type: object properties: name: type: string maxLength: 255 ai_settings: description: 'Per-provider AI settings overrides. If a provider key is not present, workspace settings are inherited. If present, these values override workspace settings. Structure: {"openai": {"api_key": "...", "models": [...], "organization": ""}, ...}' PatchedIntegrationUpdateIntegration: anyOf: - $ref: '#/components/schemas/LocalBaserowIntegrationUpdateIntegration' - $ref: '#/components/schemas/SMTPIntegrationUpdateIntegration' - $ref: '#/components/schemas/AIIntegrationUpdateIntegration' - $ref: '#/components/schemas/SlackBotIntegrationUpdateIntegration' SMTPIntegrationUpdateIntegration: type: object properties: name: type: string maxLength: 255 host: type: string description: The SMTP server hostname or IP address. maxLength: 255 port: type: integer maximum: 2147483647 minimum: 0 description: The SMTP server port. use_tls: type: boolean description: Whether to use TLS encryption. username: type: string nullable: true description: The SMTP username for authentication. maxLength: 255 password: type: string nullable: true description: The SMTP password for authentication. maxLength: 255 required: - host Workspace: type: object properties: id: type: integer readOnly: true name: type: string maxLength: 165 generative_ai_models_enabled: type: string readOnly: true required: - generative_ai_models_enabled - id - name LocalBaserowContextData: type: object properties: databases: type: array items: $ref: '#/components/schemas/LocalBaserowDatabaseApplication' required: - databases LocalBaserowTable: type: object properties: id: type: integer readOnly: true database_id: type: integer readOnly: true name: type: string maxLength: 255 is_data_sync: type: boolean description: Whether this table is a data synced table or not. is_two_way_data_sync: type: boolean description: Whether this table is a two-way data synced table or not. required: - database_id - id - is_data_sync - is_two_way_data_sync - name LocalBaserowIntegrationIntegration: type: object description: Basic integration serializer mostly for returned values. properties: id: type: integer readOnly: true application_id: type: integer readOnly: true type: type: string readOnly: true description: The type of the integration. name: type: string readOnly: true order: type: string format: decimal pattern: ^-?\d{0,20}(?:\.\d{0,20})?$ readOnly: true description: Lowest first. context_data: allOf: - $ref: '#/components/schemas/LocalBaserowContextData' readOnly: true authorized_user: allOf: - $ref: '#/components/schemas/SubjectUser' readOnly: true required: - application_id - authorized_user - context_data - id - name - order - type IntegrationCreateIntegration: oneOf: - $ref: '#/components/schemas/LocalBaserowIntegrationCreateIntegration' - $ref: '#/components/schemas/SMTPIntegrationCreateIntegration' - $ref: '#/components/schemas/AIIntegrationCreateIntegration' - $ref: '#/components/schemas/SlackBotIntegrationCreateIntegration' discriminator: propertyName: type mapping: local_baserow: '#/components/schemas/LocalBaserowIntegrationCreateIntegration' smtp: '#/components/schemas/SMTPIntegrationCreateIntegration' ai: '#/components/schemas/AIIntegrationCreateIntegration' slack_bot: '#/components/schemas/SlackBotIntegrationCreateIntegration' AIIntegrationIntegration: type: object description: Basic integration serializer mostly for returned values. properties: id: type: integer readOnly: true application_id: type: integer readOnly: true type: type: string readOnly: true description: The type of the integration. name: type: string readOnly: true order: type: string format: decimal pattern: ^-?\d{0,20}(?:\.\d{0,20})?$ readOnly: true description: Lowest first. ai_settings: description: 'Per-provider AI settings overrides. If a provider key is not present, workspace settings are inherited. If present, these values override workspace settings. Structure: {"openai": {"api_key": "...", "models": [...], "organization": ""}, ...}' required: - application_id - id - name - order - type IntegrationIntegration: oneOf: - $ref: '#/components/schemas/LocalBaserowIntegrationIntegration' - $ref: '#/components/schemas/SMTPIntegrationIntegration' - $ref: '#/components/schemas/AIIntegrationIntegration' - $ref: '#/components/schemas/SlackBotIntegrationIntegration' discriminator: propertyName: type mapping: local_baserow: '#/components/schemas/LocalBaserowIntegrationIntegration' smtp: '#/components/schemas/SMTPIntegrationIntegration' ai: '#/components/schemas/AIIntegrationIntegration' slack_bot: '#/components/schemas/SlackBotIntegrationIntegration' LocalBaserowIntegrationUpdateIntegration: type: object properties: name: type: string maxLength: 255 context_data: allOf: - $ref: '#/components/schemas/LocalBaserowContextData' readOnly: true authorized_user: allOf: - $ref: '#/components/schemas/SubjectUser' readOnly: true required: - authorized_user - context_data SubjectUser: type: object properties: id: type: integer readOnly: true username: type: string readOnly: true description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. first_name: type: string readOnly: true email: type: string format: email readOnly: true title: Email address required: - email - first_name - id - username SMTPIntegrationIntegration: type: object description: Basic integration serializer mostly for returned values. properties: id: type: integer readOnly: true application_id: type: integer readOnly: true type: type: string readOnly: true description: The type of the integration. name: type: string readOnly: true order: type: string format: decimal pattern: ^-?\d{0,20}(?:\.\d{0,20})?$ readOnly: true description: Lowest first. host: type: string description: The SMTP server hostname or IP address. maxLength: 255 port: type: integer maximum: 2147483647 minimum: 0 description: The SMTP server port. use_tls: type: boolean description: Whether to use TLS encryption. username: type: string nullable: true description: The SMTP username for authentication. maxLength: 255 password: type: string nullable: true description: The SMTP password for authentication. maxLength: 255 required: - application_id - host - id - name - order - type Type20cEnum: enum: - local_baserow - smtp - ai - slack_bot type: string description: '* `local_baserow` - local_baserow * `smtp` - smtp * `ai` - ai * `slack_bot` - slack_bot' LocalBaserowView: type: object properties: id: type: integer readOnly: true table_id: type: integer readOnly: true name: type: string maxLength: 255 required: - id - name - table_id LocalBaserowIntegrationCreateIntegration: type: object description: 'This serializer allow to set the type of an integration and the integration id before which we want to insert the new integration.' properties: before_id: type: integer description: If provided, creates the integration before the integration with the given id. type: allOf: - $ref: '#/components/schemas/Type20cEnum' description: 'The type of the integration. * `local_baserow` - local_baserow * `smtp` - smtp * `ai` - ai * `slack_bot` - slack_bot' name: type: string maxLength: 255 context_data: allOf: - $ref: '#/components/schemas/LocalBaserowContextData' readOnly: true authorized_user: allOf: - $ref: '#/components/schemas/SubjectUser' readOnly: true required: - authorized_user - context_data - name - type SlackBotIntegrationCreateIntegration: type: object description: 'This serializer allow to set the type of an integration and the integration id before which we want to insert the new integration.' properties: before_id: type: integer description: If provided, creates the integration before the integration with the given id. type: allOf: - $ref: '#/components/schemas/Type20cEnum' description: 'The type of the integration. * `local_baserow` - local_baserow * `smtp` - smtp * `ai` - ai * `slack_bot` - slack_bot' name: type: string maxLength: 255 token: type: string description: The Bot User OAuth Token listed in your Slack bot's OAuth & Permissions page. maxLength: 255 required: - name - token - type SlackBotIntegrationIntegration: type: object description: Basic integration serializer mostly for returned values. properties: id: type: integer readOnly: true application_id: type: integer readOnly: true type: type: string readOnly: true description: The type of the integration. name: type: string readOnly: true order: type: string format: decimal pattern: ^-?\d{0,20}(?:\.\d{0,20})?$ readOnly: true description: Lowest first. token: type: string description: The Bot User OAuth Token listed in your Slack bot's OAuth & Permissions page. maxLength: 255 required: - application_id - id - name - order - token - type securitySchemes: Database token: type: http scheme: bearer bearerFormat: Token your_token JWT: type: http scheme: bearer bearerFormat: JWT your_token UserSource JWT: type: http scheme: bearer bearerFormat: JWT your_token