API reference
Generated from openapi.yaml (OpenAPI 3.1.0), which you can load into
any OpenAPI tool or client generator. Client calls go to https://auth.wizgu.com/api/v2.
App
The calling app's public profile.
/api/v2/app
The app's public profile
-
200The app.-
dataobject-
namestring -
require_verified_emailboolean -
deep_link_urlstring or null -
brandingobject-
logo_urlstring or null -
primary_colorstring or null
-
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Sign-in
Email and password, Google, Apple, email codes, tokens and sign-out.
/api/v2/auth/sign-up
Create an account with email and password
Creates the user in this app's pool and signs them in. Limit 10 a minute per IP.
-
email* string (email) -
password* string · At least 8 characters. -
first_namestring -
last_namestring
-
201Tokens and the user.-
dataobject-
access_tokenstring · A JWT; send asAuthorization: Bearer …. -
token_type"Bearer" -
expires_ininteger · Seconds until the access token expires. -
refresh_tokenstring · Keep in secure storage; send only to/auth/token/refresh. -
userobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
-
403app/user-limit-reached: the app takes no new accounts-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
409auth/email-already-in-use-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
422auth/weak-passwordorvalidation/failed-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/sign-in
Sign in with email and password
Limits 10 a minute per email and IP, 30 a minute per IP.
-
email* string (email) -
password* string
-
200Tokens and the user.-
dataobject-
access_tokenstring · A JWT; send asAuthorization: Bearer …. -
token_type"Bearer" -
expires_ininteger · Seconds until the access token expires. -
refresh_tokenstring · Keep in secure storage; send only to/auth/token/refresh. -
userobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
-
401auth/invalid-credential, the same for an unknown email and a wrong password-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
403auth/user-disabled-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/google
Sign in with Google
Verifies the ID token from Google's sign-in SDK against the app's Google client IDs. Signs in, links to a verified account with the same email, or creates a verified account.
-
id_token* string -
noncestring · The nonce given to Google's SDK, if any.
-
200Tokens, the user, and whether the account was just created.-
dataobject-
access_tokenstring · A JWT; send asAuthorization: Bearer …. -
token_type"Bearer" -
expires_ininteger · Seconds until the access token expires. -
refresh_tokenstring · Keep in secure storage; send only to/auth/token/refresh. -
userobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
is_new_userboolean
-
-
-
403auth/provider-not-enabled,auth/unverified-email,auth/user-disabled,app/user-limit-reached(a new account)-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
409auth/account-exists-with-different-credential-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
503unavailable: Google couldn't be reached-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/apple
Sign in with Apple
Verifies the identity token from Sign in with Apple. Send the authorization_code too, so the
Apple refresh token can be revoked when the account is deleted (App Store requirement). Apple
gives the user's name only on the first sign-in: pass it here.
-
identity_token* string -
noncestring · The raw nonce whose SHA-256 was given to Apple. -
authorization_codestring -
first_namestring -
last_namestring
-
200Tokens, the user, and whether the account was just created.-
dataobject-
access_tokenstring · A JWT; send asAuthorization: Bearer …. -
token_type"Bearer" -
expires_ininteger · Seconds until the access token expires. -
refresh_tokenstring · Keep in secure storage; send only to/auth/token/refresh. -
userobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
is_new_userboolean
-
-
-
403auth/provider-not-enabled,auth/unverified-email,auth/user-disabled,app/user-limit-reached(a new account)-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
409auth/account-exists-with-different-credential-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
503unavailable-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/email-code/send
Email a sign-in code (passwordless)
Emails a 6-digit code, and a magic link when the app has a deep-link URL. The answer is the same for every email. Limits 10 a minute per IP, 5 an hour per email.
-
email* string (email)
-
200A code was emailed (or the answer is the same as if it had been).-
dataobject-
expires_ininteger · Seconds the code stays valid.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/email-code/verify
Sign in with an emailed code
Creates the account when the email is new in this app. The email counts as verified.
-
email* string (email) -
code* string -
first_namestring · For a new account. -
last_namestring · For a new account.
-
200Tokens, the user, and whether the account was just created.-
dataobject-
access_tokenstring · A JWT; send asAuthorization: Bearer …. -
token_type"Bearer" -
expires_ininteger · Seconds until the access token expires. -
refresh_tokenstring · Keep in secure storage; send only to/auth/token/refresh. -
userobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
is_new_userboolean
-
-
-
400auth/invalid-code,auth/code-expired-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
403app/user-limit-reached(a new account)-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/token/refresh
Get new tokens with the refresh token
The old refresh token is used up: store the new one. Sending a used refresh token again after 30 seconds counts as theft and ends the session. Limit 30 a minute per IP.
-
refresh_token* string
-
200New tokens.-
dataobject-
access_tokenstring · A JWT; send asAuthorization: Bearer …. -
token_type"Bearer" -
expires_ininteger · Seconds until the access token expires. -
refresh_tokenstring · Keep in secure storage; send only to/auth/token/refresh.
-
-
-
401auth/refresh-token-revoked: sign in again-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/token/from-v1
Trade a v1 token for v2 tokens
For apps moving from API v1: a valid v1 token of this app becomes a v2 session, so the user stays signed in. The v1 token stops working. The session keeps the v1 sign-in time, so sensitive actions ask for the password once. Limit 30 a minute per IP.
-
v1_token* string · The token v1/loginreturned.
-
200Tokens and the user.-
dataobject-
access_tokenstring · A JWT; send asAuthorization: Bearer …. -
token_type"Bearer" -
expires_ininteger · Seconds until the access token expires. -
refresh_tokenstring · Keep in secure storage; send only to/auth/token/refresh. -
userobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
-
401auth/invalid-token: expired, signed out or not this app's; sign in again-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
403auth/user-disabled-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/password/forgot
Email a password-reset code
The same answer whether or not the email has an account. Limits 5 a minute per IP, 10 an hour per email.
-
email* string (email)
-
200A code was emailed (or the answer is the same as if it had been).-
dataobject-
expires_ininteger · Seconds the code stays valid.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/password/reset
Set a new password with the emailed code
Ends every session of the account. Limit 5 a minute per IP.
-
email* string (email) -
code* string -
password* string
-
204The password was changed. -
400auth/invalid-code,auth/code-expired-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
422auth/weak-password-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/reauthenticate
Confirm the password again for a sensitive action
Renews the sign-in time and returns a new access token (the refresh token stays). Call it when an
action answers auth/requires-recent-login. Limit 5 a minute per user.
-
password* string
-
200A new access token.-
dataobject-
access_tokenstring -
token_type"Bearer" -
expires_ininteger
-
-
-
400auth/invalid-credential-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/sign-out
Sign out this device
-
204The session ended. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/sign-out-all
Sign out every device of the user in this app
-
204Every session ended. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Account
The signed-in user's profile, email, password, photo and deletion.
/api/v2/auth/email/verification/send
Email a code that verifies the user's address
Limits 3 a minute and 10 an hour per user.
-
200A code was emailed (or the answer is the same as if it had been).-
dataobject-
expires_ininteger · Seconds the code stays valid.
-
-
-
409auth/email-already-verified-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/auth/email/verification/confirm
Verify the address with the emailed code
The next access token (after a refresh) has email_verified true.
-
code* string
-
200The user.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
400auth/invalid-code,auth/code-expired-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me
The signed-in user
-
200The user.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me
Change the name or the profile photo
-
first_namestring or null -
last_namestring or null -
photo_file_idstring or null · One of the user's own image files; null removes the photo.
-
200The user.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me
Delete the account
Needs a recent sign-in. Every session ends and the email can sign up again.
-
reasonstring
-
204The account was deleted. -
403auth/requires-recent-login-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/email
Start changing the email address
Needs a recent sign-in. Emails a code to the new address.
-
email* string (email)
-
200A code was emailed (or the answer is the same as if it had been).-
dataobject-
expires_ininteger · Seconds the code stays valid.
-
-
-
403auth/requires-recent-login-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
409auth/email-already-in-use-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/email/confirm
Switch to the new address with its code
-
email* string (email) -
code* string
-
200The user.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
400auth/invalid-code,auth/code-expired-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/password
Change the password
The user's other sessions end; this one stays. Limit 5 a minute per user.
-
current_password* string -
password* string
-
204The password was changed. -
400auth/invalid-credential-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
422auth/weak-password-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/photo
Upload a profile photo
A public JPEG, PNG, WebP or GIF within the app's file limits. It replaces the previous photo and
shows as photo_url and as the picture claim of new access tokens.
-
photo* string (binary)
-
200The user.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
413storage/file-too-large,storage/quota-exceeded-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
415storage/type-not-allowed-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/photo
Remove the profile photo
-
200The user.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/loyalty
Member ID, points and tier
What v1 /login and /me carried in user. Tiers: silver below 3,000 points, gold below 10,000, platinum from 10,000.
-
200The loyalty status.-
dataobject-
member_idstring · The app'smember_id_prefixRemote Config parameter and the account number. -
pointsinteger -
tierstring: silver, gold, platinum -
next_tierobject or null · Null at the top tier.-
tierstring: gold, platinum -
points_neededinteger
-
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/loyalty/history
Points added and taken away
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of entries, newest first.-
dataarray of object-
pointsinteger · Negative when points were taken away. -
descriptionstring or null -
created_atstring (date-time)
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Identities
The sign-in methods linked to the user.
/api/v2/me/identities
The user's sign-in methods
-
200The linked methods.-
dataarray of object-
providerstring: password, google, apple -
emailstring or null -
linked_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/identities/{provider}
Link a sign-in method
Needs a recent sign-in. The body depends on the provider.
provider* |
path | string: password, google, apple |
-
passwordstring · Forpassword. -
id_tokenstring · Forgoogle. -
identity_tokenstring · Forapple. -
noncestring · Forgoogleandapple. -
authorization_codestring · Forapple.
-
201The new identity.-
dataobject-
providerstring: password, google, apple -
emailstring or null -
linked_atstring (date-time)
-
-
-
409auth/provider-already-linked,auth/credential-already-in-use-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/identities/{provider}
Unlink a sign-in method
Needs a recent sign-in.
provider* |
path | string: password, google, apple |
-
204Unlinked. -
409auth/last-sign-in-method-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Sessions
The devices the user is signed in on.
/api/v2/me/sessions
The devices the user is signed in on
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of sessions.-
dataarray of object-
idstring -
currentboolean -
providerstring -
signed_in_atstring (date-time) -
auth_timestring (date-time) -
last_used_atstring or null (date-time) -
ip_addressstring or null -
user_agentstring or null
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/me/sessions/{session}
Sign out one device
session* |
path | string |
-
204The session ended. -
404An error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Remote Config
Parameter values for this caller.
/api/v2/config
Remote Config values for this caller
A bearer token is optional; if sent it must be valid, and it unlocks tier, claim and percentage
conditions. Send the ETag back as If-None-Match to get 304 when nothing changed, and wait
min_fetch_interval seconds between fetches.
platform |
query | string | |
app_version |
query | string | |
language |
query | string | Else Accept-Language.
|
instance_id |
query | string | 8–128 characters. Buckets percentage rollouts before sign-in. |
If-None-Match |
header | string |
-
200The values.-
dataobject-
versioninteger -
min_fetch_intervalinteger · Seconds. -
parametersobject · Parameter name → value (string, number, boolean, or a string holding JSON).
-
-
-
304Nothing changed since that ETag. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Push
Push-token registration and topics.
/api/v2/push/devices
Register the device's push token
With an access token the device is linked to the user until that sign-in ends; without one it is anonymous. Register again after sign-in, sign-out and token changes. The token is never returned.
-
provider* string: fcm, apns -
platform* string: ios, android, web -
token* string -
app_versionstring -
languagestring -
device_idstring · From an earlier registration, when the token changed.
-
200The device.-
dataobject-
idstring -
providerstring: fcm, apns -
platformstring: ios, android, web -
app_versionstring or null -
languagestring or null -
signed_inboolean -
topicsarray of string -
created_atstring (date-time) -
last_seen_atstring or null (date-time)
-
-
-
201The device.-
dataobject-
idstring -
providerstring: fcm, apns -
platformstring: ios, android, web -
app_versionstring or null -
languagestring or null -
signed_inboolean -
topicsarray of string -
created_atstring (date-time) -
last_seen_atstring or null (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/push/devices/{id}
The device
id* |
path | string |
-
200The device.-
dataobject-
idstring -
providerstring: fcm, apns -
platformstring: ios, android, web -
app_versionstring or null -
languagestring or null -
signed_inboolean -
topicsarray of string -
created_atstring (date-time) -
last_seen_atstring or null (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/push/devices/{id}
Forget the device
id* |
path | string |
-
204Forgotten. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/push/devices/{id}/topics/{topic}
Follow a topic
At most 200 topics per device.
id* |
path | string | |
topic* |
path | string |
-
204Following. -
422push/too-many-topics-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/push/devices/{id}/topics/{topic}
Unfollow a topic
id* |
path | string | |
topic* |
path | string |
-
204Not following. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Files
The user's files.
/api/v2/files
The user's files
folder |
query | string | |
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of files, with the user's storage figures.-
dataarray of object-
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
metaobject-
next_cursorstring or null -
used_bytesinteger -
quota_bytesinteger -
max_file_bytesinteger -
max_direct_upload_bytesinteger or null · Null without S3 storage. -
allowed_typesarray of string
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files
Upload a file
The type is read from the content. The app's size, type and quota limits apply.
-
file* string (binary) -
namestring -
folderstring -
visibilitystring: private, public
-
201The file.-
dataobject-
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
-
413storage/file-too-large,storage/quota-exceeded-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
415storage/type-not-allowed-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files/uploads
Start a direct upload of a large file (S3 storage only)
PUT the bytes to upload.url with upload.headers, then call /files/{id}/complete.
-
name* string -
mime_type* string -
size* integer -
folderstring -
visibilitystring: private, public
-
201The pending file and where to upload it.-
dataobject-
fileobject-
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
uploadobject-
method"PUT" -
urlstring -
headersobject -
expires_atstring (date-time)
-
-
-
-
409storage/direct-upload-unavailable-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files/{id}
One file
id* |
path | string |
-
200The file.-
dataobject-
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files/{id}
Rename or change visibility
id* |
path | string |
-
namestring -
visibilitystring: private, public
-
200The file.-
dataobject-
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files/{id}
Delete the file
id* |
path | string |
-
204Deleted. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files/{id}/complete
Finish a direct upload
Checks the object's size and type; a file that breaks the limits is deleted.
id* |
path | string |
-
200The file.-
dataobject-
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
-
409storage/upload-missing-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files/{id}/url
A 10-minute download link
id* |
path | string |
-
200A link that works without credentials until it expires.-
dataobject-
urlstring -
expires_atstring (date-time)
-
-
-
409storage/upload-pending-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/files/{file}/content
Download through a signed link
The link /files/{id}/url gives when files are stored on this server. It needs no app key or token, only its signature.
file* |
path | string | |
expires* |
query | integer | |
signature* |
query | string |
-
200The file's bytes. -
403The link expired or was changed.
/api/v2/public-files/{file}
A public file's stable URL
Redirects to a fresh download link. Needs no app key or token. Private files answer 404.
file* |
path | string |
-
302Redirect to the file. -
404An error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Data
JSON documents in the app's collections.
/api/v2/data/{collection}
List documents
Newest first. Who sees what follows the collection's access mode: everything (public_read;
authenticated_read when signed in), only your own (owner_only), nothing (server_only, 403).
collection* |
path | string | |
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of documents.-
dataarray of object-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/data/{collection}
Create a document with a new id
collection* |
path | string |
-
fields* object · A JSON object, at most 1 MiB and 64 levels deep.
-
201The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
413data/document-too-large-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/data/{collection}/query
Query documents
Over the documents you may read. Values match only fields of the same kind ("5" is not 5),
strings compare case-sensitively, != skips documents without the field. With order_by,
documents without a value of that type are left out; without it, newest first.
collection* |
path | string |
-
wherearray of array of any · Filters that must all match:[field, operator, value], for example["price", ">=", 10]. -
order_byobject-
field* string -
directionstring: asc, desc -
typestring: string, number
-
-
limitinteger -
cursorstring
-
200A page of documents.-
dataarray of object-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/data/{collection}/{id}
Get a document
404 when it doesn't exist or you may not read it.
collection* |
path | string | |
id* |
path | string |
-
200The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/data/{collection}/{id}
Create or replace a document
You can only replace your own documents.
collection* |
path | string | |
id* |
path | string | |
If-Match |
header | string | The ETag of the version you read, such as "3": write only over that version.
|
If-None-Match |
header | "*" | *: only create.
|
-
fields* object · A JSON object, at most 1 MiB and 64 levels deep.
-
200The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
201The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
412data/version-mismatch,data/already-exists-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/data/{collection}/{id}
Merge fields into a document
Nested objects merge key by key; anything else replaces.
collection* |
path | string | |
id* |
path | string | |
If-Match |
header | string | The ETag of the version you read, such as "3": write only over that version.
|
-
fields* object · A JSON object, at most 1 MiB and 64 levels deep.
-
200The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
412data/version-mismatch-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/data/{collection}/{id}
Delete a document
collection* |
path | string | |
id* |
path | string | |
If-Match |
header | string | The ETag of the version you read, such as "3": write only over that version.
|
-
204Deleted. -
412data/version-mismatch-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin
The server key and its app.
/api/v2/admin/app
The key's app and scopes
-
200The app and the key.-
dataobject-
appobject-
namestring -
keystring (uuid)
-
-
server_keyobject-
namestring -
prefixstring -
scopesarray of string
-
-
-
-
401server/invalid-key-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin users
Manage the app's users from your backend.
/api/v2/admin/users
List users
search |
query | string | Part of the email or name, any case. |
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of users, newest first.-
dataarray of object-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time) -
disabledboolean -
claimsobject -
providersarray of string: password, google, apple -
last_login_atstring or null (date-time)
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/users
Create a user
-
email* string (email) -
passwordstring -
first_namestring -
last_namestring -
email_verifiedboolean -
disabledboolean
-
201The user, as the backend sees it.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time) -
disabledboolean -
claimsobject -
providersarray of string: password, google, apple -
last_login_atstring or null (date-time)
-
-
-
403app/user-limit-reached-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
409auth/email-already-in-use-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
422auth/weak-password-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/users/{uid}
Get a user
uid* |
path | string |
-
200The user, as the backend sees it.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time) -
disabledboolean -
claimsobject -
providersarray of string: password, google, apple -
last_login_atstring or null (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/users/{uid}
Update a user
A new password or disabled true signs the user out everywhere.
uid* |
path | string |
-
emailstring (email) -
passwordstring -
first_namestring or null -
last_namestring or null -
email_verifiedboolean -
disabledboolean
-
200The user, as the backend sees it.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time) -
disabledboolean -
claimsobject -
providersarray of string: password, google, apple -
last_login_atstring or null (date-time)
-
-
-
409auth/email-already-in-use-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/users/{uid}
Delete a user
uid* |
path | string |
-
204Deleted. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/users/{uid}/revoke-sessions
Sign the user out everywhere
uid* |
path | string |
-
204Every session ended. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/users/{uid}/claims
Replace the custom claims
They reach the user's next access token. At most 1000 bytes; {} clears them.
uid* |
path | string |
-
claims* object
-
200The user, as the backend sees it.-
dataobject-
uidstring · The user's public id (a lowercase ULID). -
emailstring -
email_verifiedboolean -
first_namestring or null -
last_namestring or null -
photo_urlstring or null -
created_atstring (date-time) -
disabledboolean -
claimsobject -
providersarray of string: password, google, apple -
last_login_atstring or null (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin tokens
Check access tokens (introspection).
/api/v2/admin/tokens/verify
Check an access token
Always 200. Unlike offline verification, it also sees signed-out sessions and disabled users.
-
token* string
-
200Whether the token is active, and its claims.-
dataobject-
activeboolean -
reasonstring · When inactive: anauth/…code. -
uidstring -
sidstring -
emailstring or null -
email_verifiedboolean -
providerstring or null -
claimsobject -
auth_timeinteger or null -
iatinteger -
expinteger
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin points
Loyalty points.
/api/v2/admin/users/{uid}/points
Award points
uid* |
path | string |
-
points* integer · Not zero; negative takes points away. -
descriptionstring
-
201The entry and the new balance.-
dataobject-
pointsinteger -
descriptionstring or null -
created_atstring (date-time) -
balanceinteger -
tierstring: silver, gold, platinum
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin Remote Config
Publish and roll back templates.
/api/v2/admin/remote-config
The live template
The ETag is the version ("0" before the first publish).
-
200A version with its template; theETagis the version.-
dataobject-
versioninteger -
descriptionstring or null -
rollback_ofinteger or null -
published_atstring or null (date-time) -
published_byobject or null-
typestring: user, server_key -
namestring
-
-
templateobject · Conditions in priority order and typed parameters. See the Remote Config guide.-
conditionsarray of object-
name* string -
rules* array of object
-
-
parametersobject
-
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/remote-config/versions
List versions
Newest first, without templates. The last 300 are kept.
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of versions.-
dataarray of object-
versioninteger -
descriptionstring or null -
rollback_ofinteger or null -
published_atstring or null (date-time) -
published_byobject or null-
typestring: user, server_key -
namestring
-
-
templateobject · Conditions in priority order and typed parameters. See the Remote Config guide.-
conditionsarray of object-
name* string -
rules* array of object
-
-
parametersobject
-
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/remote-config/versions
Publish a template
Send If-Match: "<version you edited>" to avoid overwriting someone else's publish.
If-Match |
header | string | The ETag of the version you read, such as "3": write only over that version.
|
-
template* object · Conditions in priority order and typed parameters. See the Remote Config guide.-
conditionsarray of object-
name* string -
rules* array of object-
field* string: platform, app_version, language, tier, claim, percent -
valuesarray of string -
opstring: ==, !=, <, <=, >, >= -
valuestring -
namestring · The claim, forclaim. -
seedstring · Forpercent. -
fromnumber · Forpercent. -
tonumber · Forpercent.
-
-
-
parametersobject
-
-
descriptionstring
-
201A version with its template; theETagis the version.-
dataobject-
versioninteger -
descriptionstring or null -
rollback_ofinteger or null -
published_atstring or null (date-time) -
published_byobject or null-
typestring: user, server_key -
namestring
-
-
templateobject · Conditions in priority order and typed parameters. See the Remote Config guide.-
conditionsarray of object-
name* string -
rules* array of object
-
-
parametersobject
-
-
-
-
412remote-config/version-mismatch-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/remote-config/versions/{version}
One version with its template
version* |
path | integer |
-
200A version with its template; theETagis the version.-
dataobject-
versioninteger -
descriptionstring or null -
rollback_ofinteger or null -
published_atstring or null (date-time) -
published_byobject or null-
typestring: user, server_key -
namestring
-
-
templateobject · Conditions in priority order and typed parameters. See the Remote Config guide.-
conditionsarray of object-
name* string -
rules* array of object
-
-
parametersobject
-
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/remote-config/versions/{version}/rollback
Publish an old version again
Creates a new version with rollback_of.
version* |
path | integer |
-
201A version with its template; theETagis the version.-
dataobject-
versioninteger -
descriptionstring or null -
rollback_ofinteger or null -
published_atstring or null (date-time) -
published_byobject or null-
typestring: user, server_key -
namestring
-
-
templateobject · Conditions in priority order and typed parameters. See the Remote Config guide.-
conditionsarray of object-
name* string -
rules* array of object
-
-
parametersobject
-
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin push
Send push notifications.
/api/v2/admin/push/send
Send a push notification
Sent from the queue; failures are retried twice and dead tokens are disabled.
-
target* one ofOne of:-
type* "users" -
uids* array of string
or:-
type* "device" -
device_id* string
or:-
type* "topic" -
topic* string
or:-
type* "all"
-
-
titlestring -
bodystring -
imagestring (uri) · https only. -
dataobject · Up to 50 string values. -
badgeinteger -
soundstring
-
202The message and its delivery counts.-
dataobject-
idstring -
targetobject -
titlestring or null -
bodystring or null -
imagestring or null -
dataobject or null -
badgeinteger or null -
soundstring or null -
statusstring: queued, sending, done -
countsobject-
devicesinteger -
sentinteger -
failedinteger -
invalid_tokeninteger
-
-
created_atstring (date-time) -
completed_atstring or null (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/push/messages/{id}
A message and its delivery counts
id* |
path | string |
-
200The message and its delivery counts.-
dataobject-
idstring -
targetobject -
titlestring or null -
bodystring or null -
imagestring or null -
dataobject or null -
badgeinteger or null -
soundstring or null -
statusstring: queued, sending, done -
countsobject-
devicesinteger -
sentinteger -
failedinteger -
invalid_tokeninteger
-
-
created_atstring (date-time) -
completed_atstring or null (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin files
Every file of the app.
/api/v2/admin/files
List every file of the app
uid |
query | string | One user's files. |
owner |
query | string: app | app: only the app's own files.
|
folder |
query | string | |
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of files, newest first.-
dataarray of object-
uidstring or null · The owner; null for the app's own files. -
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/files
Upload an app file or a file for a user
The app's size and type limits apply; the user quota doesn't.
-
file* string (binary) -
namestring -
uidstring · A user's file; the app's own otherwise. -
folderstring -
visibilitystring: private, public
-
201The file, with its owner.-
dataobject-
uidstring or null · The owner; null for the app's own files. -
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/files/{id}
One file
id* |
path | string |
-
200The file, with its owner.-
dataobject-
uidstring or null · The owner; null for the app's own files. -
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/files/{id}
Rename or change visibility
id* |
path | string |
-
namestring -
visibilitystring: private, public
-
200The file, with its owner.-
dataobject-
uidstring or null · The owner; null for the app's own files. -
idstring -
namestring -
folderstring or null -
mime_typestring · Read from the content. -
sizeinteger -
checksumobject or null-
sha256string
-
-
visibilitystring: private, public -
public_urlstring or null · Public files only. -
statusstring: pending, ready -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/files/{id}
Delete a file
id* |
path | string |
-
204Deleted. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/files/{id}/url
A 10-minute download link
id* |
path | string |
-
200A link that works without credentials until it expires.-
dataobject-
urlstring -
expires_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Admin data
Every document of the app, whatever the access mode.
/api/v2/admin/data
The app's collections
-
200Every collection, by name.-
dataarray of object-
namestring -
access_modestring: owner_only, authenticated_read, public_read, server_only -
descriptionstring or null -
documentsinteger -
created_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/data/{collection}
List every document
collection* |
path | string | |
uid |
query | string | One user's documents. |
owner |
query | string: app | app: only the app's own documents.
|
limit |
query | integer | Page size. |
cursor |
query | string | meta.next_cursor of the previous page.
|
-
200A page of documents.-
dataarray of object-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/data/{collection}
Create a document
Owned by the app, or by the user named by "owner": "<uid>".
collection* |
path | string |
-
fields* object -
ownerstring or null · A user's uid; null or absent: the app's own document.
-
201The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/data/{collection}/query
Query every document
collection* |
path | string |
-
wherearray of array of any · Filters that must all match:[field, operator, value], for example["price", ">=", 10]. -
order_byobject-
field* string -
directionstring: asc, desc -
typestring: string, number
-
-
limitinteger -
cursorstring
-
200A page of documents.-
dataarray of object-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
metaobject-
next_cursorstring or null · Null on the last page.
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/data/{collection}/{id}
Get any document
collection* |
path | string | |
id* |
path | string |
-
200The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/data/{collection}/{id}
Create or replace any document
owner applies when the document is created.
collection* |
path | string | |
id* |
path | string | |
If-Match |
header | string | The ETag of the version you read, such as "3": write only over that version.
|
If-None-Match |
header | "*" | *: only create.
|
-
fields* object -
ownerstring or null · A user's uid; null or absent: the app's own document.
-
200The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
201The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
412data/version-mismatch,data/already-exists-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/data/{collection}/{id}
Merge fields into any document
collection* |
path | string | |
id* |
path | string | |
If-Match |
header | string | The ETag of the version you read, such as "3": write only over that version.
|
-
fields* object · A JSON object, at most 1 MiB and 64 levels deep.
-
200The document; its version is also theETagheader.-
dataobject-
idstring -
fieldsobject -
ownerstring or null · The owner's uid; null for the app's own documents. -
versioninteger · Increases with every write; also the ETag. -
created_atstring (date-time) -
updated_atstring (date-time)
-
-
-
412data/version-mismatch-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
-
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
/api/v2/admin/data/{collection}/{id}
Delete any document
collection* |
path | string | |
id* |
path | string | |
If-Match |
header | string | The ETag of the version you read, such as "3": write only over that version.
|
-
204Deleted. -
defaultAn error.-
error* object-
code* string · Stable; act on this. -
message* string · For people. -
fieldsobject · Per-field messages (validation errors).
-
-
Discovery
Token verification keys.
/.well-known/jwks.json
The public keys that sign access tokens (JWKS)
Pick the key whose kid matches the token header; refetch when a kid is unknown. Cacheable for 5 minutes.
-
200A JSON Web Key Set.-
keysarray of object-
kty"RSA" -
use"sig" -
alg"RS256" -
kidstring -
nstring -
estring
-
-
/.well-known/openid-configuration
Issuer and JWKS location
-
200Discovery document.-
issuerstring -
jwks_uristring
-