Docs › GET STARTED › Introduction

Introduction

Welcome to the CLEAR API - your gateway to humanitarian intelligence.

The CLEAR API gives you programmatic access to signals, events, alerts, data sources, and geographic location data through a single GraphQL endpoint. Whether you’re building a monitoring dashboard, integrating alerts into your workflow, or analysing humanitarian patterns, this API has you covered.

Everything here is accessible via GraphQL at /graphql. You send a query describing exactly the data you want, and you get back precisely that — nothing more, nothing less.

What You Can Do

FeatureDescription
SignalsAccess raw data items collected from data sources, with location links and metadata.
EventsBrowse grouped signals forming coherent narratives, with location, population, and type data.
AlertsView events escalated for notification, delivered to subscribed users.
Data SourcesDiscover the external data feeds (ACLED, FEWS NET, social media monitors) that supply signals.
LocationsQuery a hierarchical geographic tree — countries, states, cities — with PostGIS geometry.
Disaster TypesLook up disaster classifications with GLIDE numbers.
Feature FlagsCheck runtime feature toggles to adapt your application’s behaviour.
API KeysCreate and manage personal API keys for server-to-server authentication.

Quick Start

Go from zero to your first API response in three steps.

1

Create an account

Head to the Developer Portal and sign up. It takes about ten seconds.

2

Generate an API key

In the portal, go to API Keys and create one. Copy it immediately — you won’t see it again.

3

Make your first query

Send a request with your key in the Authorization header:

curl -X POST https://api.clearinitiative.io/graphql \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ me { id email } }"}'

Want to explore interactively? Open the GraphQL Sandbox to browse the full schema, autocomplete queries, and test requests in your browser.

Authentication

Two ways to authenticate, depending on your use case.

API Keys (server-to-server)

Pass your key as a Bearer token in the Authorization header:

Authorization: Bearer sk_live_your_key_here
Never expose API keys in client-side code or version control. Store them in environment variables or a secrets manager.

Session Cookies (browser apps)

Sign in via the REST auth API. The session cookie is set automatically and sent with subsequent requests:

// Sign in
const res = await fetch('/api/auth/sign-in/email', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  credentials: 'include',
  body: JSON.stringify({ email: 'you@example.com', password: '...' }),
});

// Then query (cookie sent automatically)
const data = await fetch('/graphql', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  credentials: 'include',
  body: JSON.stringify({ query: '{ me { id email } }' }),
});

Queries

NameReturnsDescription
me User Returns the currently authenticated user, or null if not signed in.
users [User!]! List all users.
user User Look up a user by ID.
id: String!
alerts [Alert!]! List alerts. Requires authentication. Admins may omit teamId to list all; non-admins must provide a teamId for a team they belong to.
status: AlertStatusteamId: StringincludeDummy: Boolean
alert Alert Look up an alert by ID. Requires authentication. Non-admins can only access alerts within their team scope.
id: String!
signals [Signal!]! List signals. Requires authentication. includeDummy defaults to false.
teamId: StringincludeDummy: Boolean
signal Signal Look up a signal by ID. Requires authentication. Non-admins can only access signals within their team scope.
id: String!
signalsByLocation [Signal!]! List signals by location. Returns all signals whose origin, destination, or general location is within the given location (including descendants).
locationId: String!
events [Event!]! List events. Requires authentication. includeDummy defaults to false.
teamId: StringincludeDummy: Boolean
event Event Look up an event by ID. Requires authentication. Non-admins can only access events within their team scope.
id: String!
eventsByLocation [Event!]! List events by location. Returns all events whose origin, destination, or general location is within the given location (including descendants).
locationId: String!
alertsByLocation [Alert!]! List alerts by location. Returns all alerts whose event's location is within the given location (including descendants).
locationId: String!status: AlertStatus
dataSources [DataSource!]! List all data sources.
dataSource DataSource Look up a data source by ID.
id: String!
locations [Location!]! List locations, optionally filtered by hierarchy level (0 = country, 1 = state, etc.).
level: Int
location Location Look up a location by ID.
id: String!
notifications [Notification!]! List notifications, optionally filtered by status.
status: NotificationStatus
notification Notification Look up a notification by ID.
id: String!
featureFlags [FeatureFlag!]! List all feature flags.
featureFlag FeatureFlag Look up a feature flag by its unique key.
key: String!
disasterTypes [DisasterType!]! List all disaster type classifications (flat list of level-3 rows).
disasterType DisasterType Look up a disaster type by ID.
id: String!
disasterTypeHierarchy [DisasterLevel1!]! List disaster types grouped into the 3-level hierarchy (level1 > level2 > level3).
locationMetadata [LocationMetadata!]! List metadata entries for a location, optionally filtered by type. By default only the CURRENT value is returned (validTo is null). Pass current: false to include the full history.
locationId: String!type: Stringcurrent: Boolean
allLocationMetadata [LocationMetadata!]! List every locationMetadata entry of a given type across all locations. By default only current values. Pass current: false for the full history.
type: String!current: Boolean
locationMetadataHistory [LocationMetadata!]! History of a (location, type) pair — newest first. Includes the current row plus every superseded one.
locationId: String!type: String!
myApiKeys [ApiKey!]! List all API keys belonging to the authenticated user. Requires authentication.
myOrganisations [Organisation!]! List organisations the authenticated user belongs to.
organisation Organisation Look up an organisation by ID. Requires membership or global admin.
id: String!
myTeams [Team!]! List teams the authenticated user belongs to.
team Team Look up a team by ID. Requires membership or global admin.
id: String!
pendingInvites [Invitation!]! List pending invitations for an organisation. Requires org admin.
organisationId: String!
invitationByToken InvitationInfo Look up an invitation by token (public — used on accept-invite page).
token: String!
myAlertSubscriptions [AlertSubscription!]! List the authenticated user's alert subscriptions.
alertSubscriptionsByLocation [AlertSubscription!]! List all alert subscriptions for a location (admin only).
locationId: String!
crises [Crisis!]! List all crises.
crisis Crisis Look up a crisis by ID.
id: String!

Mutations

NameReturnsDescription
createApiKey CreateApiKeyPayload! Create a new API key for the authenticated user.
input: CreateApiKeyInput!
revokeApiKey ApiKey! Revoke an API key by ID. Only the key owner or an admin can revoke.
id: String!
requestEmailVerification Boolean! Request an email verification link for the authenticated user.
verifyEmail Boolean! Verify email using a token from the verification link.
token: String!
updateProfile User! Update the authenticated user's profile and notification preferences.
input: UpdateProfileInput!
createAlert Alert! Create an alert from an event, notifying subscribers.
input: CreateAlertInput!
updateAlert Alert! Update an existing alert.
id: String!input: UpdateAlertInput!
deleteAlert Boolean! Delete an alert.
id: String!
archiveStaleAlerts ArchiveStaleAlertsResult! Archive published alerts whose event.lastSignalCreatedAt is older than olderThanDays (default: 14). Sets alerts.status to 'archived'. Admin or pipeline only. Returns the number of rows affected.
olderThanDays: Int
createSignal Signal! Create a signal from a data source.
input: CreateSignalInput!
createManualSignal Signal! Create a manual signal from a field officer, partner, or government source. Persists the signal and sends it to the pipeline for event grouping and auto-escalation.
input: CreateManualSignalInput!
updateSignalSeverity Signal! Update a signal's severity score.
id: String!severity: Int!
deleteSignal Boolean! Delete a signal.
id: String!
createEvent Event! Create a new event from signals.
input: CreateEventInput!
updateEvent Event! Update an existing event.
id: String!input: UpdateEventInput!
deleteEvent Boolean! Delete an event.
id: String!
escalateEvent EventEscalation! Escalate an event: creates an alert (published) and records the user escalation. If the event already has a published alert, just records the user escalation.
eventId: String!userId: String!
createDataSource DataSource! Create a new data source.
input: CreateDataSourceInput!
updateDataSource DataSource! Update an existing data source.
id: String!input: UpdateDataSourceInput!
deleteDataSource Boolean! Delete a data source.
id: String!
createLocation Location! Create a new location.
input: CreateLocationInput!
updateLocation Location! Update an existing location.
id: String!input: UpdateLocationInput!
deleteLocation Boolean! Delete a location.
id: String!
updateLocationGeometry Location! Replace a location's geometry with the given GeoJSON (admin/pipeline only).
id: String!geometry: GeoJSON!
updateLocationPopulation Location! Set a location's cached population (admin/pipeline only).
id: String!population: String!
updateCrisisPopulation Crisis! Set a crisis's populationAffected + populationInArea (admin/pipeline only).
id: String!input: UpdateCrisisPopulationInput!
upsertLocationMetadata LocationMetadata! Create or update a location's metadata entry for a given type (admin/pipeline only). Upsert keyed by (locationId, type).
input: UpsertLocationMetadataInput!
upsertLocationMetadataBatch [LocationMetadata!]! Bulk-upsert multiple (locationId, type, data) rows in a single call (admin/pipeline only). Returns the resulting rows. Rows whose locationId doesn't exist are skipped silently.
inputs: [UpsertLocationMetadataInput!]!
deleteLocationMetadata Boolean! Delete a location's metadata entry for a given type (admin only).
locationId: String!type: String!
createNotification Notification! Create a notification for a user.
input: CreateNotificationInput!
createBulkNotifications Int! Create notifications for multiple users at once. Returns the count of notifications created.
input: CreateBulkNotificationsInput!
notifyAlertSubscribers Int! Notify all subscribers of a single alert (immediate frequency). Matches on event types and locations.
input: AlertNotifyInput!
notifyAlertDigest Int! Send a digest notification for multiple alerts to subscribers of the given frequency (daily/weekly/monthly).
input: AlertDigestInput!
deleteNotification Boolean! Delete a notification.
id: String!
markNotificationRead Notification! Mark a notification as read.
id: String!
markAllNotificationsRead Boolean! Mark all notifications as read for the authenticated user.
addFeedback UserFeedback! Add feedback (rating + optional text) to a signal or event.
input: AddFeedbackInput!
deleteFeedback Boolean! Delete your own feedback.
id: String!
addComment UserComment! Add a comment to a signal or event.
input: AddCommentInput!
replyToComment UserComment! Reply to an existing comment.
input: ReplyToCommentInput!
deleteComment Boolean! Delete your own comment.
id: String!
tagUsersInComment UserComment! Tag users in a comment.
commentId: String!userIds: [String!]!
createOrganisation Organisation! Create a new organisation. The creator becomes the owner.
input: CreateOrganisationInput!
updateOrganisation Organisation! Update an existing organisation. Requires org owner or admin.
id: String!input: UpdateOrganisationInput!
addOrgMember OrgMember! Add a member to an organisation.
orgId: String!userId: String!role: OrgMemberRole
removeOrgMember Boolean! Remove a member from an organisation.
orgId: String!userId: String!
deleteOrganisation Boolean! Delete an organisation and all its teams, members, and invitations. Requires global admin.
id: String!
createTeam Team! Create a new team within an organisation. Requires org admin or owner.
input: CreateTeamInput!
updateTeam Team! Update an existing team.
id: String!input: UpdateTeamInput!
deleteTeam Boolean! Delete a team.
id: String!
addTeamMember TeamMember! Add a member to a team.
teamId: String!userId: String!role: TeamMemberRole
removeTeamMember Boolean! Remove a member from a team.
teamId: String!userId: String!
updateTeamMemberRole TeamMember! Update a team member's role.
teamId: String!userId: String!role: TeamMemberRole!
setTeamLocations Team! Set the locations a team is scoped to. Replaces all existing locations.
teamId: String!locationIds: [String!]!
setDefaultTeam Team! Set the authenticated user's default team (for frontend convenience).
teamId: String!
inviteUser Invitation! Invite a user to an organisation (and optionally a team). Sends invite email.
input: InviteUserInput!
acceptInvite Boolean! Accept an invitation. Creates user account if new, adds to org and team.
input: AcceptInviteInput!
cancelInvite Boolean! Cancel a pending invitation.
id: String!
resendInvite Invitation! Resend an invitation email (resets expiry to 7 days).
id: String!
requestPasswordReset Boolean! Request a password reset email (public, always returns true).
email: String!
resetPassword Boolean! Reset password using a token from the reset email.
token: String!newPassword: String!
subscribeToAlerts AlertSubscription! Subscribe to alerts for a specific type and location.
input: SubscribeToAlertsInput!
subscribeToAlertsBatch [AlertSubscription!]! Subscribe to alerts for multiple (location × alertType) combinations in a single call. Returns the list of created subscriptions. Duplicates are skipped silently.
input: SubscribeToAlertsBatchInput!
updateAlertSubscription AlertSubscription! Update an existing alert subscription (channel, frequency, active).
id: String!input: UpdateAlertSubscriptionInput!
unsubscribeFromAlerts Boolean! Unsubscribe - deletes the subscription.
id: String!
createCrisisFromEvents Crisis! Create a new crisis from a list of event IDs. Links all provided events to the new crisis.
input: CreateCrisisFromEventsInput!
addEventToCrisis EventCrisis! Add an existing event to an existing crisis. Idempotent - returns the existing link if one already exists.
crisisId: String!eventId: String!

Types

All types in the schema, auto-generated from the running server.

DateTime scalar

ISO 8601 date-time string (e.g. 2024-01-15T09:30:00.000Z).

GeoJSON scalar

JSON scalar

Arbitrary JSON value — objects, arrays, strings, numbers, booleans, or null.

Upload scalar

File upload scalar (via graphql-upload).

AlertStatus enum

Publication status of an alert.

ValueDescription
draft
published
archived

Channel enum

Notification channel for alert subscriptions.

ValueDescription
email
sms

DetectionStatus enum

Processing status of a detection (retained for potential future use).

ValueDescription
raw
processed
ignored

Frequency enum

How often a user receives alert notifications.

ValueDescription
immediately
daily
weekly
monthly

InvitationStatus enum

Status of an invitation.

ValueDescription
pending
accepted
expired

NotificationStatus enum

ValueDescription
PENDING
DELIVERED
FAILED
READ

OrgMemberRole enum

Role within an organisation.

ValueDescription
owner
admin
member

TeamMemberRole enum

Role within a team.

ValueDescription
lead
analyst
viewer

AcceptInviteInput input

FieldTypeDescription
token String!
name String!
password String!

AddCommentInput input

FieldTypeDescription
eventId String Provide exactly one of eventId, signalId, or crisisId.
signalId String
crisisId String
comment String!
tagUserIds [String!] User IDs to tag in the comment.

AddFeedbackInput input

FieldTypeDescription
eventId String Provide exactly one of eventId, signalId, or crisisId.
signalId String
crisisId String
rating Int! Rating from 1 to 5.
text String Optional textual feedback.

AlertDigestInput input

FieldTypeDescription
alertIds [String!]! List of alert IDs to include in the digest.
frequency String! Frequency: daily, weekly, or monthly.

AlertNotifyInput input

FieldTypeDescription
alertId String! Alert ID to notify subscribers about (uses immediate frequency).

CreateAlertInput input

FieldTypeDescription
eventId String! The event ID to create an alert from.
status AlertStatus

CreateApiKeyInput input

Input for creating a new API key.

FieldTypeDescription
name String! A descriptive name for this key (e.g. my-app-prod).
expiresAt DateTime Optional expiration date. Omit for a key that never expires.

CreateBulkNotificationsInput input

FieldTypeDescription
userIds [String!]! List of user IDs to notify.
message String!
notificationType String!
actionUrl String
actionText String

CreateCrisisFromEventsInput input

FieldTypeDescription
title String
summary String
severity Float!
locationId String
needs JSON! Needs as JSON.
eventIds [String!]! Event IDs to link to the newly created crisis (must not be empty).

CreateDataSourceInput input

FieldTypeDescription
name String!
type String!
isActive Boolean
baseUrl String
infoUrl String

CreateEventInput input

FieldTypeDescription
signalIds [String!]!
title String
description String
descriptionSignals JSON
validFrom String!
validTo String!
firstSignalCreatedAt String!
lastSignalCreatedAt String!
originId String
destinationId String
locationId String
types [String!]!
severity Int Severity score (1–5). Aggregated from signal severities.
populationAffected String
populationDisplaced String Estimated population displaced (BigInt as string).
casualties Int Aggregated casualties for the event (max across constituent signals).
rank Float!
lat Float Latitude for automatic geo-resolution (resolves to nearest location in hierarchy).
lng Float Longitude for automatic geo-resolution.

CreateLocationInput input

FieldTypeDescription
geoId Int
osmId String
pCode String
name String!
level Int!
parentId String

CreateManualSignalInput input

FieldTypeDescription
sourceId String! Data source ID (must be field_officer, partner, or government type).
title String!
description String!
severity Int Severity score (1–5).
url String URL or reference link.
mediaUrls [String!] Media URLs (pre-uploaded via /api/upload endpoint).
media [Upload!] Media files (direct upload via graphql-upload, alternative to mediaUrls).
locationId String
originId String
destinationId String
lat Float Latitude for automatic geo-resolution.
lng Float Longitude for automatic geo-resolution.
metadata JSON Arbitrary internal metadata stored in rawData (e.g. notes, recommendAlert). Not surfaced in the UI - use freely without schema changes.

CreateNotificationInput input

FieldTypeDescription
userId String!
message String!
notificationType String!
actionUrl String
actionText String

CreateOrganisationInput input

Fields for creating a new organisation.

FieldTypeDescription
name String! Display name for the organisation.
slug String! URL-friendly identifier. Must be unique.

CreateSignalInput input

FieldTypeDescription
sourceId String!
externalId String Stable upstream identifier for idempotent ingestion. If a signal with the same (sourceId, externalId) already exists, createSignal returns the existing row instead of creating a duplicate. Recommended prefix scheme: "dataminr:{alertId}", "gdacs:{eventid}", "acled:{event_id_cnty}".
rawData JSON!
publishedAt String!
collectedAt String
url String
title String
description String
severity Int Severity score (1–5). From data source or estimated by pipeline.
casualties Int Reported casualties for the signal.
media [String!] Media URLs (source URLs for images, videos, etc.).
originId String
destinationId String
locationId String
lat Float Latitude for automatic geo-resolution (resolves to nearest location in hierarchy).
lng Float Longitude for automatic geo-resolution.

CreateTeamInput input

FieldTypeDescription
organisationId String!
name String!
slug String!
description String

InviteUserInput input

FieldTypeDescription
email String!
organisationId String!
role String Organisation role: owner, admin, member (default: member).
teams [TeamAssignmentInput!]! Team assignments — at least one team is required. Each entry grants the invitee membership in that team with the given role on acceptance.

ReplyToCommentInput input

FieldTypeDescription
repliedToCommentId String! ID of the comment to reply to.
comment String!
tagUserIds [String!] User IDs to tag in the reply.

SubscribeToAlertsBatchInput input

FieldTypeDescription
locationIds [String!]! One or more location IDs.
alertTypes [String!]! One or more disaster/event types (glideNumbers). A subscription is created for every (location × alertType) pair.
channel Channel!
frequency Frequency!
minSeverity Int Minimum event severity (1-5). Applied to all created subscriptions.

SubscribeToAlertsInput input

FieldTypeDescription
locationId String!
alertType String! Disaster/event type (glideNumber from disaster_types, e.g. 'fl', 'eq').
channel Channel!
frequency Frequency!
minSeverity Int Minimum event severity (1-5) to notify on. Defaults to 1 (all alerts).

TeamAssignmentInput input

One (team, role) assignment passed to inviteUser.

FieldTypeDescription
teamId String!
teamRole TeamMemberRole!

UpdateAlertInput input

FieldTypeDescription
status AlertStatus

UpdateAlertSubscriptionInput input

FieldTypeDescription
channel Channel
frequency Frequency
active Boolean
minSeverity Int Minimum event severity (1-5).

UpdateCrisisPopulationInput input

FieldTypeDescription
populationAffected String Population directly affected by the events (BigInt as string).
populationInArea String Total population residing within the event admin areas (BigInt as string).
title String AI-generated crisis title.
summary String AI-generated crisis summary.

UpdateDataSourceInput input

FieldTypeDescription
name String
type String
isActive Boolean
baseUrl String
infoUrl String

UpdateEventInput input

FieldTypeDescription
signalIds [String!]
title String
description String
descriptionSignals JSON
validFrom String
validTo String
firstSignalCreatedAt String
lastSignalCreatedAt String
originId String
destinationId String
locationId String
types [String!]
severity Int
populationAffected String
populationDisplaced String Estimated population displaced (BigInt as string).
casualties Int Aggregated casualties for the event (max across constituent signals).
rank Float

UpdateLocationInput input

FieldTypeDescription
geoId Int
osmId String
pCode String
name String
level Int
parentId String

UpdateOrganisationInput input

Fields for updating an existing organisation.

FieldTypeDescription
name String New display name.
slug String New URL-friendly identifier.
isActive Boolean Set active/inactive status.

UpdateProfileInput input

FieldTypeDescription
name String
phoneNumber String
image String
enableInAppNotification Boolean
enableEmailNotification Boolean
enableSMSNotification Boolean

UpdateTeamInput input

FieldTypeDescription
name String
slug String
description String

UpsertLocationMetadataInput input

FieldTypeDescription
locationId String!
type String! Type string (e.g. "iom_dtm_displacement").
data JSON! JSON payload for this type.

Alert object

An alert created from an event, distributed to subscribed users.

FieldTypeDescription
id String!
event Event! The event this alert was created from.
status AlertStatus!
userAlerts [UserAlert!]! Users who received this alert.

AlertSubscription object

A user's subscription to alerts of a specific type at a specific location.

FieldTypeDescription
id String!
userId String!
user User!
location Location!
alertType String! Disaster/event type to subscribe to (e.g. 'fl' for flood, 'eq' for earthquake).
active Boolean!
minSeverity Int! Minimum event severity (1-5) to notify on. Alerts with event.severity < minSeverity are suppressed for this user.
channel Channel!
frequency Frequency!
createdAt DateTime!
updatedAt DateTime!

ApiKey object

A personal API key for programmatic access. The full key is only shown once at creation.

FieldTypeDescription
id String!
name String! Descriptive name you chose when creating the key.
prefix String! Short prefix for identification (e.g. sk_live_abc1).
expiresAt DateTime Optional expiration date. Expired keys are rejected automatically.
lastUsedAt DateTime When this key was last used to authenticate a request.
revokedAt DateTime When this key was revoked, if applicable. Revocation is permanent.
createdAt DateTime!
updatedAt DateTime!

ArchiveStaleAlertsResult object

Result of the archiveStaleAlerts bulk mutation.

FieldTypeDescription
alertsArchived Int!

CommentTag object

A tag linking a user to a comment.

FieldTypeDescription
user User!
comment UserComment!

CreateApiKeyPayload object

Returned only from createApiKey. Contains the full plaintext key that will never be retrievable again.

FieldTypeDescription
apiKey ApiKey!
key String! The full API key. Copy this immediately — it cannot be retrieved later.

Crisis object

A crisis aggregates multiple events into a single coherent narrative.

FieldTypeDescription
id String!
title String
summary String
severity Float! Severity score (aggregated from linked events).
generalLocation Location General location of the crisis.
needs JSON! Needs associated with the crisis (JSON structure).
populationAffected String Population directly affected by linked events (BigInt as string).
populationInArea String Total population residing within the admin areas of linked events (BigInt as string).
events [Event!]! Events that are part of this crisis.
feedbacks [UserFeedback!]! User feedback on this crisis.
comments [UserComment!]! User comments on this crisis.

DataSource object

An external data source that feeds signals into the system.

FieldTypeDescription
id String!
name String!
type String! Source type identifier (e.g. satellite, sensor, manual).
isActive Boolean!
baseUrl String Base URL of the data source API.
infoUrl String URL with more information about this source.
createdAt DateTime!
updatedAt DateTime!
signals [Signal!]! Signals collected from this data source.

DisasterLevel1 object

A level-1 category with its level-2 groups.

FieldTypeDescription
name String!
groups [DisasterLevel2!]!

DisasterLevel2 object

A level-2 group with its distinct classification codes.

FieldTypeDescription
name String!
codes [String!]! Classification codes belonging to this level-2 group (usually one).
subTypes [DisasterType!]! Level-3 sub-types under this level-2 group.

DisasterType object

A disaster classification in a 3-level hierarchy (level1 > level2 > level3). Events store arrays of codes (GLIDE or CLEAR IDs).

FieldTypeDescription
id String!
disasterType String! Level-3 granular sub-type (e.g. "peaceful protest").
disasterClass String! Level-1 category (legacy — same as level1).
glideNumber String! Classification code — may be a GLIDE number or a CLEAR id.
level1 String! Top-level category (e.g. "natural hazard", "conflict").
level2 String! Mid-level group (e.g. "protests", "battles").
idType String! Identifier system: "glide_number" or "clear_id".

Event object

An event grouping related signals into a coherent narrative.

FieldTypeDescription
id String!
title String
description String
descriptionSignals JSON LLM-generated signal descriptions as JSON.
validFrom DateTime!
validTo DateTime!
firstSignalCreatedAt DateTime!
lastSignalCreatedAt DateTime!
originLocation Location Origin location of the event.
destinationLocation Location Destination location of the event.
generalLocation Location General location (when no origin/destination).
types [String!]! Event type tags.
severity Int Severity score (1–5). Aggregated from signal severities.
isDummy Boolean! Whether this is seed/demo data.
populationAffected String Estimated population affected.
populationDisplaced String Estimated population displaced by the event (BigInt as string).
casualties Int Aggregated casualties for the event (max across constituent signals).
rank Float!
signals [Signal!]! Signals linked to this event.
alerts [Alert!]! Alerts created from this event.
feedbacks [UserFeedback!]! User feedback on this event.
comments [UserComment!]! User comments on this event.
escalations [EventEscalation!]! Escalations by users.

EventCrisis object

Link between a crisis and an event.

FieldTypeDescription
id String!
crisisId String!
eventId String!
collectedAt DateTime!
crisis Crisis!
event Event!

EventEscalation object

Tracks a user escalating an event, optionally to a crisis.

FieldTypeDescription
id String!
user User!
event Event!
isCrisis Boolean! Whether this has been escalated to a crisis.
validFrom DateTime!
validTo DateTime!

FeatureFlag object

A feature toggle that controls runtime behavior.

FieldTypeDescription
id Int!
key String! Unique key used to look up this flag (e.g. dark_mode).
enabled Boolean!
updatedAt DateTime!

Invitation object

An invitation to join an organisation, with one or more team assignments.

FieldTypeDescription
id String!
email String!
organisation Organisation!
team Team Single team — legacy field, populated only for invitations created before the multi-team join existed. New invitations use `teams`.
role String! Organisation role assigned on acceptance.
teamRole String Legacy single-team role. Use `teams` for new invitations.
teams [InvitationTeam!]! Team assignments granted to the invitee on acceptance. Empty list means org-only access (no team).
expiresAt DateTime!
acceptedAt DateTime
invitedBy User!
createdAt DateTime!
status InvitationStatus! Computed from acceptedAt and expiresAt.

InvitationInfo object

Public invitation info returned by token lookup (limited fields).

FieldTypeDescription
id String!
email String!
organisationName String!
teamName String Legacy single-team name (populated only for old invitations).
role String!
teamRole String Legacy single-team role (populated only for old invitations).
teams [InvitationInfoTeam!]! Team assignments the invitee will be granted on acceptance.
expiresAt DateTime!
status InvitationStatus!

InvitationInfoTeam object

One (team, role) assignment as returned by the public token lookup.

FieldTypeDescription
teamId String!
teamName String!
teamRole TeamMemberRole!

InvitationTeam object

One (team, role) assignment attached to an invitation.

FieldTypeDescription
team Team!
teamRole TeamMemberRole!

Location object

A geographic location in a hierarchy (country > state > city, etc.).

FieldTypeDescription
id String!
geoId Int GeoNames identifier.
osmId String OpenStreetMap identifier.
pCode String P-Code identifier.
name String!
level Int! Hierarchy level: 0 = country, 1 = state/province, 2 = city, etc.
geometry GeoJSON Geometry as GeoJSON (Point or MultiPolygon).
parent Location Parent location in the hierarchy.
children [Location!]! Child locations one level below.
ancestorIds [String!]! IDs of all ancestor locations (parent, grandparent, etc.).
ancestors [Location!]! All ancestor locations (parent, grandparent, etc.).
population String Population residing within this location's geometry. Null for point locations or when not yet computed.
metadata [LocationMetadata!]! Per-type metadata (IOM DTM, INFORM, etc). Pass a type argument to filter. By default only the current value is returned (validTo is null). Pass current: false to include the full history.
type: Stringcurrent: Boolean

LocationMetadata object

Arbitrary per-location metadata keyed by type. History is preserved: writes close the current row (set validTo = now()) and insert a new one. The CURRENT value for a (location, type) is the row where validTo is null.

FieldTypeDescription
id String!
location Location!
type String! Free-form type string (e.g. "iom_dtm_displacement", "acaps_inform").
data JSON! Source-specific payload stored as JSON.
validFrom DateTime! When this value became current.
validTo DateTime When this value was superseded. Null means still current.
createdAt DateTime!
updatedAt DateTime!

Notification object

FieldTypeDescription
id String!
user User!
message String!
notificationType String!
actionUrl String
actionText String
status NotificationStatus!
emailNotificationStatus NotificationStatus
smsNotificationStatus NotificationStatus
createdAt DateTime!
updatedAt DateTime!

Organisation object

An organisation that owns teams and has members.

FieldTypeDescription
id String!
name String!
slug String! URL-friendly identifier.
isActive Boolean! Whether this organisation is active. Inactive organisations are hidden from non-admin users.
createdAt DateTime! When this organisation was created.
updatedAt DateTime! When this organisation was last updated.
teams [Team!]! Teams belonging to this organisation.
members [OrgMember!]! Members of this organisation.

OrganisationUser object

Links a user to an organisation with a role.

FieldTypeDescription
id String!
userId String!
organisationId String!
role String!

OrgMember object

Links a user to an organisation with an org-level role.

FieldTypeDescription
id String!
user User!
role String! Organisation-level role: owner, admin, or member.
createdAt DateTime! When this membership was created.

Signal object

A signal derived from a data source.

FieldTypeDescription
id String!
source DataSource! The data source this signal was collected from.
externalId String Stable upstream identifier (e.g. "dataminr:{alertId}"). Used to deduplicate ingestion — (source, externalId) is unique.
rawData JSON! Original signal payload as JSON.
publishedAt DateTime!
collectedAt DateTime!
url String
title String
description String
severity Int Severity score (1–5). From data source or estimated by pipeline.
casualties Int Reported casualties for the signal. Sourced from ACLED's fatalities field; for Dataminr, parsed from raw text via regex.
media [String!]! Media URLs (S3 keys for manual uploads, or source URLs for pipeline signals).
isDummy Boolean! Whether this is seed/demo data.
originLocation Location Origin location of the signal.
destinationLocation Location Destination location of the signal.
generalLocation Location General location (when no origin/destination).
events [Event!]! Events this signal is linked to.
feedbacks [UserFeedback!]! User feedback on this signal.
comments [UserComment!]! User comments on this signal.

Team object

A team within an organisation, scoped to specific locations.

FieldTypeDescription
id String!
name String!
slug String! URL-friendly identifier, unique within the organisation.
description String
organisation Organisation! The organisation this team belongs to.
members [TeamMember!]! Members of this team.
locations [Location!]! Locations this team is scoped to. Empty means global monitoring.
createdAt DateTime!
updatedAt DateTime!

TeamMember object

Links a user to a team with a team-level role.

FieldTypeDescription
id String!
user User!
role String! Team-level role: lead, analyst, or viewer.
createdAt DateTime!

User object

A registered user with role-based access.

FieldTypeDescription
id String!
email String!
name String!
emailVerified Boolean!
phoneNumber String
image String
role String! User role: viewer, editor, or admin.
isActive Boolean!
enableInAppNotification Boolean!
enableEmailNotification Boolean!
enableSMSNotification Boolean!
createdAt DateTime!
updatedAt DateTime!
alerts [UserAlert!]! Alerts received by this user.
notifications [Notification!]!
defaultTeam Team The user's default team (last selected).
organisations [OrganisationUser!]! Organisations this user belongs to.
teamMemberships [TeamMember!]! Teams this user belongs to.
feedbacks [UserFeedback!]! Feedback given by this user.
comments [UserComment!]! Comments made by this user.
escalations [EventEscalation!]! Events/alerts escalated by this user.

UserAlert object

Tracks an alert delivered to a user — view status.

FieldTypeDescription
id String!
user User!
alert Alert!
viewedAt DateTime When the user viewed this alert.

UserComment object

A user comment on a signal, event, or crisis, with reply support.

FieldTypeDescription
id String!
user User!
event Event
signal Signal
crisis Crisis
comment String!
isCommentReply Boolean! Whether this comment is a reply to another comment.
repliedToCommentId String ID of the comment being replied to, if any.
tags [CommentTag!]! Users tagged in this comment.
createdAt DateTime!
updatedAt DateTime!

UserFeedback object

User feedback on a signal, event, or crisis — rating and optional text.

FieldTypeDescription
id String!
user User!
event Event
signal Signal
crisis Crisis
rating Int! Rating from 1 to 5.
text String Optional textual feedback.
createdAt DateTime!
updatedAt DateTime!