openapi: 3.2.0 info: title: Pipeshub Notifications API version: 1.0.0 contact: name: API Support email: support@pipeshub.com description: 'Operations tagged Notifications across 2 of this provider''s published API definitions: pipeshub-openapi.yaml, pipeshub-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL security: - bearerAuth: [] - oauth2: [] tags: - name: Notifications description: In-app notifications for the signed-in user (connector errors, warnings, and related alerts) paths: /notifications: get: tags: - Notifications summary: List in-app notifications for the current user description: 'Returns a cursor-paginated list of notifications assigned to the authenticated user from the last 30 days. Default page size is 20 (max 50).' operationId: listInAppNotifications security: - bearerAuth: [] parameters: - name: status in: query required: false description: 'Filter by notification status. When omitted (or any value other than `read`, `unread`, or `archived`), all non-deleted notifications are returned. ' schema: type: string enum: - read - unread - archived - name: limit in: query required: false description: Page size (default 20, max 50) schema: type: integer minimum: 1 maximum: 50 default: 20 - name: cursor in: query required: false description: Opaque base64url cursor from a previous response's `cursor` field schema: type: string responses: '200': description: Notifications retrieved successfully content: application/json: schema: type: object required: - notifications - hasMore properties: notifications: type: array items: $ref: '#/components/schemas/InAppNotification' cursor: type: - string - 'null' description: Pass as cursor query param to fetch the next page hasMore: type: boolean '400': description: Invalid cursor '401': description: Unauthorized — missing or invalid access token '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL /notifications/stats: get: tags: - Notifications summary: Get notification counts for the current user description: 'Returns per-status notification counts for the authenticated user within the 30-day retention window. Counts are always global — independent of the `status` filter used on the list endpoint.' operationId: getNotificationStats security: - bearerAuth: [] responses: '200': description: Counts retrieved successfully content: application/json: schema: type: object required: - unreadCount - readCount - archivedCount properties: unreadCount: type: integer description: Notifications with status `unread` within the retention window readCount: type: integer description: Notifications with status `read` within the retention window archivedCount: type: integer description: Notifications with status `archived` within the retention window '401': description: Unauthorized — missing or invalid access token '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL /notifications/read-all: patch: tags: - Notifications summary: Mark all unread notifications as read description: 'Marks every unread notification assigned to the authenticated user within the 30-day retention window as read.' operationId: markAllInAppNotificationsRead security: - bearerAuth: [] responses: '200': description: Notifications updated content: application/json: schema: type: object required: - success - modifiedCount properties: success: type: boolean example: true modifiedCount: type: integer description: Number of notifications updated '401': description: Unauthorized — missing or invalid access token '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL /notifications/{id}/read: patch: tags: - Notifications summary: Mark a notification as read description: Marks a single notification as read when it belongs to the authenticated user. operationId: markInAppNotificationRead security: - bearerAuth: [] parameters: - name: id in: path required: true description: Notification document ID (MongoDB ObjectId) schema: type: string pattern: ^[a-fA-F0-9]{24}$ responses: '200': description: Notification updated content: application/json: schema: type: object required: - notification properties: notification: $ref: '#/components/schemas/InAppNotification' '400': description: Invalid user or notification id '401': description: Unauthorized — missing or invalid access token '404': description: Notification not found '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL /notifications/{id}/unread: patch: tags: - Notifications summary: Mark a notification as unread description: Marks a single notification as unread when it belongs to the authenticated user. operationId: markInAppNotificationUnread security: - bearerAuth: [] parameters: - name: id in: path required: true description: Notification document ID (MongoDB ObjectId) schema: type: string pattern: ^[a-fA-F0-9]{24}$ responses: '200': description: Notification updated content: application/json: schema: type: object required: - notification properties: notification: $ref: '#/components/schemas/InAppNotification' '400': description: Invalid user or notification id '401': description: Unauthorized — missing or invalid access token '404': description: Notification not found '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL /notifications/{id}/archive: patch: tags: - Notifications summary: Archive a notification description: 'Moves a single non-archived notification to `archived` status. Archived notifications are excluded from the default list query and counts but can be retrieved by passing `status=archived`.' operationId: archiveInAppNotification security: - bearerAuth: [] parameters: - name: id in: path required: true description: Notification document ID (MongoDB ObjectId) schema: type: string pattern: ^[a-fA-F0-9]{24}$ responses: '200': description: Notification archived content: application/json: schema: type: object required: - notification properties: notification: $ref: '#/components/schemas/InAppNotification' '400': description: Invalid user or notification id '401': description: Unauthorized — missing or invalid access token '404': description: Notification not found (or already archived) '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL /notifications/{id}/unarchive: patch: tags: - Notifications summary: Unarchive a notification description: 'Restores an archived notification to `read` status. Because the original pre-archive status is not stored, unarchived notifications always land in `read` rather than `unread`.' operationId: unarchiveInAppNotification security: - bearerAuth: [] parameters: - name: id in: path required: true description: Notification document ID (MongoDB ObjectId) schema: type: string pattern: ^[a-fA-F0-9]{24}$ responses: '200': description: Notification unarchived (status set to `read`) content: application/json: schema: type: object required: - notification properties: notification: $ref: '#/components/schemas/InAppNotification' '400': description: Invalid user or notification id '401': description: Unauthorized — missing or invalid access token '404': description: Notification not found or not currently archived '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL /notifications/{id}: delete: tags: - Notifications summary: Dismiss (soft-delete) a notification description: Soft-deletes the notification for the current user. operationId: dismissInAppNotification security: - bearerAuth: [] parameters: - name: id in: path required: true description: Notification document ID (MongoDB ObjectId) schema: type: string pattern: ^[a-fA-F0-9]{24}$ responses: '200': description: Notification dismissed content: application/json: schema: type: object required: - success properties: success: type: boolean example: true '400': description: Invalid user or notification id '401': description: Unauthorized — missing or invalid access token '404': description: Notification not found '429': description: Rate limit exceeded — global per-user/IP limiter content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorResponse' '500': description: Internal server error (e.g. MongoDB unavailable) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' servers: - url: '{instance_url}/api/v1' description: Base API URL variables: instance_url: default: https://app.pipeshub.com description: Base server URL (without /api/v1) - url: '{instance_url}' description: Root URL (used for MCP endpoints mounted at /mcp) variables: instance_url: default: https://app.pipeshub.com description: Base server URL components: schemas: InAppNotification: type: object description: 'A user notification record persisted by `NotificationConsumer` in MongoDB (`notification.schema.ts`). The document is scoped to a single user via `assignedTo` and expires automatically after 30 days (TTL index). ' required: - _id - orgId - type - status - assignedTo - isDeleted - createdAt - updatedAt properties: _id: type: string format: objectId description: MongoDB ObjectId of the notification document example: 507f1f77bcf86cd799439011 orgId: type: string format: objectId description: Organisation the notification belongs to example: 507f191e810c19729de860ea type: type: string description: 'Notification type discriminator. Connector-originated values include `CONNECTOR_AUTH_ERROR`, `CONNECTOR_SYNC_ERROR`, `CONNECTOR_WARNING`, `CONNECTOR_INFO`, `CONNECTOR_SUCCESS`, etc. ' example: CONNECTOR_SYNC_ERROR title: type: string description: Short human-readable heading example: 'S3: Bucket access denied' message: type: string description: Full notification body text example: The S3 connector could not access bucket 'my-bucket'. Check IAM permissions. severity: type: string enum: - info - warning - error - critical - success description: Visual severity level example: error status: type: string enum: - read - unread - archived default: unread description: Read/unread state of the notification for this user example: unread originService: type: string enum: - Connector Service - Indexing Service - AI Service - External Service description: Service that generated the notification example: Connector Service assignedTo: type: string format: objectId description: MongoDB ObjectId of the user this notification is assigned to example: 507f1f77bcf86cd799439011 redirectLink: type: string description: Optional deep-link URL the user should be sent to when clicking the notification example: /connectors/workspace/?connectorType=Gmail payload: type: object additionalProperties: true description: 'Arbitrary structured data attached by the originating service. Connector notifications typically include `connectorId`, `connectorName`, and `errorCode` keys. ' example: connectorId: conn-abc123 connectorName: S3 errorCode: FORBIDDEN isDeleted: type: boolean default: false description: Soft-delete flag; deleted notifications are excluded from all list queries deletedBy: type: string format: objectId description: ObjectId of the user who dismissed the notification (set on soft-delete) createdAt: type: string format: date-time description: ISO 8601 timestamp — documents are TTL-expired 30 days after this value updatedAt: type: string format: date-time ErrorResponse: type: object additionalProperties: false description: 'Standard error envelope returned by all errors routed through `ErrorMiddleware`. Applies to all `BaseError` subclasses including `HttpError`, `ValidationError`, and others. The `code` field is a machine-readable string identifying the error type (e.g. `HTTP_UNAUTHORIZED`, `HTTP_NOT_FOUND`, `VALIDATION_ERROR`, `INTERNAL_ERROR`). ' properties: error: type: object additionalProperties: false required: - code - message properties: requestId: type: string description: 'Identifier for this request, echoed so a bug report can quote it. Absent when the request never reached the middleware that assigns one. ' code: type: string description: 'Machine-readable error code. For application errors it takes the form `HTTP_` For unhandled runtime errors (e.g. database unavailable) it is `INTERNAL_ERROR`. ' example: HTTP_BAD_REQUEST message: type: string description: Human-readable description of the error example: Admin access required metadata: type: object description: Additional context (only present in development environments) additionalProperties: true required: - error RateLimitErrorResponse: type: object description: Rate-limit error payload (shape differs from standard error responses). properties: error: type: object properties: code: type: string description: Error code. message: type: string retryAfter: type: - integer - 'null' description: Suggested seconds to wait before retrying. required: - error securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'JWT Bearer token for authenticated requests. A personal access token (see the **Personal Access Tokens** tag) is a `phpat_`-prefixed variant of this same JWT — e.g. `phpat_eyJhbGci...`. The prefix is display-only, added for secret-scanner detectability; the gateway strips it before verifying the token, so send it exactly as issued, prefix included. ' scopedToken: type: http scheme: bearer bearerFormat: JWT description: 'Scoped JWT token for service-to-service authentication. Format: "Bearer {scoped_token}" Required scopes vary by endpoint. ' oauth2: type: oauth2 description: 'OAuth 2.0 authentication with fine-grained scopes. Supports authorization_code (with PKCE) and client_credentials flows. OAuth tokens are Bearer JWTs — use the same Authorization header as regular tokens. For **client_credentials**, machine JWTs may use `userId === client_id`; the Node gateway resolves the OAuth app creator — see **OAuth Provider** tag. ' flows: authorizationCode: authorizationUrl: /api/v1/oauth2/authorize tokenUrl: /api/v1/oauth2/token refreshUrl: /api/v1/oauth2/token scopes: openid: OpenID Connect authentication profile: User profile information email: User email address offline_access: Offline access (refresh tokens) org:read: Read organization information org:write: Update organization settings org:admin: Full organization administration user:read: Read user profiles user:write: Update user profiles user:invite: Invite new users user:delete: Delete users usergroup:read: Read user groups usergroup:write: Create and manage user groups team:read: Read team information team:write: Create and manage teams kb:read: Read knowledge bases and records kb:write: Create and update knowledge bases kb:delete: Delete knowledge bases and records kb:upload: Upload files to knowledge bases semantic:read: Read semantic search results and history semantic:write: Execute semantic search semantic:delete: Delete semantic search history conversation:read: Read conversations conversation:write: Create and manage conversations conversation:chat: Send messages in conversations project:read: Read projects and their conversations project:write: Create and manage projects project:delete: Delete projects agent:read: Read AI agents agent:write: Create and manage AI agents agent:execute: Execute AI agents connector:read: Read connector configurations connector:write: Create and update connectors connector:sync: Trigger connector synchronization connector:delete: Delete connectors config:read: Read system configuration config:write: Update system configuration crawl:read: Read crawling jobs crawl:write: Create and manage crawling jobs crawl:delete: Delete crawling jobs clientCredentials: tokenUrl: /api/v1/oauth2/token scopes: openid: OpenID Connect authentication profile: User profile information email: User email address offline_access: Offline access (refresh tokens) org:read: Read organization information org:write: Update organization settings org:admin: Full organization administration user:read: Read user profiles user:write: Update user profiles user:invite: Invite new users user:delete: Delete users usergroup:read: Read user groups usergroup:write: Create and manage user groups team:read: Read team information team:write: Create and manage teams kb:read: Read knowledge bases and records kb:write: Create and update knowledge bases kb:delete: Delete knowledge bases and records kb:upload: Upload files to knowledge bases semantic:write: Execute semantic search semantic:read: Read semantic search results and history semantic:delete: Delete semantic search history conversation:read: Read conversations conversation:write: Create and manage conversations conversation:chat: Send messages in conversations project:read: Read projects and their conversations project:write: Create and manage projects project:delete: Delete projects agent:read: Read AI agents agent:write: Create and manage AI agents agent:execute: Execute AI agents connector:read: Read connector configurations connector:write: Create and update connectors connector:sync: Trigger connector synchronization connector:delete: Delete connectors config:read: Read system configuration config:write: Update system configuration crawl:read: Read crawling jobs crawl:write: Create and manage crawling jobs x-refined-from: - pipeshub-openapi.yaml - pipeshub-openapi.yml