openapi: 3.2.0 info: contact: email: hello@entergram.com name: Entergram description: Secure, workspace-scoped API for Entergram PRO. Use API keys created in Settings > Developers to access workspace metadata, accounts, contacts, groups, chats, custom fields, and tickets through a stable, documented contract. title: Entergram Public Events API version: v1 security: - ApiKeyAuth: [] tags: - description: Metadata-only, cursor-based workspace event stream for resumable integrations. name: Events paths: /v1/events: get: description: 'Returns metadata-only message events ordered by a monotonic cursor. Use `after` to resume without per-chat message calls. Required scope: `events.read`.' operationId: list-events parameters: - description: Return events with a cursor greater than this value. explode: false in: query name: after schema: default: 0 description: Return events with a cursor greater than this value. format: int64 minimum: 0 type: integer - explode: false in: query name: limit schema: default: 100 format: int64 maximum: 500 minimum: 1 type: integer - explode: false in: query name: direction schema: default: all enum: - all - incoming - outgoing - unknown type: string - description: Optional RFC3339 lower bound on event occurrence time. explode: false in: query name: updated_since schema: description: Optional RFC3339 lower bound on event occurrence time. type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/ListEventsOutputBody' description: OK default: content: application/problem+json: schema: $ref: '#/components/schemas/ErrorModel' description: Error summary: List resumable workspace events tags: - Events x-required-scopes: - events.read components: schemas: ErrorDetail: additionalProperties: false properties: location: description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id' type: string message: description: Error message text type: string value: description: The value at the given location type: object EventListResult: additionalProperties: false properties: hasMore: type: boolean items: items: $ref: '#/components/schemas/MessageEvent' type: - array - 'null' nextCursor: format: int64 type: integer required: - items - nextCursor - hasMore type: object MessageEvent: additionalProperties: false properties: chatId: type: string chatTitle: type: - string - 'null' connectedAccountId: type: string createdAt: format: date-time type: string cursor: description: Monotonic workspace event cursor used for resumable reads. examples: - 9182 format: int64 type: integer direction: enum: - incoming - outgoing - unknown type: string id: description: Stable event identifier. examples: - evt_4c08781ca4c14010a8d0cc942c99407e type: string isOut: description: Convenience direction flag; null when direction is unknown. type: - boolean - 'null' messageId: type: string occurredAt: format: date-time type: string senderId: type: - string - 'null' senderName: type: - string - 'null' type: description: Event type. examples: - message.created type: string workspaceId: type: string required: - cursor - id - type - workspaceId - connectedAccountId - chatId - messageId - occurredAt - direction - isOut - senderId - senderName - chatTitle - createdAt type: object ErrorModel: additionalProperties: false properties: detail: description: A human-readable explanation specific to this occurrence of the problem. examples: - Property foo is required but is missing. type: string errors: description: Optional list of individual error details items: $ref: '#/components/schemas/ErrorDetail' type: - array - 'null' instance: description: A URI reference that identifies the specific occurrence of the problem. examples: - https://example.com/error-log/abc123 format: uri type: string status: description: HTTP status code examples: - 400 format: int64 type: integer title: description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error. examples: - Bad Request type: string type: default: about:blank description: A URI reference to human-readable documentation for the error. examples: - https://example.com/errors/example format: uri type: string type: object ListEventsOutputBody: additionalProperties: false properties: data: $ref: '#/components/schemas/EventListResult' required: - data type: object securitySchemes: ApiKeyAuth: description: Workspace-scoped PRO API key created in Entergram Settings > Developers. in: header name: X-API-Key type: apiKey x-entergram-scopes: - workspace.read - members.read - accounts.read - contacts.read - chats.read - chats.write - messages.read - messages.write - custom_fields.read - custom_fields.write - tickets.read - tickets.write - events.read - webhooks.read - webhooks.write