MobilityData Notifications API
Read-only views of the notification system: queued events, delivery logs, user subscriptions, and the API announcements sync with Brevo.
Read-only views of the notification system: queued events, delivery logs, user subscriptions, and the API announcements sync with Brevo.
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/mobilitydata:mobilitydata-notifications-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:
version: 1.0.0
title: Mobility Database Catalog Operations Notifications API
description: 'API for the Mobility Database Catalog Operations. See https://mobilitydatabase.org/.
This API was designed for internal use and is not intended to be used by the general public.
The Mobility Database Operation API uses Auth2.0 authentication.'
termsOfService: https://mobilitydatabase.org/terms-and-conditions
contact:
name: MobilityData
url: https://mobilitydata.org/
email: api@mobilitydata.org
license:
name: MobilityData License
url: https://www.apache.org/licenses/LICENSE-2.0
security:
- ApiKeyAuth: []
tags:
- name: Notifications
description: 'Read-only views of the notification system: queued events, delivery logs, user subscriptions, and the API announcements sync with Brevo.'
paths:
/v1/operations/notifications/events:
get:
summary: List notification events
description: Returns a paginated list of notification events, newest first. Events are the queued facts the dispatcher turns into emails (e.g. a feed URL change); use `GET /v1/operations/notifications/events/{id}` to see who they were delivered to.
operationId: listNotificationEvents
tags:
- Notifications
security:
- ApiKeyAuth: []
parameters:
- name: notification_type_id
in: query
required: false
schema:
type: string
description: Only events of this notification type, e.g. `feed.url_updated`.
- name: event_subtype
in: query
required: false
schema:
type: string
description: Only events of this subtype, e.g. `url_replaced` or `feed_redirected`.
- name: source
in: query
required: false
schema:
type: string
description: Only events emitted by this process, e.g. `operations_api` or `tdg_import`.
- name: feed_stable_id
in: query
required: false
schema:
type: string
description: Only events that reference this feed, in any role (subject or target).
- $ref: '#/components/parameters/notifications_created_after_param'
- $ref: '#/components/parameters/notifications_created_before_param'
- $ref: '#/components/parameters/notifications_limit_param'
- $ref: '#/components/parameters/notifications_offset_param'
responses:
'200':
description: Paginated list of notification events.
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationEventList'
'401':
description: Unauthorized.
/v1/operations/notifications/events/{id}:
get:
summary: Get a notification event
description: Returns one notification event with its feeds and every delivery log written for it.
operationId: getNotificationEvent
tags:
- Notifications
security:
- ApiKeyAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
description: The notification event ID.
responses:
'200':
description: The notification event with its delivery logs.
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationEventDetail'
'401':
description: Unauthorized.
'404':
description: Notification event not found.
/v1/operations/notifications/events:test:
post:
summary: Create a test notification event
description: 'Creates a `feed.url_updated` event (`url_replaced` or `feed_redirected`) for an existing feed without changing the feed. The event is tagged `source=operations_test` and is only delivered to the users in `recipient_user_ids`, and only through their own `feed.url_updated` subscriptions: a recipient subscribed to specific feeds gets it only when the event references one of them. Start a dispatch run with `POST /v1/operations/notifications/dispatch` to deliver it.'
operationId: createTestNotificationEvent
tags:
- Notifications
security:
- ApiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationTestEventRequest'
responses:
'201':
description: The test event that was created.
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationEvent'
'400':
description: Invalid request, e.g. unknown recipients or a redirect without a target feed.
'401':
description: Unauthorized.
'404':
description: Feed not found.
/v1/operations/notifications/dispatch:
post:
summary: Start a notification dispatch run
description: 'Starts the `notifications_dispatch_batch` task the daily scheduler runs, with the given options, and returns the run it started for each resolved cadence. The task enqueues one worker per subscription and returns straight away; follow a run with `GET /v1/operations/notifications/dispatch/{run_id}`. With `dry_run` nothing is enqueued: the response gives the planned subscription count and a preview of the events each subscription would be sent.'
operationId: startNotificationDispatch
tags:
- Notifications
security:
- ApiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationDispatchRequest'
responses:
'200':
description: The runs that were started (or planned, for a dry run).
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationDispatchStart'
'400':
description: Invalid request.
'401':
description: Unauthorized.
'502':
description: The dispatch task could not be started.
/v1/operations/notifications/dispatch/{run_id}:
get:
summary: Get a notification dispatch run
description: Returns a dispatch run's status, its worker counts and the delivery stats summed across its workers.
operationId: getNotificationDispatchRun
tags:
- Notifications
security:
- ApiKeyAuth: []
parameters:
- name: run_id
in: path
required: true
schema:
type: string
description: The run ID returned when the run was started.
responses:
'200':
description: The dispatch run.
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationDispatchRun'
'401':
description: Unauthorized.
'404':
description: Dispatch run not found.
/v1/operations/notifications/logs:
get:
summary: List notification delivery logs
description: Returns a paginated list of delivery logs (one row per event, subscription and channel), most recent first. There is no dispatch run ID on a log row; to inspect one run, filter by the run's time window with `sent_after` / `sent_before`.
operationId: listNotificationLogs
tags:
- Notifications
security:
- ApiKeyAuth: []
parameters:
- name: status
in: query
required: false
schema:
type: string
enum:
- pending
- sent
- failed
- permanently_failed
description: Only logs with this delivery status.
- name: subscription_id
in: query
required: false
schema:
type: string
description: Only logs for this subscription.
- name: user_id
in: query
required: false
schema:
type: string
description: Only logs for subscriptions owned by this user.
- name: notification_event_id
in: query
required: false
schema:
type: string
description: Only logs for this notification event.
- name: notification_type_id
in: query
required: false
schema:
type: string
description: Only logs for subscriptions of this notification type.
- name: sent_after
in: query
required: false
schema:
type: string
format: date-time
description: Only logs whose last attempt is at or after this time.
- name: sent_before
in: query
required: false
schema:
type: string
format: date-time
description: Only logs whose last attempt is before this time.
- $ref: '#/components/parameters/notifications_limit_param'
- $ref: '#/components/parameters/notifications_offset_param'
responses:
'200':
description: Paginated list of delivery logs.
content:
application/json:
schema:
$ref: '#/components/schemas/OperationNotificationLogList'
'401':
description: Unauthorized.
/v1/operations/users/{user_id}/subscriptions:
get:
summary: List a user's notification subscriptions
description: Returns every notification subscription the user holds, active or paused.
operationId: getOperationsUserSubscriptions
tags:
- Notifications
security:
- ApiKeyAuth: []
parameters:
- name: user_id
in: path
required: true
schema:
type: string
description: The user's ID.
responses:
'200':
description: The user's subscriptions.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OperationNotificationSubscription'
'401':
description: Unauthorized.
'404':
description: User not found.
/v1/operations/users/{user_id}/brevo-sync:
get:
summary: Check a user's API announcements sync with Brevo
description: 'Compares the two places an `api.announcements` opt-in lives: the `notification_subscription` row and the Brevo contact (list membership and its `MDB_SUBSCRIPTION_ID` attribute). Read-only: it reports any mismatch in `issues` and never repairs it. Makes one live call to Brevo.'
operationId: getOperationsUserBrevoSync
tags:
- Notifications
security:
- ApiKeyAuth: []
parameters:
- name: user_id
in: path
required: true
schema:
type: string
description: The user's ID.
responses:
'200':
description: The sync status for the user.
content:
application/json:
schema:
$ref: '#/components/schemas/OperationBrevoSyncStatus'
'401':
description: Unauthorized.
'404':
description: User not found.
'502':
description: Brevo could not be reached or returned an error.
components:
schemas:
OperationBrevoSyncStatus:
x-operation: true
type: object
required:
- user_id
- email
- brevo
- in_sync
- issues
properties:
user_id:
type: string
description: The user's ID.
email:
type: string
format: email
description: The user's email address, used to look up the Brevo contact.
subscription_id:
type:
- string
- 'null'
description: The user's `api.announcements` subscription ID, or null when there is no row.
subscription_active:
type:
- boolean
- 'null'
description: Whether that subscription is active, or null when there is no row.
brevo:
$ref: '#/components/schemas/OperationBrevoContactState'
in_sync:
type: boolean
description: True when the subscription row and Brevo agree.
issues:
type: array
description: One human-readable line per mismatch. Empty when `in_sync` is true.
items:
type: string
default: []
OperationNotificationDispatchPreviewEvent:
x-operation: true
type: object
required:
- id
- notification_type_id
- event_subtype
- feed_stable_ids
properties:
id:
type: string
description: The notification event ID.
notification_type_id:
type: string
description: The event's notification type.
event_subtype:
type: string
description: The event's subtype.
example: url_replaced
source:
type:
- string
- 'null'
description: The process that emitted the event, e.g. `operations_test` for test events.
created_at:
type:
- string
- 'null'
format: date-time
description: When the event was created.
feed_stable_ids:
type: array
description: The feeds the event references.
items:
type: string
OperationNotificationDispatchPreview:
x-operation: true
type: object
required:
- subscription_id
- user_id
- notification_type_id
- cadence
- events
properties:
subscription_id:
type: string
description: The subscription ID.
user_id:
type: string
description: The subscriber's user ID.
email:
type:
- string
- 'null'
description: The subscriber's email address.
notification_type_id:
type: string
description: The subscription's notification type.
example: feed.url_updated
cadence:
type: string
description: The subscription's cadence.
example: daily
events:
type: array
description: The events a real run would send this subscription. Empty when nothing is pending.
items:
$ref: '#/components/schemas/OperationNotificationDispatchPreviewEvent'
OperationNotificationEvent:
x-operation: true
type: object
required:
- id
- notification_type_id
- event_subtype
- created_at
properties:
id:
type: string
description: The notification event ID.
example: 6f1c2b9e-7d3a-4c51-9a0e-2f8b4d6c1a77
notification_type_id:
type: string
description: The notification type of the event.
example: feed.url_updated
event_subtype:
type: string
description: The subtype within the notification type.
example: url_replaced
source:
type:
- string
- 'null'
description: The process that emitted the event.
example: operations_api
payload:
type:
- object
- 'null'
additionalProperties: true
description: Type-specific event data, e.g. `old_url` and `new_url` for `feed.url_updated`.
created_at:
type: string
format: date-time
description: When the event was created.
feeds:
type: array
description: The feeds the event references.
items:
$ref: '#/components/schemas/OperationNotificationEventFeed'
default: []
OperationNotificationDispatchRequest:
x-operation: true
type: object
properties:
cadence:
type: string
enum:
- scheduled
- immediate
- daily
- weekly
- all
default: scheduled
description: 'Which subscriptions to process. `scheduled` is what the daily scheduler sends: daily subscriptions, plus weekly ones on the configured weekday. `all` ignores cadence.
'
user_ids:
type: array
description: Only process these users' subscriptions.
items:
type: string
default: []
dry_run:
type: boolean
default: true
description: 'Only count the subscriptions that would be processed and preview what each would be sent; enqueue nothing. Defaults to true so a request sends emails only when it sets `dry_run` to false.
'
force:
type: boolean
default: false
description: With `user_ids`, process those users' subscriptions whatever their cadence.
OperationNotificationDispatchRun:
x-operation: true
type: object
required:
- run_id
- status
- total
- triggered
- completed
- failed
- stats
properties:
run_id:
type: string
description: The run ID.
status:
type: string
description: '`in_progress` until the run''s monitor has seen every worker report (or the run''s deadline pass), then `completed`.
'
example: in_progress
cadence:
type:
- string
- 'null'
description: The cadence the run processes.
params:
type:
- object
- 'null'
additionalProperties: true
description: The options the run was started with.
created_at:
type:
- string
- 'null'
format: date-time
description: When the run was started.
total:
type: integer
description: Number of subscriptions in the run.
triggered:
type: integer
description: Workers enqueued that have not reported yet.
completed:
type: integer
description: Workers that finished.
failed:
type: integer
description: Workers that failed (Cloud Tasks retries them).
stats:
type: object
additionalProperties:
type: number
description: 'Delivery counts summed across the finished workers, e.g. `events_found`, `emails_sent`, `emails_failed`, `permanently_failed`.
'
OperationNotificationEventList:
x-operation: true
type: object
required:
- total
- offset
- limit
- events
properties:
total:
type: integer
description: Total number of events matching the filters, ignoring pagination.
offset:
type: integer
description: Number of items skipped for pagination.
limit:
type: integer
description: Maximum number of items returned.
events:
type: array
items:
$ref: '#/components/schemas/OperationNotificationEvent'
OperationNotificationLogList:
x-operation: true
type: object
required:
- total
- offset
- limit
- logs
properties:
total:
type: integer
description: Total number of logs matching the filters, ignoring pagination.
offset:
type: integer
description: Number of items skipped for pagination.
limit:
type: integer
description: Maximum number of items returned.
logs:
type: array
items:
$ref: '#/components/schemas/OperationNotificationLog'
OperationNotificationEventFeed:
x-operation: true
type: object
required:
- feed_stable_id
- role
properties:
feed_stable_id:
type: string
description: The stable ID of the feed.
example: mdb-1
role:
type: string
description: 'The role the feed plays in the event. `subject` is the feed the event is about; `target` is the destination feed of a redirect.
'
example: subject
OperationNotificationEventDetail:
x-operation: true
allOf:
- $ref: '#/components/schemas/OperationNotificationEvent'
- type: object
properties:
logs:
type: array
description: Every delivery log written for this event, most recent first.
items:
$ref: '#/components/schemas/OperationNotificationLog'
default: []
OperationBrevoContactState:
x-operation: true
type: object
required:
- status
- in_list
properties:
status:
type: string
enum:
- subscribed
- unsubscribed
- not_found
description: '`unsubscribed` when the contact is globally blacklisted or has unsubscribed from the announcements list; `not_found` when Brevo has no contact for the email. `subscribed` only means "exists and not unsubscribed": a contact that was never added to the announcements list is still `subscribed`, with `in_list` false.
'
in_list:
type: boolean
description: True when the contact is a member of the announcements list.
email_blacklisted:
type: boolean
description: True when the contact unsubscribed from every Brevo campaign.
list_unsubscribed:
type: boolean
description: True when the contact unsubscribed from the announcements list.
mdb_subscription_id:
type:
- string
- 'null'
description: The contact's `MDB_SUBSCRIPTION_ID` attribute.
OperationNotificationLog:
x-operation: true
type: object
required:
- id
- subscription_id
- channel
- status
- retry_count
- sent_at
properties:
id:
type: string
description: The delivery log ID.
notification_event_id:
type:
- string
- 'null'
description: The event that was delivered. Null only on legacy rows.
subscription_id:
type: string
description: The subscription the event was delivered to.
user_id:
type:
- string
- 'null'
description: The user who owns the subscription.
user_email:
type:
- string
- 'null'
description: The email of the user who owns the subscription.
notification_type_id:
type:
- string
- 'null'
description: The notification type of the subscription.
example: feed.url_updated
channel:
type: string
description: The delivery channel.
example: email
status:
type: string
description: The delivery status.
enum:
- pending
- sent
- failed
- permanently_failed
retry_count:
type: integer
description: How many delivery attempts have failed so far.
error_message:
type:
- string
- 'null'
description: The error of the last failed attempt.
sent_at:
type: string
format: date-time
description: When the last delivery attempt was made.
OperationNotificationTestEventRequest:
x-operation: true
type: object
required:
- feed_stable_id
- event_subtype
- recipient_user_ids
properties:
feed_stable_id:
type: string
description: The feed the event is about. It must exist and is not changed.
example: mdb-1
event_subtype:
type: string
enum:
- url_replaced
- feed_redirected
description: The `feed.url_updated` subtype to create.
target_feed_stable_id:
type: string
description: The feed the redirect points to. Required for `feed_redirected`.
example: mdb-2
old_url:
type: string
description: The previous URL shown in the email. Defaults to the feed's current producer URL.
new_url:
type: string
description: 'The new URL shown in the email. Defaults to the target feed''s producer URL for `feed_redirected`, and to a placeholder URL for `url_replaced`.
'
recipient_user_ids:
type: array
minItems: 1
description: The only users the event may be delivered to. Every ID must be an existing user.
items:
type: string
OperationNotificationDispatchPlannedRun:
x-operation: true
type: object
required:
- cadence
- run_id
- subscriptions
- enqueued
- dry_run
properties:
cadence:
type: string
description: The cadence this run processes.
example: daily
run_id:
type: string
description: The run ID. For a dry run nothing is recorded under it.
example: daily-20261103T090000
subscriptions:
type: integer
description: Number of subscriptions the run covers.
enqueued:
type: integer
description: Number of worker tasks enqueued.
dry_run:
type: boolean
description: Whether this was a dry run.
preview:
type: array
description: 'Dry runs only: what a real run would send each subscription, selected exactly as the dispatch workers select it. Lists at most the first 50 subscriptions; `subscriptions` gives the full count.
'
items:
$ref: '#/components/schemas/OperationNotificationDispatchPreview'
OperationNotificationSubscription:
x-operation: true
type: object
required:
- id
- notification_type_id
- active
- created_at
properties:
id:
type: string
description: The subscription ID (also the capability embedded in email unsubscribe links).
notification_type_id:
type: string
description: The notification type subscribed to.
example: feed.url_updated
active:
type: boolean
description: False when the subscription is paused (or, for `api.announcements`, opted out).
cadence:
type:
- string
- 'null'
description: How often pending events are delivered.
example: weekly
digest:
type:
- boolean
- 'null'
description: True to bundle a run's events into one email, false for one email per event.
feed_ids:
type: array
description: The feed stable IDs a feed-scoped subscription targets. Empty for other types.
items:
type: string
default: []
filter_params:
type:
- object
- 'null'
additionalProperties: true
description: The raw `filter_params` column, shown as stored.
created_at:
type: string
format: date-time
description: When the subscription was created.
active_since:
type:
- string
- 'null'
format: date-time
description: 'When the subscription last became active. Events created before this are never delivered to it.
'
OperationNotificationDispatchStart:
x-operation: true
type: object
required:
- runs
properties:
runs:
type: array
description: One run per resolved cadence.
items:
$ref: '#/components/schemas/OperationNotificationDispatchPlannedRun'
parameters:
notifications_offset_param:
x-operation: true
name: offset
in: query
description: Number of items to skip for pagination.
required: false
schema:
type: integer
default: 0
minimum: 0
notifications_limit_param:
x-operation: true
name: limit
in: query
description: Maximum number of items to return.
required: false
schema:
type: integer
default: 100
minimum: 1
maximum: 1000
notifications_created_before_param:
x-operation: true
name: created_before
in: query
description: Only items created before this time.
required: false
schema:
type: string
format: date-time
notifications_created_after_param:
x-operation: true
name: created_after
in: query
description: Only items created at or after this time.
required: false
schema:
type: string
format: date-time
securitySchemes:
ApiKeyAuth:
type: apiKey
name: x-api-key
in: header