Consumer API

Momentco Platform API (1.0)

Download OpenAPI specification:

The Momentco Platform API description

Momentco Platform

App

AppController_getHello

Responses

Tracking

Track moment or list click event

Tracks MOMENT_CLICKED or LIST_CLICKED event when user clicks on a moment or list. Requires either momentId or listId (exactly one). Requires user or guest authentication (click events require userId or guestId per Analytics API spec).

Authorizations:
JWT-auth
Request Body schema: application/json
required
momentId
string

Moment ID (UUID) - required if listId not provided

listId
string

List ID (UUID) - required if momentId not provided

campaignId
string

Campaign ID (UUID) - optional, will use defaultCampaignId if not provided

Responses

Request samples

Content type
application/json
{
  • "momentId": "123e4567-e89b-12d3-a456-426614174000",
  • "listId": "123e4567-e89b-12d3-a456-426614174000",
  • "campaignId": "123e4567-e89b-12d3-a456-426614174000"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Event tracked successfully",
  • "eventType": "MOMENT_CLICKED"
}

Share

Get shareable URL for a moment or list

Returns a shareable URL for the specified moment or list. If used by a logged-in user, the URL includes the user ref code. Otherwise, returns the publisher API URL. Accessible by public, guest, and logged-in users.

Authorizations:
JWT-auth
path Parameters
type
required
string
Enum: "moment" "list"

Type of resource - either "moment" or "list"

id
required
string
Example: 123e4567-e89b-12d3-a456-426614174000

Resource ID (UUID)

query Parameters
campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Campaign ID for tracking (optional). If not provided, defaultCampaignId from resource will be used.

Responses

Response samples

Content type
application/json

User Location

Save user location data

Save user location and timezone information. Only inserts new record if location is different from last known location, otherwise updates timestamp.

Authorizations:
JWT-auth
Request Body schema: application/json
required
timezone
required
string

User timezone (e.g., America/New_York)

city
string

City name

country
string

Country name

latitude
number

Latitude coordinate

longitude
number

Longitude coordinate

source
required
string
Default: "manual"
Enum: "manual" "geolocation" "browser"

Source of the location data

Responses

Request samples

Content type
application/json
{
  • "timezone": "America/New_York",
  • "city": "New York",
  • "country": "United States",
  • "latitude": 40.7128,
  • "longitude": -74.006,
  • "source": "manual"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "action": "inserted",
  • "locationId": "123e4567-e89b-12d3-a456-426614174000"
}

Get current user location

Get the most recent location data for the current user.

Authorizations:
JWT-auth

Responses

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000",
  • "timezone": "America/New_York",
  • "city": "New York",
  • "country": "United States",
  • "latitude": 40.7128,
  • "longitude": -74.006,
  • "source": "manual",
  • "createdAt": "2024-01-15T10:30:00.000Z",
  • "updatedAt": "2024-01-15T10:30:00.000Z"
}

Internal Analytics

Get user activity history

Get login, refresh, and logout activity history for a specific user.

Authorizations:
JWT-auth
query Parameters
userId
required
string <uuid>

User ID to get activity for

startDate
string <date>

Start date for filtering (ISO 8601)

endDate
string <date>

End date for filtering (ISO 8601)

activityType
string
Enum: "login" "refresh" "logout"

Filter by activity type

limit
number

Number of records to return

offset
number

Number of records to skip

Responses

Get user activity statistics

Get statistical analysis of user activity patterns.

Authorizations:
JWT-auth
query Parameters
userId
required
string <uuid>

User ID to get stats for

timeframe
string
Enum: "24h" "7d" "30d"

Timeframe for statistics

Responses

Get user location history

Get location history for a specific user.

Authorizations:
JWT-auth
query Parameters
userId
required
string <uuid>

User ID to get location for

startDate
string <date>

Start date for filtering (ISO 8601)

endDate
string <date>

End date for filtering (ISO 8601)

limit
number

Number of records to return

offset
number

Number of records to skip

Responses

Get current user location

Get the most recent location data for a specific user.

Authorizations:
JWT-auth
query Parameters
userId
required
string <uuid>

User ID to get current location for

Responses

Users

Update user profile

Update profile information for the logged-in user. All fields are optional.

Authorizations:
JWT-auth
Request Body schema: application/json
required
firstName
string

User first name

lastName
string

User last name

displayName
string

User display name

Responses

Request samples

Content type
application/json
{
  • "firstName": "John",
  • "lastName": "Doe",
  • "displayName": "John Doe"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "firebaseUid": "string",
  • "email": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "displayName": "string",
  • "photoURL": "string",
  • "phoneNumber": "string",
  • "isActive": true,
  • "emailVerified": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Request OTP for phone number update

Send an OTP to the specified phone number for verification. The returned session token must be used when verifying the OTP.

Authorizations:
JWT-auth
Request Body schema: application/json
required
phoneNumber
required
string

Phone number in E.164 format (e.g., +1234567890)

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "+1234567890"
}

Response samples

Content type
application/json
{
  • "message": "OTP sent successfully",
  • "sessionInfo": "session-id-123"
}

Verify OTP and update phone number

Verify the OTP code and update the user's phone number. Requires the session token from the request OTP endpoint.

Authorizations:
JWT-auth
Request Body schema: application/json
required
phoneNumber
required
string

Phone number in E.164 format (e.g., +1234567890)

code
required
string

OTP code received via SMS

sessionToken
required
string

Session token received from the request OTP endpoint

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "+1234567890",
  • "code": "123456",
  • "sessionToken": "dXNlcjoxMjM6KzEyMzQ1Njc4OTA="
}

Response samples

Content type
application/json
{
  • "message": "Phone number verified and updated successfully",
  • "user": { }
}

Google Calendar Auth

Generate Google OAuth authorization URL

Generates a secure OAuth URL for Google Calendar integration. Accepts both authenticated users and guest users. Returns the URL that the frontend should redirect the user to. The state parameter is used for CSRF protection. Accepts optional redirect URL parameter.

Authorizations:
JWT-auth
Request Body schema: application/json
required
redirectUrl
required
string

Redirect URL for OAuth callback (required)

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{}

Handle Google OAuth callback

Exchanges authorization code for tokens and stores encrypted tokens. For authenticated users: Updates existing user with calendar connection. For guest users: Creates full user account and migrates guest subscriptions. Returns app JWT and user information.

Authorizations:
JWT-auth
query Parameters
campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Optional campaign ID for tracking sign-up/sign-in events. If not provided, events will be inserted without a campaignId.

Request Body schema: application/json
required
code
required
string

Authorization code from OAuth provider

state
required
string

State parameter for CSRF protection

redirectUri
required
string

Redirect URI used in the authorization URL (must match)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "status": "success",
  • "isNewUser": false,
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "user": {}
}

Google Calendar

Check Google Calendar integration status

Returns whether the user has Google Calendar connected and when it was connected.

Authorizations:
JWT-auth

Responses

Response samples

Content type
application/json
{
  • "connected": true,
  • "connectedAt": "2025-10-15T18:45:00.000Z",
  • "googleId": "123456789",
  • "email": "user@example.com"
}

Handle Google Calendar webhook notifications

Receives push notifications from Google when calendar changes occur. Note: This endpoint does not require authentication as it is called by Google.

Authorizations:
JWT-auth
Request Body schema: application/json
required
channelId
string

Channel ID

resourceId
string

Resource ID

state
string

Resource state

resourceUri
string

Resource URI

Responses

Request samples

Content type
application/json
{
  • "channelId": "string",
  • "resourceId": "string",
  • "state": "sync",
  • "resourceUri": "string"
}

Response samples

Content type
application/json
{
  • "status": "received",
  • "processedAt": "2025-10-15T18:45:00.000Z"
}

Internal Calendar APIs

Sync unsynced moments to Google Calendar (Internal API) - DEPRECATED

DEPRECATED: Use process-sync-queue instead. This endpoint can create duplicate tasks. Internal API to sync all pending user calendar moments to Google Calendar. Updates sync status to "synced" on success or "failed" on error. No authentication required - internal use only.

Authorizations:
x-api-key
path Parameters
userId
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "totalMoments": 5,
  • "syncedCount": 4,
  • "failedCount": 1,
  • "results": [
    ]
}

Update moment data and mark for sync (Internal API)

Fetches latest moment data from Publisher API and updates all user-calendar-moments with the given momentId. All fields (title, description, dates, timezone, metadata) are fetched from Publisher API using the same logic as moment creation. The version field is automatically incremented for each updated record. Sync flags (needsSync, needsQueued, priority) are updated as usual. No request body required - all data comes from Publisher API. No authentication required - internal use only.

Authorizations:
x-api-key
path Parameters
momentId
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "updatedCount": 5000,
  • "message": "Successfully updated 5000 moments and marked for sync"
}

Delete moment from user calendars (Internal API)

Deletes a moment from all user calendars. Only updates the database - task creation is handled by the sync queue. If softDelete=true (default), updates calendar event titles to "[CANCELED] {title}" and marks for sync (UPDATE tasks). If softDelete=false, marks moments as removed and marks for sync queue to create DELETE tasks. No authentication required - internal use only.

Authorizations:
x-api-key
path Parameters
momentId
required
string
query Parameters
softDelete
boolean
Example: softDelete=true

If true, soft delete (update title). If false, hard delete (remove event). Default: true

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "deletedCount": 5000,
  • "message": "Successfully soft deleted 5000 moments"
}

Process sync queue (Internal API)

Fetches up to 100 calendar moments needing sync and creates cloud tasks. This endpoint should be called periodically by Cloud Scheduler (e.g., every minute). Handles CREATE (new moments), UPDATE (moment updates including soft-deleted), and DELETE (hard-deleted moments) operations. No authentication required - internal use only.

Authorizations:
x-api-key
query Parameters
batchSize
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "momentsFound": 100,
  • "tasksCreated": 95,
  • "usersProcessed": 15,
  • "message": "Processed 100 moments across 15 users, created 95 tasks"
}

Check user responses to calendar events (Internal API)

Checks user responses to calendar events. Checks events 7 days after posting (if not ended) and after end date. This endpoint should be called periodically by Cloud Scheduler (e.g., daily). No authentication required - internal use only.

Authorizations:
x-api-key
query Parameters
batchSize
number
Example: batchSize=100

Number of events to check (default: 100)

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "momentsFound": 50,
  • "checked": 48,
  • "kept": 30,
  • "deleted": 18,
  • "message": "Checked 48 events across 5 users"
}

Manually check user response for a specific event (Temporary - Internal API)

TEMPORARY: Manually triggers response check for a specific user calendar moment. This endpoint is for testing and manual operations. No authentication required - internal use only.

Authorizations:
x-api-key
path Parameters
userCalendarMomentId
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "taskId": "task-abc123",
  • "message": "Successfully queued response check for moment abc-123. Task ID: task-abc123"
}

Scan for legacy (unencrypted) tokens (TEMPORARY)

TEMPORARY: Scans Firestore user_tokens collection to detect tokens stored in plain text format (without encryption). This helps identify users affected by the token decryption issue. Results are logged for investigation. No authentication required - internal use only.

Authorizations:
x-api-key
query Parameters
limit
number
Example: limit=1000

Maximum number of tokens to scan (default: 1000)

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "totalScanned": 150,
  • "legacyTokensFound": 5,
  • "legacyUsers": [
    ],
  • "message": "Scanned 150 tokens, found 5 with legacy format"
}

Migrate legacy (unencrypted) tokens to encrypted format (TEMPORARY)

TEMPORARY: Finds users with plain text tokens, refreshes them using Google API, and saves the new tokens in encrypted format. This fixes the token decryption issue. No authentication required - internal use only.

Authorizations:
x-api-key
query Parameters
limit
number
Example: limit=50

Maximum number of users to process (default: 50)

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "totalProcessed": 13,
  • "successful": 10,
  • "failed": 3,
  • "results": [
    ],
  • "message": "Processed 13 users, 10 successful, 3 failed"
}

Handle Pub/Sub moment version published event (Internal API)

Receives Pub/Sub push messages for moment.version.published events. Fetches the published version from publisher-api, prepares calendar data, stores it in Redis cache, and bulk updates user_calendar_moments. No authentication required - internal use only.

Authorizations:
x-api-key

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Users - My Calendars

List my calendars

Returns all calendars in the current user's bucket (linked via OAuth or add calendar).

Authorizations:
JWT-auth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Set default calendar

Set the calendar used for new subscriptions when calendarId is not provided. Calendar must be in the user's bucket.

Authorizations:
JWT-auth
Request Body schema: application/json
required
calendarId
required
string

Calendar UUID to set as default. Must be in the current user's bucket.

Responses

Request samples

Content type
application/json
{
  • "calendarId": "123e4567-e89b-12d3-a456-426614174000"
}

Remove calendar from my bucket

Removes the calendar from the current user's bucket. Calendar and tokens remain for other users who have it.

Authorizations:
JWT-auth
path Parameters
calendarId
required
string

Calendar UUID

Responses

Authentication

Login with Firebase ID token

Authenticates user with Firebase ID token and returns JWT tokens

query Parameters
campaignId
required
string
Request Body schema: application/json
required
idToken
required
string

Firebase ID token for authentication

Responses

Request samples

Content type
application/json
{
  • "idToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOWdkazcifQ..."
}

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Refresh JWT tokens

Generate new access and refresh tokens using a valid refresh token

Request Body schema: application/json
required
refreshToken
required
string

JWT refresh token

Responses

Request samples

Content type
application/json
{
  • "refreshToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOWdkazcifQ..."
}

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Get current user information

Returns the current authenticated user's information from the JWT token

Authorizations:
JWT-auth

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Logout user

Logout the current authenticated user and log the logout activity in user_login_activities table

Authorizations:
JWT-auth
Request Body schema: application/json
required
reason
string

Optional logout reason or note

Responses

Request samples

Content type
application/json
{
  • "reason": "User initiated logout"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Successfully logged out",
  • "loggedOutAt": "2024-01-15T10:30:00.000Z"
}

Guest Authentication

Create guest user

Creates a new guest user and returns access/refresh tokens. Optionally accepts momentId, listId, or teamId to track MOMENT_VIEWED, LIST_VIEWED, or TEAM_VIEWED events after guest user creation. Call this when a user first visits the app without logging in.

Request Body schema: application/json
required
momentId
string

Optional moment ID to track MOMENT_VIEWED event after guest user creation

listId
string

Optional list ID to track LIST_VIEWED event after guest user creation

teamId
string

Optional team ID to track TEAM_VIEWED event after guest user creation

campaignId
string

Optional campaign ID for tracking view events

Responses

Request samples

Content type
application/json
{
  • "momentId": "123e4567-e89b-12d3-a456-426614174000",
  • "listId": "123e4567-e89b-12d3-a456-426614174000",
  • "teamId": "123e4567-e89b-12d3-a456-426614174000",
  • "campaignId": "123e4567-e89b-12d3-a456-426614174000"
}

Response samples

Content type
application/json
{
  • "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "guestId": "550e8400-e29b-41d4-a716-446655440000",
  • "guestToken": "guest_a1b2c3d4e5f6g7h8...",
  • "isGuest": true
}

Refresh guest tokens

Generate new guest access and refresh tokens using a valid guest refresh token

Request Body schema: application/json
required
refreshToken
required
string

JWT refresh token

Responses

Request samples

Content type
application/json
{
  • "refreshToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOWdkazcifQ..."
}

Response samples

Content type
application/json
{
  • "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "guestId": "550e8400-e29b-41d4-a716-446655440000",
  • "guestToken": "guest_a1b2c3d4e5f6g7h8...",
  • "isGuest": true
}

User Subscriptions

Check if listIds are subscribed by auth user

  Check which list IDs from the provided comma-separated list are subscribed by the authenticated user. 
  Returns a map of list ID to boolean subscription status.
Authorizations:
JWT-authJWT-auth
query Parameters
ids
required
string
Example: ids=list-id-1,list-id-2,list-id-3

Comma-separated list of list IDs to check

Responses

Response samples

Content type
application/json
{
  • "list-id-1": true,
  • "list-id-2": false,
  • "list-id-3": true
}

Check if momentIds are subscribed by auth user

Check which moment IDs from the provided comma-separated list are subscribed by the authenticated user. Returns a map of moment ID to boolean subscription status.

Authorizations:
JWT-authJWT-auth
query Parameters
ids
required
string
Example: ids=moment-id-1,moment-id-2,moment-id-3

Comma-separated list of moment IDs to check

Responses

Response samples

Content type
application/json
{
  • "moment-id-1": true,
  • "moment-id-2": false,
  • "moment-id-3": true
}

Subscribe to moments or lists

Create subscription to moments or lists for authenticated user. For list subscriptions, only the first resourceId will be used. Validates resources, creates subscriptions, generates calendar moments, and triggers async calendar sync.

Authorizations:
JWT-auth
Request Body schema: application/json
required
subscriptionType
required
string
Enum: "moment" "list"

Type of subscription - either moment or list

resourceIds
required
Array of strings

Array of resource IDs (moment IDs or list IDs) being subscribed to. For list subscriptions, only the first item will be used.

calendarId
string

Calendar to use for this subscription. Must be in the user's bucket. If omitted, the user's default calendar is used.

campaignId
string

Campaign ID for tracking (optional). If not provided, defaultCampaignId from moment/list will be used.

metadata
object

Additional metadata about the subscription preferences

Responses

Request samples

Content type
application/json
{
  • "subscriptionType": "moment",
  • "resourceIds": [
    ],
  • "calendarId": "123e4567-e89b-12d3-a456-426614174000",
  • "campaignId": "123e4567-e89b-12d3-a456-426614174000",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Subscription created successfully. Calendar sync in progress.",
  • "data": {
    }
}

Outlook Calendar Auth

Generate Outlook OAuth authorization URL

Generates a secure OAuth URL for Outlook Calendar integration. Accepts both authenticated users and guest users. Returns the URL that the frontend should redirect the user to. The state parameter is used for CSRF protection. Accepts optional redirect URL parameter.

Authorizations:
JWT-auth
Request Body schema: application/json
required
redirectUrl
required
string

Redirect URL for OAuth callback (required)

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
{}

Handle Outlook OAuth callback

Exchanges authorization code for tokens and stores encrypted tokens. For authenticated users: Updates existing user with calendar connection. For guest users: Creates full user account and migrates guest subscriptions. Returns app JWT and user information.

Authorizations:
JWT-auth
query Parameters
campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Optional campaign ID for tracking sign-up/sign-in events. If not provided, events will be inserted without a campaignId.

Request Body schema: application/json
required
code
required
string

Authorization code from OAuth provider

state
required
string

State parameter for CSRF protection

redirectUri
required
string

Redirect URI used in the authorization URL (must match)

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "status": "success",
  • "isNewUser": false,
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  • "user": {}
}

Tags

Health check for tags service

Responses

Suggest next-layer tags Deprecated

DEPRECATED: This endpoint is deprecated and may be removed in a future version. Returns suggested tags based on provided context and already-used tags.

Request Body schema: application/json
required
allContext
required
Array of strings

All available context tags

object

Options for suggestion generation

usedTags
required
Array of strings

Already used tags

Responses

Request samples

Content type
application/json
{
  • "allContext": [
    ],
  • "options": {
    },
  • "usedTags": [
    ]
}

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Get filterable taxonomies

Returns all filterable taxonomy tags that can be used for filtering moments and lists. This is a public endpoint and does not require authentication.

query Parameters
entityType
required
string
Enum: "moment" "moment-list"

Entity type to get filterable taxonomies for

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Moments

Get moment by team slug and moment slug

Fetches moment data by team slug and moment slug from the publisher API. Supports includes query parameter to fetch related resources like brand-kit, brand-info. MOMENT_VIEWED event is tracked only if user or guest is authenticated.

Authorizations:
JWT-auth
path Parameters
teamSlug
required
string
Example: houston-rockets

The team slug

momentSlug
required
string
Example: 2026-01-14-test-live-qa-session

The moment slug

query Parameters
includes
string
Example: includes=brand-kit,brand-info

Comma-separated list of related resources to include (e.g., brand-kit,brand-info)

campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Campaign ID for tracking (optional). If not provided, defaultCampaignId from moment will be used.

ref
string
Example: ref=aB3dE5fG

User ref code for tracking who shared the moment (optional). If provided, sharedBy section will be included in response.

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Get moment by moment slug

Fetches moment data by moment slug from the publisher API (without requiring team slug). Supports includes query parameter to fetch related resources like brand-kit, brand-info. MOMENT_VIEWED event is tracked only if user or guest is authenticated.

Authorizations:
JWT-auth
path Parameters
momentSlug
required
string
Example: 2026-01-14-test-live-qa-session

The moment slug

query Parameters
includes
string
Example: includes=brand-kit,brand-info

Comma-separated list of related resources to include (e.g., brand-kit,brand-info)

campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Campaign ID for tracking (optional). If not provided, defaultCampaignId from moment will be used.

ref
string
Example: ref=aB3dE5fG

User ref code for tracking who shared the moment (optional). If provided, sharedBy section will be included in response.

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Moments Lists

Get list by global slug

Fetches list data by global slug from the publisher API. Supports include query parameter to fetch related resources like moments, brand-kit, and brand-info. LIST_VIEWED event is tracked only if user or guest is authenticated.

Authorizations:
JWT-auth
path Parameters
listSlug
required
string
Example: lakers-regular-season-2024

The global slug of the list (unique across all teams)

query Parameters
include
string
Example: include=moments,brand-kit,brand-info

Comma-separated list of related resources to include (e.g., moments,brand-kit,brand-info)

campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Campaign ID for tracking (optional). If not provided, defaultCampaignId from list will be used.

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Get list by team slug and list slug

Fetches list data by team slug and list slug from the publisher API. Supports include query parameter to fetch related resources like moments, brand-kit, and brand-info. LIST_VIEWED event is tracked only if user or guest is authenticated.

Authorizations:
JWT-auth
path Parameters
teamSlug
required
string
Example: lakers

The slug of the team that owns the list

listSlug
required
string
Example: regular-season-2024

The team slug of the list (unique within the team)

query Parameters
include
string
Example: include=moments,brand-kit,brand-info

Comma-separated list of related resources to include (e.g., moments,brand-kit,brand-info)

campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Campaign ID for tracking (optional). If not provided, defaultCampaignId from list will be used.

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Teams

Get team by team slug

Fetches team data by team slug from the publisher API. Supports includes query parameter to fetch related resources like brand-kit, brand-info, and moments. TEAM_VIEWED event is tracked only if user or guest is authenticated.

Authorizations:
JWT-auth
path Parameters
teamSlug
required
string
Example: marketing-team

The team slug

query Parameters
includes
string
Example: includes=brand-kit,brand-info,moments

Comma-separated list of related resources to include (e.g., brand-kit,brand-info,moments). Moments will return published moments for the team starting from today, along with availableTagIds showing all unique tag IDs in matching documents.

campaignId
string
Example: campaignId=123e4567-e89b-12d3-a456-426614174000

Campaign ID for tracking (optional). If not provided, defaultCampaignId from team will be used.

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Get team moments with cursor-based pagination

Fetches published moments for a team with cursor-based pagination. Use the nextCursor from the team by slug response (or previous moments response) to fetch the next page. Returns moments starting from today when cursor is not provided. Supports filtering by tags (comma-separated, AND logic). Supports timezone parameter for time-based tag conversions (e.g., time.today, time.tomorrow).

path Parameters
teamId
required
string
Example: cb4b122f-41d0-4a79-9391-280d88f2c462

The team ID (UUID)

query Parameters
cursor
string
Example: cursor=eyJzdGFydERhdGVUaW1lIjoiMjAyNS0xMi0xNlQwODowMDowMC4wMDBaIiwiaWQiOiJjMDZmOWEzZS1kMTIzLTRmMDAtYWU2Yi00MTU2NmMyZjZiOWIifQ==

Cursor for pagination. Use the nextCursor from the previous response to fetch the next page.

limit
number [ 1 .. 100 ]
Default: 20
Example: limit=20

Number of items per page

tags
string
Example: tags=event_type.merch_drop,event_type.game

Comma-separated list of tags to filter moments. All specified tags must match.

timezone
string
Example: timezone=America/New_York

IANA timezone name for time-based tag conversions (e.g., "America/New_York", "Europe/London")

Responses

Response samples

Content type
application/json
{
  • "meta": { },
  • "data": {
    }
}

Admin - Migrations (Temporary)

Migrate Firestore tokens to new format (userId_provider)

  Migrates `user_tokens` from old format (document ID = `userId`) to new format (document ID = `userId_provider`, e.g. `userId_google`) in three phases.
  
  **Parameters:**
  - **`dryRun`** (default: false): When `true`, no writes. Response shows how many would be copied and/or deleted. **Phase 1** – run first to validate.
  - **`copyToNewFormat`** (default: false): When `true`, for each old-format doc creates a new doc with ID `userId_google` and data + `provider: 'google'`. Old docs are **not** deleted, so both old and new exist. **Phase 2** – run after dry run, then verify the app works with new format.
  - **`deleteOldFormat`** (default: false): When `true`, deletes every document whose ID is old format (no `_google`/`_outlook` suffix). **Phase 3** – run only after confirming everything works with new format.
  
  **Recommended flow:**
  1. `dryRun: true` (copyToNewFormat + deleteOldFormat false) → check counts.
  2. `copyToNewFormat: true`, `deleteOldFormat: false` → both formats exist; verify app with new format.
  3. `deleteOldFormat: true` (copyToNewFormat false) → remove old-format docs only.
  
  ⚠️ **WARNING**: Data migration. Backup before Phase 2/3. Run Phase 3 only after verification.
Authorizations:
JWT-auth
Request Body schema: application/json
required
dryRun
boolean
Default: false

When true, no writes are performed; response shows what would be copied and/or deleted. Use first to validate (Phase 1).

copyToNewFormat
boolean
Default: false

When true, creates new-format documents (userId_provider) with copied data + provider field. Old documents are left in place so both exist (Phase 2).

deleteOldFormat
boolean
Default: false

When true, deletes old-format documents (document ID = userId only). Run only after verifying app works with new format (Phase 3).

Responses

Request samples

Content type
application/json
{
  • "dryRun": true,
  • "copyToNewFormat": false,
  • "deleteOldFormat": false
}

Response samples

Content type
application/json
{
  • "totalDocuments": 150,
  • "copiedCount": 145,
  • "deletedCount": 0,
  • "skippedCount": 5,
  • "errorCount": 0,
  • "errors": [ ],
  • "dryRun": false,
  • "message": "Copied 145 to new format; deleted 0 old format"
}

Phase 1: Copy Firestore tokens to cal_<calendarId>

  For each user_calendars row, reads token doc `userId_provider` and writes to `cal_<calendarId>`.
  Run after DB migrations 1922 (users provider/providerId, calendars, user_calendars, backfill).
  **dryRun** (default: false): when true, no writes; response shows counts.
Authorizations:
JWT-auth
Request Body schema: application/json
required
dryRun
boolean
Default: false

When true, no writes; response shows what would be copied

Responses

Request samples

Content type
application/json
{
  • "dryRun": false
}

Response samples

Content type
application/json
{
  • "totalLinks": 0,
  • "copiedCount": 0,
  • "skippedCount": 0,
  • "errorCount": 0,
  • "errors": [
    ],
  • "dryRun": true,
  • "message": "string"
}