Events record what happened in a project: uploads, moderation decisions (automated or by a reviewer), regional restrictions, hash-list matches, review requests, removed content, processing failures, deleted and retried assets, usage, spend and upload preset limits, team changes, API keys and connectors turned off after failing deliveries.
Guide: Webhooks, which push the same events to you as they happen.
Reading the feed
Events are returned oldest first, and an event stored a moment after newer ones is still returned on a later page. Call without cursor to receive no events and a nextCursor for the current time. Pass a saved cursor as cursor to receive newer events, then save the response’s nextCursor to resume. Keep requesting while hasMore is true; when it is false, wait before polling again. Unlike other lists, nextCursor is never null.
To receive only some events, pass types, a comma-separated list such as asset.blocked,asset.purged, or assetId to follow one asset's events. A cursor belongs to the filters it was issued with: request the first cursor with the filters you want and pass the same filters with each later request. A cursor used with other filters returns 400cursor/invalid.
The feed includes only the event types your key has permission to see. Every response lists the others in excludedTypes, so you can tell an event that never happened from one the key can't receive; see Roles for what each role receives.
Feed and webhook shape
The events feed and webhooks send each event in the same shape, so one parser handles both. See Webhook payload for every field.
Use the event ID to deduplicate deliveries. The asset snapshot records the moderation status when the event happened, and actor says who caused the event: a user (a person in the portal, or an assistant acting for one), an api-key, automated moderation or CalmLens itself (system), with the user's or API key's ID in id.
Events caused by one batch operation (POST/projects/:projectId/assets/batch) carry its batchId as their batch-id fact, so you can tell which deletions or removals it made.
Events can arrive out of order: a retried webhook delivery can follow a later event, and the feed can return an event stored a moment late after newer ones. To apply each asset's events in order, store the last assetSequence you applied for each asset and ignore an event with a lower one.
Who sees which events
Each event type needs a project permission, listed in the event types table below. The events feed returns only the types the caller's API key or role has that permission for. A key or member who can view assets only in some folders gets the asset events about assets in those folders, judged by where each asset is now; events about deleted assets are left out for them. The feed, webhooks, Slack and email also leave out facts that hold personal or account data, such as names, email addresses and the organisation's ID; the portal still shows them. The event facts table marks these facts. See Personal and account data.
When the event was created, in milliseconds since the Unix epoch
descriptionstring (optional)
Longer human-readable explanation
assetIdstring (optional)
ID of the asset the event is about, for asset events
assetSequencenumber (optional)
The event's place among the events about its asset: it increases with each later event about the same asset. Deliveries can arrive out of order, so store the highest assetSequence you have processed for each asset and ignore an event with a lower one. Null for events that aren't about an asset.
assetobject (optional)
Snapshot of the asset's moderation decision when the event was created, for asset events
The asset was limited: it is delivered normally, but marked so your app can reduce its reach, such as keeping it out of recommendations, trending and notifications, ranking it lower or collapsing it.
The asset was age-restricted: it is not served from its plain URL, only with viewerClaims.ageConfirmed: true and any required private-asset access, so your app decides who sees it.
Long audio or video analysed in sections finished more of them. Sent every tenth of its sections or 30 seconds, whichever comes first, while it is processing.
Moderation of a decided asset was requested again under the project's current policy. The event's actor made the request. The asset keeps its decision until the re-run's asset.classified event and status event report the new one; if the re-run fails, it keeps it.
Deliveries to a connector kept failing, so it was turned off.
Event facts
A fact's url, when present, is a stable link that opens its item in the CalmLens portal, such as https://calmlens.com/go/asset/<asset-id>. It keeps working when portal pages move, and opens for anyone signed in with access to the item.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. file-format: The uploaded file's format, such as jpg.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. flagged-categories: The parent policy categories whose findings decided the status, or none when nothing was acted on. Inspect the asset's classification results for qualifier detail. moderation-status: The asset's status once classification finished: allowed, limited, age-restricted, blocked or purged. Usually the status the policy decided; when a reviewer decided the asset while it was being processed, their decision stands and this is their status. automated-status: Present only when a reviewer decided the asset while it was being processed: the status the policy decided, which was not applied. The report and scores are still stored with the asset.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. region: Jurisdiction whose mandatory rule raises the delivery action. rule: Stable mandatory rule key. status: The asset's status for viewers in the region: limited, age-restricted, blocked or purged.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. flagged-categories: The parent policy categories whose findings decided the status, or none when nothing was acted on. Inspect the asset's classification results for qualifier detail. reviewer-name: Name or email of the user who made the decision, or the API key's name, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed. note: The reviewer's note, or null. child-asset: Present when a reviewer's decision on one of this asset's child assets changed this asset's status: the ID of that child. The event's actor is that reviewer. child-status: Present with child-asset: the status the reviewer gave that child, such as blocked.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. flagged-categories: The parent policy categories whose findings decided the status, or none when nothing was acted on. Inspect the asset's classification results for qualifier detail. reviewer-name: Name or email of the user who made the decision, or the API key's name, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed. note: The reviewer's note, or null. child-asset: Present when a reviewer's decision on one of this asset's child assets changed this asset's status: the ID of that child. The event's actor is that reviewer. child-status: Present with child-asset: the status the reviewer gave that child, such as blocked.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. flagged-categories: The parent policy categories whose findings decided the status, or none when nothing was acted on. Inspect the asset's classification results for qualifier detail. reviewer-name: Name or email of the user who made the decision, or the API key's name, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed. note: The reviewer's note, or null. child-asset: Present when a reviewer's decision on one of this asset's child assets changed this asset's status: the ID of that child. The event's actor is that reviewer. child-status: Present with child-asset: the status the reviewer gave that child, such as blocked.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. flagged-categories: The parent policy categories whose findings decided the status, or none when nothing was acted on. Inspect the asset's classification results for qualifier detail. reviewer-name: Name or email of the user who made the decision, or the API key's name, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed. note: The reviewer's note, or null. child-asset: Present when a reviewer's decision on one of this asset's child assets changed this asset's status: the ID of that child. The event's actor is that reviewer. child-status: Present with child-asset: the status the reviewer gave that child, such as blocked.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. flagged-categories: The parent policy categories whose findings decided the status, or none when nothing was acted on. Inspect the asset's classification results for qualifier detail. reviewer-name: Name or email of the user who made the decision, or the API key's name, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed. note: The reviewer's note, or null. child-asset: Present when a reviewer's decision on one of this asset's child assets changed this asset's status: the ID of that child. The event's actor is that reviewer. child-status: Present with child-asset: the status the reviewer gave that child, such as blocked.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. previous-status: The asset's processing status before it failed, such as processing. failure-reason: Why processing failed, as in the asset's classification.failureReason, such as duration-limit.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. completed-sections: Sections analysed so far, as in the asset's classification.progress.completedSections. total-sections: Sections the media is analysed in, as in classification.progress.totalSections.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. batch-id: ID of the batch operation that caused the event, as batchId in the batch response. Absent when the asset was changed on its own.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. batch-id: ID of the batch operation that caused the event, as batchId in the batch response. Absent when the asset was changed on its own.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. moderation-status: The asset's status when the re-run was requested, which stands until the re-run decides it again: allowed, limited, age-restricted or blocked.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. automated-status: The asset's status from automated moderation: allowed, limited, age-restricted or blocked. review-reason: Why the asset was queued: sampled by the project's random sample, or uncertain because a category's policy score was close to the threshold or evidence could not be assessed. An asset the sample draws is sampled even when it is also uncertain. uncertain-categories: The parent policy categories whose decision was uncertain under the project's review settings, or none.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. hash-list-id: ID of the hash list with the closest match. hash-list-name: Name of the hash list with the closest match. distance: Number of bits that differ between the image's PDQ hash and the listed hash. 0 is the same picture. match-action: What the match did: block blocked the asset, flag only reported it.
asset-name: The asset's name when the event was created. asset-type: The asset's type, such as image or video. parent-asset: ID of the uploaded asset this one was extracted from, such as the text or an image of a document, as in the asset's parentId. Absent for uploaded assets. link-verdict: What the link's destination is: adult, gambling, phishing, malware, unresolved when a short link or redirect chain could not be followed or a check failed, or safe when only the off-platform setting acted. The most severe verdict of any address on the way decides. link-url: The link as it appears in the asset. link-final-url: Where the link leads after its redirects. Absent when a short link or redirect chain could not be followed. link-status: The status the policy's link-safety settings decided for the asset: limited, age-restricted or blocked.
limit: Number of free uploads in the allowance. used: Number of free uploads used. organisation-id: ID of the organisation whose allowance was used. Portal only: left out of webhook, Slack and email deliveries and the public events feed.
reason: Which limit paused uploads: the organisation's spend-limit, its usage-cap, the project's project-budget, or payment-failed while an invoice is unpaid. resumes-at: When uploads resume at the latest, in milliseconds since the Unix epoch: the end of the billing period, or sooner if the limit is raised. Null while an invoice is unpaid: uploads resume once it is paid.
member-user-id: User ID of the new member. member-name: The new member's name or email. Portal only: left out of webhook, Slack and email deliveries and the public events feed. role: The member's role: admin, editor, viewer or custom.
member-user-id: User ID of the member. member-name: The member's name or email. Portal only: left out of webhook, Slack and email deliveries and the public events feed. role: The role the member held.
member-user-id: User ID of the member. member-name: The member's name or email. Portal only: left out of webhook, Slack and email deliveries and the public events feed. role: The role the member held.
member-user-id: User ID of the member. member-name: The member's name or email. Portal only: left out of webhook, Slack and email deliveries and the public events feed. previous-role: The member's role before the change. role: The member's role after the change; custom roles may have changed permissions.
invitee-email: The email address that was invited. Portal only: left out of webhook, Slack and email deliveries and the public events feed. role: The role the invitation grants.
previous-organisation-id: ID of the organisation the project left. previous-organisation-name: Name of the organisation the project left. organisation-id: ID of the organisation that now owns the project. organisation-name: Name of the organisation that now owns the project. method: handover when an owner of the receiving organisation accepted it from another organisation, move when someone who owns both moved it. api-keys-revoked: Number of the project's API keys revoked by a handover. connectors-paused: Number of the project's webhooks and other connectors paused by a handover.
key-id: ID of the API key. key-name: The API key's name. role: The access the key was created with: admin, editor, viewer or custom. created-by-name: Name or email of the person who created the key, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed.
key-id: ID of the API key. key-name: The API key's name. revoked-by-name: Name or email of the person who revoked the key, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed.
key-id: ID of the API key. key-name: The API key's name. deleted-by-name: Name or email of the person who deleted the key, when known. Portal only: left out of webhook, Slack and email deliveries and the public events feed.
connector-id: ID of the connector that was turned off. connector-name: The connector's name. connector-type: The connector's type, such as webhook, slack or email. consecutive-failures: Number of deliveries in a row that failed after their retries. last-error: Summary of the most recent failure, or null. Portal only: left out of webhook, Slack and email deliveries and the public events feed.
Endpoint details
List Events
List project events, oldest first, after a cursor. Webhook connectors deliver each event in the same shape. Each event's `facts` are `{ key, value, url? }` entries registered for its `type` (see the event types in the webhooks guide). Omit `cursor` to get a cursor for the current time without any events, then pass each response's `nextCursor` as `cursor`. When `hasMore` is false you have caught up; keep the cursor to poll for later events. Filter by `types` or `assetId` to receive only some events; a cursor belongs to its filters, and one used with other filters returns `cursor/invalid`. Polling receives new events without a public webhook URL, for example during local development.
Pass as cursor for the next request. Unlike other lists it is never null: keep it to receive later events.
hasMore*boolean
excludedTypes[]*ExcludedTypesEnum[]
Event types this feed never includes, because the API key lacks the permission to see them. Give the key that permission to receive them.
Error Codes
401api-key/missing
Authentication required. Send your project API key in the X-Api-Key header.
401api-key/invalid
The API key is invalid, revoked or expired. Create a key under Developer → API Keys.
403api-key/project-mismatch
This API key belongs to a different project. Use a key created for the project that owns this resource.
403auth/permission-denied
This API key lacks a permission the request needs (details.permission names it, such as assets:download for an asset's folder), or the resource belongs to another project.
400validation/invalid-request
The request's parameters, query or body are invalid. details.issues lists each problem, with its path and issue code.
404project/not-found
Project not found
400cursor/invalid
The cursor is invalid or belongs to a different query.
500server/internal-error
An internal error occurred. Retry later, and quote requestId to support.
Last updated
Signing in
Signing out
Cookies on CalmLens
We use essential cookies for sign-in and security. With your permission, functional cookies remember your preferences and Google Analytics measures website use and signups. Optional ad measurement cookies link Google ad clicks to signups. Personalised advertising stays off. Manage cookies