Cogram Audit Log API
Read-only log of the emails and meetings Cogram deleted or redacted, and why.
Read-only log of the emails and meetings Cogram deleted or redacted, and why.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/cogram-com:cogram-com-audit-log-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cogram Audit Log API
description: 'API for integrating with Cogram. Every key is scoped to one organization.
- **Auth**: `Authorization: Bearer `. Admins mint keys in Organization
Settings → Integrations → API Keys.
- **Pagination**: `page` (1-indexed) + `page_size` (default 50, max 100); returns
`{"data": [...], "total": N, "page": N, "page_size": N}`. `total` = all matches.
- **Errors**: `{"error": "", "message": ""}`. Branch on `error`; `message`
wording may change.
- **Rate limit**: per key, 1000 req/min by default. `429` carries `Retry-After`,
`X-RateLimit-Limit`, `X-RateLimit-Remaining`.
- **Attribution**: optional `X-Forwarded-User` header (≤200 chars) names the end user
behind the call in Cogram''s audit trail.
See API documentation for guides and examples.'
version: v1
servers:
- url: /v1
tags:
- name: Audit Log
description: Read-only log of the emails and meetings Cogram deleted or redacted, and why.
paths:
/audit-log:
get:
tags:
- Audit Log
summary: List audit log entries
description: 'List what Cogram removed from the organization in a time window.
Each entry is one email or meeting that was deleted, or whose content was
redacted, with the reason and the user who triggered it. Entries never
carry content: an email is identified by its `internet_message_id`.
The window is half-open, `[occurred_from, occurred_to)`, so consecutive
windows neither overlap nor leave a gap. It may span at most 366 days; a
longer window returns 400. Entries are ordered by `occurred_at`, then `id`.
An entry''s `occurred_at` is when it was written; it becomes visible when
its deleting transaction commits, which can be later. Query windows that
ended at least 1 hour ago: then consecutive windows read every entry once.'
operationId: external_list_audit_log_route_audit_log_get
security:
- HTTPBearer: []
parameters:
- name: occurred_from
in: query
required: true
schema:
type: string
format: date-time
description: Inclusive lower bound on `occurred_at`. Must include a UTC offset (e.g. 2026-10-20T00:00:00Z). The window may span at most 366 days.
title: Occurred From
description: Inclusive lower bound on `occurred_at`. Must include a UTC offset (e.g. 2026-10-20T00:00:00Z). The window may span at most 366 days.
- name: occurred_to
in: query
required: true
schema:
type: string
format: date-time
description: Exclusive upper bound on `occurred_at`. Must include a UTC offset. The window may span at most 366 days.
title: Occurred To
description: Exclusive upper bound on `occurred_at`. Must include a UTC offset. The window may span at most 366 days.
- name: entity_type
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AuditEntityType'
- type: 'null'
title: Entity Type
- name: action
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AuditAction'
- type: 'null'
title: Action
- name: reason
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/AuditReason'
- type: 'null'
title: Reason
- name: page
in: query
required: false
schema:
type: integer
minimum: 1
description: Page number (1-indexed).
default: 1
title: Page
description: Page number (1-indexed).
- name: page_size
in: query
required: false
schema:
type: integer
maximum: 100
minimum: 1
default: 50
title: Page Size
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AuditLogListV1'
'400':
description: Bad request
content:
application/json:
example:
error: bad_request
message: Invalid request
schema:
$ref: '#/components/schemas/ErrorV1'
'401':
description: Unauthorized
content:
application/json:
example:
error: api_key_invalid
message: Invalid API key
schema:
$ref: '#/components/schemas/ErrorV1'
'422':
description: Validation error
content:
application/json:
example:
error: validation_error
message: 'body -> name: Field required'
schema:
$ref: '#/components/schemas/ErrorV1'
'429':
description: Rate limit exceeded
content:
application/json:
example:
error: rate_limit_exceeded
message: Rate limit exceeded. Please try again later.
schema:
$ref: '#/components/schemas/ErrorV1'
'500':
description: Internal server error
content:
application/json:
example:
error: internal_error
message: An internal error occurred
schema:
$ref: '#/components/schemas/ErrorV1'
components:
schemas:
AuditEntityType:
type: string
enum:
- EMAIL
- MEETING
title: AuditEntityType
description: The kind of record an audit row is about.
EmailAuditContextV1:
properties:
internet_message_id:
type: string
title: Internet Message Id
description: The email's RFC 5322 Message-ID. Match it against your mail server or archive.
sent_at:
type: string
format: date-time
title: Sent At
retention_class:
anyOf:
- $ref: '#/components/schemas/RetentionClass'
- type: 'null'
description: The email's retention class, or null when the organization uses no email retention ruleset.
ruleset:
anyOf:
- type: string
- type: 'null'
title: Ruleset
description: The email retention ruleset the organization used when the email was removed, or null.
type: object
required:
- internet_message_id
- sent_at
- retention_class
- ruleset
title: EmailAuditContext
description: What identifies a removed email outside Cogram. Never any content.
AuditLogListV1:
properties:
data:
items:
$ref: '#/components/schemas/AuditLogEntryV1'
type: array
title: Data
total:
type: integer
title: Total
description: Total matches across all pages, not just this page.
page:
type: integer
title: Page
page_size:
type: integer
title: Page Size
type: object
required:
- data
- total
- page
- page_size
title: AuditLogListV1
description: Paginated audit log response.
AuditLogEntryV1:
properties:
id:
type: integer
title: Id
description: Unique, increasing in the order the entries were written. Breaks ties between entries with the same `occurred_at`.
organization_id:
type: string
title: Organization Id
entity_type:
$ref: '#/components/schemas/AuditEntityType'
description: 'The kind of record: `EMAIL` or `MEETING`.'
entity_id:
type: string
title: Entity Id
description: The record's Cogram id. A deleted email no longer exists; a meeting whose content was redacted still does.
action:
$ref: '#/components/schemas/AuditAction'
description: '`DELETED`: the record is gone. `CONTENT_REDACTED`: its content is gone, and the record stays as a visible shell.'
reason:
$ref: '#/components/schemas/AuditReason'
description: Why it was removed.
project_id:
anyOf:
- type: string
- type: 'null'
title: Project Id
description: The project the record was in when it was removed.
actor_user_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Actor User Id
description: The user who triggered the removal; null for a system event.
occurred_at:
type: string
format: date-time
title: Occurred At
context:
anyOf:
- $ref: '#/components/schemas/EmailAuditContextV1'
- $ref: '#/components/schemas/MeetingAuditContextV1'
- type: 'null'
title: Context
description: 'Email rows: the email''s identifiers and retention facts. Meeting rows: the raw deletion reason for reason `OTHER`, otherwise null.'
type: object
required:
- id
- organization_id
- entity_type
- entity_id
- action
- reason
- project_id
- actor_user_id
- occurred_at
- context
title: AuditLogEntryV1
description: One record, or its content, that Cogram removed.
MeetingAuditContextV1:
properties:
meeting_deletion_reason:
type: string
title: Meeting Deletion Reason
description: The meeting's raw deletion reason, e.g. `CALENDAR_CANCELLATION`.
type: object
required:
- meeting_deletion_reason
title: MeetingAuditContext
description: Why the system deleted a meeting. Set only for reason `OTHER`.
AuditAction:
type: string
enum:
- DELETED
- CONTENT_REDACTED
title: AuditAction
description: What happened to the record.
ErrorCode:
type: string
enum:
- api_key_missing
- api_key_invalid_format
- api_key_invalid
- api_key_expired
- bad_request
- forbidden
- not_found
- method_not_allowed
- conflict
- validation_error
- rate_limit_exceeded
- internal_error
- range_too_large
- data_export_in_progress
title: ErrorCode
description: Error codes for external API v1.
RetentionClass:
type: string
enum:
- SHORT
- ARCHIVE
title: RetentionClass
description: 'The retention class an email retention ruleset gives an email. The
ruleset maps each class to a duration; an email without a class
(NULL) never expires.'
AuditReason:
type: string
enum:
- USER_DELETE
- BULK_UNFILE
- DUPLICATE_REMOVED
- PROJECT_DELETED
- MANUAL_PURGE
- RETENTION_EXPIRY
- USER_OFFBOARDED
- OTHER
title: AuditReason
description: Why the record or its content was removed.
ErrorV1:
properties:
error:
$ref: '#/components/schemas/ErrorCode'
description: Stable machine-readable code. Branch on this.
message:
type: string
title: Message
description: Human-readable detail. Wording may change.
type: object
required:
- error
- message
title: ErrorV1
description: 'JSON body format for all API v1 error responses.
This model controls the actual serialization of error responses:
{"error": "not_found", "message": "Project ''xyz'' not found"}'
securitySchemes:
HTTPBearer:
type: http
description: Organization API key. Minted by admins in Organization Settings → Integrations → API Keys; shown once, may carry an expiry.
scheme: bearer
bearerFormat: Cogram organization API key