openapi: 3.1.0 info: title: Mixedbread admin data_sources API version: 0.1.0 description: Mixedbread admin endpoints extracted from the canonical OpenAPI spec at https://api.mixedbread.com/openapi.json servers: - url: https://api.mixedbread.com description: mixedbread ai production server - url: https://api.dev.mixedbread.com description: mixedbread ai development server - url: http://127.0.0.1:8000 description: mixedbread local server - url: http://localhost:8000 description: mixedbread local server tags: - name: data_sources paths: /v1/data_sources/{data_source_id}/connectors: post: tags: - data_sources summary: Create a new connector description: "Create a new connector.\n\nArgs:\n data_source_id: The ID of the data source to create a connector for.\n params: The connector to create.\n\nReturns:\n The created connector." operationId: create_connector security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to create a connector for title: Data Source Id description: The ID of the data source to create a connector for requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DataSourceConnectorCreateParams' description: The connector to create responses: '201': description: The created connector content: application/json: schema: $ref: '#/components/schemas/DataSourceConnector' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - data_sources summary: Get all connectors for a data source description: "Get all connectors for a data source.\n\nArgs:\n data_source_id: The ID of the data source to get connectors for.\n pagination: The pagination options.\n\nReturns:\n The list of connectors." operationId: list_connectors security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to get connectors for title: Data Source Id description: The ID of the data source to get connectors for - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Maximum number of items to return per page (1-100) examples: - 10 - 20 - 50 default: 20 title: Limit description: Maximum number of items to return per page (1-100) - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Cursor for forward pagination - get items after this position. Use last_cursor from previous response. examples: - eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ== title: After description: Cursor for forward pagination - get items after this position. Use last_cursor from previous response. - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Cursor for backward pagination - get items before this position. Use first_cursor from previous response. examples: - eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ== title: Before description: Cursor for backward pagination - get items before this position. Use first_cursor from previous response. - name: include_total in: query required: false schema: type: boolean description: Whether to include total count in response (expensive operation) examples: - false - true default: false title: Include Total description: Whether to include total count in response (expensive operation) responses: '200': description: The list of connectors content: application/json: schema: $ref: '#/components/schemas/ConnectorListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/data_sources/{data_source_id}/connectors/{connector_id}: get: tags: - data_sources summary: Get a connector by ID description: "Get a connector by ID.\n\nArgs:\n data_source_id: The ID of the data source to get a connector for.\n connector_id: The ID of the connector to get.\n\nReturns:\n The connector." operationId: get_connector security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to get a connector for title: Data Source Id description: The ID of the data source to get a connector for - name: connector_id in: path required: true schema: type: string format: uuid description: The ID of the connector to get title: Connector Id description: The ID of the connector to get responses: '200': description: The connector content: application/json: schema: $ref: '#/components/schemas/DataSourceConnector' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - data_sources summary: Update a connector description: "Update a connector.\n\nArgs:\n data_source_id: The ID of the data source to update a connector for.\n connector_id: The ID of the connector to update.\n params: The connector to update.\n\nReturns:\n The updated connector." operationId: update_connector security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to update a connector for title: Data Source Id description: The ID of the data source to update a connector for - name: connector_id in: path required: true schema: type: string format: uuid description: The ID of the connector to update title: Connector Id description: The ID of the connector to update requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DataSourceConnectorUpdateParams' description: The connector to update responses: '200': description: The updated connector content: application/json: schema: $ref: '#/components/schemas/DataSourceConnector' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - data_sources summary: Delete a connector description: "Delete a connector.\n\nArgs:\n data_source_id: The ID of the data source to delete a connector for.\n connector_id: The ID of the connector to delete.\n\nReturns:\n The deleted connector." operationId: delete_connector security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to delete a connector for title: Data Source Id description: The ID of the data source to delete a connector for - name: connector_id in: path required: true schema: type: string format: uuid description: The ID of the connector to delete title: Connector Id description: The ID of the connector to delete responses: '200': description: The deleted connector content: application/json: schema: $ref: '#/components/schemas/DataSourceConnectorDeleted' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/data_sources/: post: tags: - data_sources summary: Create a new data source description: "Create a new data source.\n\nArgs:\n params: The data source to create.\n\nReturns:\n The created data source." operationId: create_data_source security: - ApiKeyAuth: [] requestBody: required: true content: application/json: schema: anyOf: - $ref: '#/components/schemas/NotionDataSourceCreateOrUpdateParams' - $ref: '#/components/schemas/LinearDataSourceCreateOrUpdateParams' description: The data source to create title: Params responses: '201': description: The created data source content: application/json: schema: $ref: '#/components/schemas/DataSource' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - data_sources summary: Get all data sources description: "Get all data sources.\n\nReturns:\n The list of data sources." operationId: list_data_sources security: - ApiKeyAuth: [] parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Maximum number of items to return per page (1-100) examples: - 10 - 20 - 50 default: 20 title: Limit description: Maximum number of items to return per page (1-100) - name: after in: query required: false schema: anyOf: - type: string - type: 'null' description: Cursor for forward pagination - get items after this position. Use last_cursor from previous response. examples: - eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ== title: After description: Cursor for forward pagination - get items after this position. Use last_cursor from previous response. - name: before in: query required: false schema: anyOf: - type: string - type: 'null' description: Cursor for backward pagination - get items before this position. Use first_cursor from previous response. examples: - eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ== title: Before description: Cursor for backward pagination - get items before this position. Use first_cursor from previous response. - name: include_total in: query required: false schema: type: boolean description: Whether to include total count in response (expensive operation) examples: - false - true default: false title: Include Total description: Whether to include total count in response (expensive operation) responses: '200': description: The list of data sources content: application/json: schema: $ref: '#/components/schemas/DataSourceListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/data_sources/{data_source_id}: get: tags: - data_sources summary: Get a data source by ID description: "Get a data source by ID.\n\nArgs:\n data_source_id: The ID of the data source to fetch.\n\nReturns:\n The data source." operationId: get_data_source security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to fetch title: Data Source Id description: The ID of the data source to fetch responses: '200': description: The data source content: application/json: schema: $ref: '#/components/schemas/DataSource' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - data_sources summary: Update a data source description: "Update a data source.\n\nArgs:\n data_source_id: The ID of the data source to update.\n params: The data source to update.\n\nReturns:\n The updated data source." operationId: update_data_source security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to update title: Data Source Id description: The ID of the data source to update requestBody: required: true content: application/json: schema: anyOf: - $ref: '#/components/schemas/NotionDataSourceCreateOrUpdateParams' - $ref: '#/components/schemas/LinearDataSourceCreateOrUpdateParams' description: The data source to update title: Params responses: '200': description: The updated data source content: application/json: schema: $ref: '#/components/schemas/DataSource' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - data_sources summary: Delete a data source description: "Delete a data source.\n\nArgs:\n data_source_id: The ID of the data source to delete." operationId: delete_data_source security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to delete title: Data Source Id description: The ID of the data source to delete responses: '200': description: The ID of the deleted data source and if it was deleted successfully content: application/json: schema: $ref: '#/components/schemas/DataSourceDeleted' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/data_sources/{data_source_id}/oauth2/authorize: get: tags: - data_sources summary: Authorize a data source description: "Start OAuth2 authorization flow for a data source.\n\nInitiates the OAuth2 authorization process by redirecting the user\nto the external service's authorization page. After authorization,\nthe user will be redirected back to the oauth2_callback endpoint.\n\nArgs:\n data_source_id: The ID of the data source to authorize\n\nReturns:\n Redirect to the OAuth2 provider's authorization page\n\nRaises:\n DataSourceNotFoundError: When data source doesn't exist\n DataSourceAuthTypeNotSupportedError: When OAuth2 is not supported for this data source type" operationId: authorize_data_source security: - ApiKeyAuth: [] parameters: - name: data_source_id in: path required: true schema: type: string format: uuid description: The ID of the data source to authorize title: Data Source Id description: The ID of the data source to authorize responses: '200': description: The authorization URL content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/data_sources/oauth2/callback: get: tags: - data_sources summary: OAuth2 callback for data source authorization description: "OAuth2 callback endpoint for completing data source authorization.\n\nThis endpoint is called by OAuth2 providers after user authorization.\nIt exchanges the authorization code for access tokens and stores them\nsecurely for the data source.\n\nArgs:\n state: OAuth2 state parameter used for CSRF protection\n code: Authorization code from the OAuth2 provider\n error: OAuth2 error code if authorization was denied or failed\n error_description: Human-readable description of the error\n\nReturns:\n Redirect to the data source details page on success\n\nRaises:\n OAuth2TokenExchangeError: When OAuth2 provider returns an error\n InvalidStateError: When state parameter is invalid or expired" operationId: oauth2_callback security: - ApiKeyAuth: [] parameters: - name: state in: query required: true schema: type: string description: OAuth2 state parameter for CSRF protection title: State description: OAuth2 state parameter for CSRF protection - name: code in: query required: true schema: type: string description: Authorization code from OAuth2 provider title: Code description: Authorization code from OAuth2 provider - name: error in: query required: false schema: anyOf: - type: string - type: 'null' description: OAuth2 error code if authorization failed title: Error description: OAuth2 error code if authorization failed - name: error_description in: query required: false schema: anyOf: - type: string - type: 'null' description: Human-readable error description title: Error Description description: Human-readable error description responses: '307': description: Successful authorization, redirect to data source content: application/json: schema: {} '400': description: OAuth2 error or invalid parameters '404': description: Invalid or expired state parameter '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ApiKeyCreateOrUpdateParams: properties: type: type: string const: api_key title: Type default: api_key api_key: type: string title: Api Key description: The API key type: object required: - api_key title: ApiKeyCreateOrUpdateParams description: Base class for API key create or update parameters. DataSourceListResponse: properties: pagination: $ref: '#/components/schemas/CursorPaginationResponse' data: items: $ref: '#/components/schemas/DataSource' type: array title: Data description: The list of data sources object: type: string const: list title: Object description: The object type of the response default: list type: object required: - pagination - data title: DataSourceListResponse description: A list of data sources with pagination. OAuth2CreateOrUpdateParams: properties: type: type: string const: oauth2 title: Type default: oauth2 type: object title: OAuth2CreateOrUpdateParams description: Base class for OAuth2 create or update parameters. NotionDataSourceCreateOrUpdateParams: properties: type: type: string const: notion title: Type description: The type of data source to create default: notion name: type: string title: Name description: The name of the data source metadata: anyOf: - {} - type: 'null' title: Metadata description: The metadata of the data source auth_params: anyOf: - oneOf: - $ref: '#/components/schemas/OAuth2CreateOrUpdateParams' - $ref: '#/components/schemas/ApiKeyCreateOrUpdateParams' discriminator: propertyName: type mapping: api_key: '#/components/schemas/ApiKeyCreateOrUpdateParams' oauth2: '#/components/schemas/OAuth2CreateOrUpdateParams' - type: 'null' title: Auth Params description: The authentication parameters of the data source. Notion supports OAuth2 and API key. type: object required: - name title: NotionDataSourceCreateOrUpdateParams description: Parameters for creating or updating a Notion data source. DataSourceType: type: string enum: - notion - linear title: DataSourceType DataSourceApiKeyParams: properties: type: type: string const: api_key title: Type default: api_key api_key: type: string title: Api Key description: The API key type: object required: - api_key title: DataSourceApiKeyParams description: Authentication parameters for a API key data source. DataSourceConnectorUpdateParams: properties: name: anyOf: - type: string - type: 'null' title: Name description: The name of the connector metadata: anyOf: - additionalProperties: true type: object - type: 'null' title: Metadata description: The metadata of the connector trigger_sync: anyOf: - type: boolean - type: 'null' title: Trigger Sync description: Whether the connector should be synced after update polling_interval: anyOf: - type: integer - type: string - type: 'null' title: Polling Interval description: 'Polling interval for the connector. Defaults to 30 minutes if not specified. Can be provided as: - int: Number of seconds (e.g., 1800 for 30 minutes) - str: Duration string (e.g., ''30m'', ''1h'', ''2d'') or ISO 8601 format (e.g., ''PT30M'', ''P1D'') Valid range: 15 seconds to 30 days' examples: - 1800 - 30m - 1h - PT30M type: object title: DataSourceConnectorUpdateParams description: Parameters for updating a connector. SyncStatus: type: string enum: - idle - pending - in_progress - cancelled - completed - failed title: SyncStatus DataSource: properties: id: type: string title: Id description: The ID of the data source created_at: type: string format: date-time title: Created At description: The creation time of the data source updated_at: type: string format: date-time title: Updated At description: The last update time of the data source type: $ref: '#/components/schemas/DataSourceType' description: The type of data source name: type: string title: Name description: The name of the data source metadata: anyOf: - {} - type: 'null' title: Metadata description: The metadata of the data source auth_params: anyOf: - oneOf: - $ref: '#/components/schemas/DataSourceOAuth2Params' - $ref: '#/components/schemas/DataSourceApiKeyParams' discriminator: propertyName: type mapping: api_key: '#/components/schemas/DataSourceApiKeyParams' oauth2: '#/components/schemas/DataSourceOAuth2Params' - type: 'null' title: Auth Params description: Authentication parameters object: type: string const: data_source title: Object description: The type of the object default: data_source type: object required: - id - created_at - updated_at - type - name - metadata - auth_params title: DataSource description: Service-level representation of a data source. DataSourceOAuth2Params: properties: type: type: string const: oauth2 title: Type default: oauth2 created_at: type: string format: date-time title: Created At description: The timestamp when the OAuth2 credentials were created scope: anyOf: - type: string - type: 'null' title: Scope description: The OAuth2 scope default: read access_token: anyOf: - type: string - type: 'null' title: Access Token description: The OAuth2 access token refresh_token: anyOf: - type: string - type: 'null' title: Refresh Token description: The OAuth2 refresh token token_type: anyOf: - type: string - type: 'null' title: Token Type description: The OAuth2 token type expires_on: anyOf: - type: string format: date-time - type: 'null' title: Expires On description: The OAuth2 token expiration timestamp additional_params: anyOf: - additionalProperties: true type: object - type: 'null' title: Additional Params description: Additional parameters for the OAuth2 flow type: object title: DataSourceOAuth2Params description: Authentication parameters for a OAuth data source. DataSourceConnector: properties: id: type: string title: Id description: The ID of the connector created_at: type: string format: date-time title: Created At description: The creation time of the connector updated_at: type: string format: date-time title: Updated At description: The last update time of the connector store_id: type: string title: Store Id description: The ID of the store data_source_id: type: string title: Data Source Id description: The ID of the data source name: type: string title: Name description: The name of the connector default: New Connector metadata: anyOf: - {} - type: 'null' title: Metadata description: The metadata of the connector polling_interval: type: string format: duration title: Polling Interval description: The polling interval of the connector started_at: anyOf: - type: string format: date-time - type: 'null' title: Started At description: The start time of the connector finished_at: anyOf: - type: string format: date-time - type: 'null' title: Finished At description: The finish time of the connector last_synced_at: anyOf: - type: string format: date-time - type: 'null' title: Last Synced At description: The last sync time of the connector status: $ref: '#/components/schemas/SyncStatus' description: The sync status of the connector error: anyOf: - additionalProperties: true type: object - type: 'null' title: Error description: The sync error of the connector object: type: string const: data_source.connector title: Object description: The type of the object default: data_source.connector type: object required: - id - created_at - updated_at - store_id - data_source_id - metadata - polling_interval - started_at - finished_at - last_synced_at - status - error title: DataSourceConnector description: Service-level representation of a connector. CursorPaginationResponse: properties: has_more: type: boolean title: Has More description: 'Contextual direction-aware flag: True if more items exist in the requested pagination direction. For ''after'': more items after this page. For ''before'': more items before this page.' examples: - true - false first_cursor: anyOf: - type: string - type: 'null' title: First Cursor description: Cursor of the first item in this page. Use for backward pagination. None if page is empty. examples: - eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMVQyMzo1OTo1OS4wMDBaIiwiaWQiOiJhYmMxMjMifQ== - null last_cursor: anyOf: - type: string - type: 'null' title: Last Cursor description: Cursor of the last item in this page. Use for forward pagination. None if page is empty. examples: - eyJjcmVhdGVkX2F0IjoiMjAyNC0xMi0zMFQyMzo1OTo1OS4wMDBaIiwiaWQiOiJ4eXo3ODkifQ== - null total: anyOf: - type: integer - type: 'null' title: Total description: Total number of items available across all pages. Only included when include_total=true was requested. Expensive operation - use sparingly. examples: - 42 - 0 - null type: object required: - has_more - first_cursor - last_cursor title: CursorPaginationResponse description: Response model for cursor-based pagination. ConnectorListResponse: properties: pagination: $ref: '#/components/schemas/CursorPaginationResponse' data: items: $ref: '#/components/schemas/DataSourceConnector' type: array title: Data description: The list of connectors object: type: string const: list title: Object description: The object type of the response default: list type: object required: - pagination - data title: ConnectorListResponse description: A list of connectors with pagination. LinearDataSourceCreateOrUpdateParams: properties: type: type: string const: linear title: Type description: The type of data source to create default: linear name: type: string title: Name description: The name of the data source metadata: anyOf: - {} - type: 'null' title: Metadata description: The metadata of the data source auth_params: anyOf: - oneOf: - $ref: '#/components/schemas/OAuth2CreateOrUpdateParams' discriminator: propertyName: type mapping: oauth2: '#/components/schemas/OAuth2CreateOrUpdateParams' - type: 'null' title: Auth Params description: The authentication parameters of the data source. Linear only supports OAuth2. type: object required: - name title: LinearDataSourceCreateOrUpdateParams description: Parameters for creating or updating a Linear data source. ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError DataSourceDeleted: properties: id: type: string title: Id description: The ID of the data source deleted: type: boolean title: Deleted description: Whether the data source was deleted default: true object: type: string const: data_source title: Object description: The type of the object default: data_source type: object required: - id title: DataSourceDeleted description: Deleted data source. DataSourceConnectorDeleted: properties: id: type: string title: Id description: The ID of the connector deleted: type: boolean title: Deleted description: Whether the connector was deleted default: true object: type: string const: data_source.connector title: Object description: The type of the object default: data_source.connector type: object required: - id title: DataSourceConnectorDeleted description: Deleted connector. DataSourceConnectorCreateParams: properties: store_id: type: string title: Store Id description: The ID of the store name: type: string title: Name description: The name of the connector default: New Connector trigger_sync: type: boolean title: Trigger Sync description: Whether the connector should be synced after creation default: true metadata: anyOf: - {} - type: 'null' title: Metadata description: The metadata of the connector polling_interval: anyOf: - type: integer - type: string - type: 'null' title: Polling Interval description: 'Polling interval for the connector. Defaults to 30 minutes if not specified. Can be provided as: - int: Number of seconds (e.g., 1800 for 30 minutes) - str: Duration string (e.g., ''30m'', ''1h'', ''2d'') or ISO 8601 format (e.g., ''PT30M'', ''P1D'') Valid range: 15 seconds to 30 days' examples: - 1800 - 30m - 1h - PT30M type: object required: - store_id title: DataSourceConnectorCreateParams description: Parameters for creating a connector. securitySchemes: ApiKeyAuth: type: http description: Api key to access Mixedbreads API scheme: bearer