Core Platform
Authentication
23 endpointsValidate an activation token.
Called when user clicks the activation link in their email.
Returns user and workspace info if valid.
Does NOT require authentication - the token is the authentication.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | query | string | ✓ |
token | query | string | ✓ |
Response
200
Get current user information.
If workspace_id is provided, also returns the member record for that workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | query | string |
Response
200
Stream provisioning progress via Server-Sent Events.
No authentication required - the job_id acts as a secret token.
Events:
• status: RUNNING, COMPLETED, FAILED
• progress: 0-100
• current_step: validating, creating_user, running_migrations, etc.
• result.message: Human-readable status message
On COMPLETED:
• result.access_token, result.refresh_token
• result.workspace_id, result.workspace_name
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
Response
200
Get details about a Stripe payment invite.
This endpoint is used when a user clicks the registration link from
their onboarding email after paying via Stripe Checkout.
Does NOT require authentication - the invite code is the authentication.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
invite_code | path | string | ✓ |
Response
200
Get user information by ID
Requires permission to view the user (must have same or higher role).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
user_id | path | string | ✓ |
Response
200
Complete account activation by setting password.
Called after user enters their password in the activation form.
Returns access tokens on success.
Does NOT require authentication - the token is the authentication.
Response
200
Resend activation email to a user.
Useful if the original email was lost or expired.
Response
200
Check if a Clerk-authenticated user exists in our database.
This endpoint is called from the frontend after a user signs in with Clerk.
It does NOT create users - users must go through our signup/payment flow first.
Flow:
1. Frontend authenticates user via Clerk
2. Frontend calls this endpoint with Clerk user info
3. We check if user exists by email (or clerk_id if stored)
4. If exists: return tokens for session
5. If not exists: return { exists: false } - frontend redirects to payment
Security: This endpoint is protected by X-Clerk-Secret header validation.
Response
200
Exchange an impersonation token for user authentication tokens.
This endpoint is called by the frontend to convert an impersonation token
into a regular user session. The token must be valid and not expired.
Security:
• Token is verified and decoded
• Token must have type="impersonation"
• User must exist and be active
• Token expiration is checked
Response
200
Login user
Response
200
Logout user (client should delete tokens)
Response
200
Look up a payment invite by email address.
Used by the /final-process page where users enter their email and access code
to find their invite and continue to registration.
Access code is validated but not strictly enforced for security through obscurity.
Does NOT require authentication.
Response
200
Upload profile picture for current user
Response
200
Refresh access token
Response
200
Response Refresh Token Api V1 Auth Refresh Post
Register a new user (legacy endpoint - use /signup for full registration)
Response
201
Request a password reset email
This endpoint will:
1. Find the user by email
2. Generate a secure password reset token
3. Store the token with expiration (1 hour)
4. Send password reset email with token link
Note: For security, this endpoint always returns success even if user doesn't exist
Response
200
Reset password using the token from email
This endpoint will:
1. Validate the reset token
2. Check token expiration
3. Update user's password
4. Clear the reset token
Response
200
Complete registration flow with workspace creation and Stripe trial.
This endpoint:
1. Creates user account
2. Creates workspace based on company name
3. Provisions tenant database with migrations
4. Creates Member record in tenant database
5. Seeds initial data (actions, recordsets)
6. Creates Stripe customer and subscription with 3-day trial
If payment_method_id is provided:
• Creates subscription immediately with trial
• User is charged automatically after trial ends unless canceled
If payment_method_id is NOT provided:
• Returns a Stripe Checkout URL for payment
• User must complete checkout to activate subscription
Response
201
Complete registration using a Stripe payment invite.
This endpoint is for users who have already paid via Stripe Checkout
but don't have an account yet. Their payment is already processed,
so we just need to:
1. Validate the invite code
2. Create user account
3. Create workspace
4. Provision tenant database
5. Link workspace to existing Stripe subscription
6. Mark invite as used
Does NOT require authentication - the invite code is the authentication.
Password is optional if clerk_id is provided (user authenticated via Clerk social login).
In that case, a random secure password is generated - the user will sign in via Clerk.
Response
201
Async signup with streaming progress.
Returns immediately with a job_id. Client should connect to the
stream endpoint to receive real-time progress updates.
When provisioning completes, the stream will include tokens and
workspace info for the client to use.
Flow:
1. POST /signup/stripe-invite/async -> {job_id, stream_url}
2. GET /signup/jobs/{job_id}/stream -> SSE stream with progress
3. On COMPLETED event: {access_token, workspace_id, ...}
Response
200
Upload profile picture for a user
• POST /me/avatar: Upload for current user
• POST /{user_id}/avatar: Upload for another user (requires permission)
Uploads to Google Cloud Storage with path:
{bucket_name}/{workspace_id}/profile-image/{filename}
Parameters
| Name | In | Type | Required |
|---|---|---|---|
user_id | path | string | ✓ |
Response
200
Update current user profile
Response
200
Update user profile by ID
Requires permission to edit the user (must have same or higher role).
Can update: name, email, title, phone, bio, avatar_url, role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
user_id | path | string | ✓ |
Response
200
Workspaces
16 endpointsList all workspaces for the current user
Response
200
Get invitation details without accepting it
This endpoint does NOT require authentication - used to check if user needs to set password.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
token | query | string | ✓ |
Response
200
Get a specific workspace
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
Response
200
List all members of a workspace with their status
Shows:
• Active members
• Pending invitations (users who haven't accepted yet)
• Member details (email, name, role, etc.)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
Response
200
Create a new workspace
The workspace database is provisioned with an empty schema.
No sample data is seeded - tenants start with a clean slate.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
skip_seed | query | boolean |
Response
201
Accept a workspace invitation using the token from email
This endpoint does NOT require authentication - the token is the authentication.
If the user doesn't have a password, one must be provided.
After accepting, the user can log in and access the workspace.
Response
200
Cancel a pending workspace invitation
Requires admin or owner role in the workspace.
Response
200
Provision a new workspace with an owner (Admin/Superuser only).
This will:
1. Check if user with email exists, if not create them
2. Create the workspace
3. Create WorkspaceMember (owner role) in main database
4. Provision tenant database with migrations
5. Create Member in tenant database
Requires: current_user must be is_superuser or is_staff
Response
200
Switch to a different workspace
Response
200
Invite a user to a workspace via email
The user must already be registered in the system. They will receive
an email with an invitation link to join the workspace.
Requires admin or owner role in the workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
Response
201
Generate an invite link without sending email.
Returns the invite URL for copying/sharing via Slack etc.
Generates a new token (invalidates any previous token).
Requires admin or owner role in the workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
Response
200
Resend an invitation email to a user
Generates a new invitation token and sends a new email.
Requires admin or owner role in the workspace.
Accepts either member_id (WorkspaceMember ID) or user_id (User ID).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
Response
200
Send a password reset email for a workspace member (admin-triggered).
Requires admin or owner role in the workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
user_id | path | string | ✓ |
Response
200
Generate a password reset link without sending email.
Returns the reset URL for copying/sharing via Slack etc.
Uses 24-hour expiry (longer than email-triggered resets).
Requires admin or owner role in the workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
user_id | path | string | ✓ |
Response
200
Update a workspace (requires owner or admin role)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
Response
200
Remove a member from a workspace
Handles three scenarios:
1. If member hasn't accepted invite: Delete WorkspaceMember and InvitationToken
2. If they have accepted invite: Delete Member from tenant DB, then WorkspaceMember
3. If they have no other workspace memberships: Also delete the User
Requires admin or owner role in the workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
member_id | path | string | ✓ |
Response
200
Members
15 endpointsList all members in the current workspace with pagination support.
Note: Members table is in tenant database, but we join with Users from main database
Parameters
| Name | In | Type | Required |
|---|---|---|---|
search | query | string | |
is_active | query | string | |
skip | query | integer | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Get all workspace members with minimal fields for client-side caching.
Returns all active members without pagination. Designed for efficient
bulk loading into browser memory for instant access in dropdowns,
@mentions, and assignment selectors.
Fields returned: id, email, full_name, display_name, avatar_url, role
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get the current member's full profile.
Returns the authenticated user's member record for the current workspace,
including their role, profile information, and onboarding status.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get the current member's onboarding tour completion status.
Returns a dictionary of tour IDs to completion status.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get a specific member by ID
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get deletion info for a member.
Returns:
• workspace_count: Number of workspaces this user belongs to
• can_delete_user: True if user can be permanently deleted (only in 1 workspace)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get all items owned by or assigned to a member.
This is used for offboarding to show what needs to be reassigned
before removing a member from the workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new member (invite to workspace)
This will:
1. Check if user exists in main database
2. Create WorkspaceMember in main database
3. Create Member in tenant database
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Update a tour's completion status for the current member.
Call this when a user completes or skips a tour.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Upload a profile avatar for a member.
• Members can upload their own avatar
• Admins/owners can upload avatars for any member
• Files are stored in GCS (cloud) or local uploads folder (development)
• Returns a signed URL for GCS or local path
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Bulk reassign all items from one member to another.
This should be called before removing a member from the workspace
to ensure continuity of ownership for actions, goals, records, etc.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a member
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Reset tour completion status for the current member.
If tour_id is provided, resets only that tour.
If tour_id is None, resets all tours.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Remove a member from workspace
This will:
1. Delete Member from tenant database
2. Optionally remove WorkspaceMember from main database
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Permanently delete a user and remove them from all workspaces.
This will:
1. Check if user is only in this workspace (required)
2. Delete Member from tenant database
3. Delete WorkspaceMember from main database
4. Delete User from main database
CAUTION: This action is irreversible!
Parameters
| Name | In | Type | Required |
|---|---|---|---|
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Teams
9 endpointsList all teams in the current workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
search | query | string | |
is_active | query | string | |
parent_team_id | query | string | |
x-workspace-id | header | string |
Response
200
Get a specific team by ID
Parameters
| Name | In | Type | Required |
|---|---|---|---|
team_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all members of a team
Parameters
| Name | In | Type | Required |
|---|---|---|---|
team_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new team (requires can_create_team permission)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Add a member to a team
Parameters
| Name | In | Type | Required |
|---|---|---|---|
team_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Update a team
Parameters
| Name | In | Type | Required |
|---|---|---|---|
team_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a team member's role
Parameters
| Name | In | Type | Required |
|---|---|---|---|
team_id | path | string | ✓ |
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a team (requires can_delete_team permission)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
team_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Remove a member from a team
Parameters
| Name | In | Type | Required |
|---|---|---|---|
team_id | path | string | ✓ |
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Permissions
10 endpointsList all available permissions.
Optionally filter by resource (e.g., "action", "member").
Parameters
| Name | In | Type | Required |
|---|---|---|---|
resource | query | string | |
x-workspace-id | header | string |
Response
200
Check if the current user has a specific permission.
Returns true/false based on the user's role and the permission settings.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
permission | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all permissions grouped by resource for easier UI display.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get the current user's permissions based on their role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get permissions for all roles.
Returns a dict mapping each role to its permissions.
Only admins and owners can view this.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get all permissions for a specific role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
role | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Reset a role's permissions to defaults.
This removes all custom permission settings and reverts to the
default permissions defined in the system.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
role | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Seed default permissions for this workspace.
This creates all the standard permissions if they don't exist.
Usually called automatically when a workspace is created.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Update multiple permissions for a role at once.
Only workspace admins and owners can modify permissions.
Owner permissions cannot be modified.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
role | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Set a single permission for a role.
Only workspace admins and owners can modify permissions.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
role | path | string | ✓ |
x-workspace-id | header | string |
Response
200
API Keys
9 endpointsList all API keys for the current company.
Query parameters:
• skip: Number of keys to skip (pagination)
• limit: Maximum number of keys to return
• is_active: Filter by active status
• is_revoked: Filter by revoked status
Returns:
• List of API keys (without full keys, only prefixes shown)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
skip | query | integer | |
limit | query | integer | |
is_active | query | string | |
is_revoked | query | string | |
x-workspace-id | header | string |
Response
200
Response List Api Keys Api V1 Api Keys Get
Get total count of API keys.
Query parameters:
• is_active: Filter by active status
• is_revoked: Filter by revoked status
Returns:
• {"count": number}
Parameters
| Name | In | Type | Required |
|---|---|---|---|
is_active | query | string | |
is_revoked | query | string | |
x-workspace-id | header | string |
Response
200
Response Count Api Keys Api V1 Api Keys Count Get
Get a specific API key by ID.
Returns:
• API key object (full key is NOT included, only prefix)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
api_key_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new API key.
IMPORTANT: The full API key is only shown once in this response.
Store it securely - you won't be able to retrieve it again!
Required permissions: Admin or API key management permission
Returns:
• API key object with full key (only shown once!)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Revoke an API key.
Revoked keys cannot be used for authentication and cannot be un-revoked.
The key record is kept for audit purposes.
Required permissions: Admin or API key management permission
Returns:
• Revoked API key object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
api_key_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Rotate an API key (generate new key, revoke old one).
This creates a new API key with the same settings and revokes the old one.
The new key is only shown once in this response!
Required permissions: Admin or API key management permission
Returns:
• New API key object with full key (only shown once!)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
api_key_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Toggle API key active status (enable/disable).
This allows you to temporarily disable a key without revoking it.
Returns:
• Updated API key object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
api_key_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an API key.
You can update the name, description, scopes, and active status.
You cannot change the key itself - use the rotate endpoint for that.
Required permissions: Admin or API key management permission
Returns:
• Updated API key object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
api_key_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete an API key.
This permanently removes the API key. Consider using the revoke endpoint
instead if you want to keep the key record for audit purposes.
Required permissions: Admin or API key management permission
Returns:
• 204 No Content on success
Parameters
| Name | In | Type | Required |
|---|---|---|---|
api_key_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Notifications
15 endpointsGet default/recommended notification preferences.
Returns the recommended notification settings for new users,
organized by category (Assigned Actions, Owned Actions, etc.).
Returns:
• Dictionary of notification types with recommended settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Default Preferences Api V1 Notifications Defaults Get
Get the current user's email delivery preference.
Email delivery modes:
• instant: Send email notifications immediately when events occur
• digest: Batch notifications into periodic digest emails
Digest frequency options:
• 30: Every 30 minutes
• 60: Every hour
Returns:
• email_delivery_mode: "instant" or "digest"
• digest_frequency_minutes: "30" or "60"
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get notifications for the current user.
Parameters:
• unread_only: If true, only return unread notifications
• limit: Max number of notifications to return (default 50)
• offset: Number of notifications to skip (for pagination)
Returns:
• List of notifications with total count
Parameters
| Name | In | Type | Required |
|---|---|---|---|
unread_only | query | boolean | |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Get notification preferences for the current user.
Returns:
• List of notification preferences for the authenticated user
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get My Preferences Api V1 Notifications Me Get
Get all notification preferences for the current user (v2 format).
Returns preferences for all event types, with defaults filled in.
Returns:
• Dictionary of event types to their preference settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Server-Sent Events (SSE) endpoint for real-time notifications.
Connect via the Next.js proxy at /api/notifications/stream which handles auth.
Usage:
```javascript
// Frontend uses Next.js proxy (auth via cookies)
const eventSource = new EventSource('/api/notifications/stream', {
withCredentials: true
});
eventSource.addEventListener('notification', (event) => {
const notification = JSON.parse(event.data);
console.log('New notification:', notification);
});
// Workspace events (e.g., members_updated):
eventSource.addEventListener('workspace_event', (event) => {
const data = JSON.parse(event.data);
if (data.event_type === 'members_updated') {
// Refresh member list
}
});
```
Returns:
• SSE stream with notification and workspace_event events
Response
200
Get count of unread notifications.
Returns:
• {"count": <number of unread notifications>}
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Unread Count Api V1 Notifications Unread Count Get
Mark notification(s) as read.
Request body:
• notification_id: Optional ID of specific notification to mark as read
• If not provided, marks all notifications as read
Returns:
• {"updated": <count of updated notifications>}
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Mark Notifications Read Api V1 Notifications Mark Read Post
Create a notification preference for the current user.
Returns:
• Created notification preference
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Reset notification preferences to default recommended settings.
This deletes all current preferences and creates new ones based on
the default/recommended settings.
Returns:
• List of newly created default notification preferences
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Reset To Defaults Api V1 Notifications Me Reset Post
Update the current user's email delivery preference.
Choose how you want to receive email notifications:
• instant: Get notified immediately when important events happen
• digest: Receive a summary email every 30 or 60 minutes with all your notifications grouped together
Digest emails are helpful to:
• Reduce email volume during busy periods
• Get a summary of what happened while you were away
• Easily identify items that need your attention (highlighted in the digest)
Request body:
• email_delivery_mode: "instant" or "digest"
• digest_frequency_minutes: "30" or "60" (only applies when mode is "digest")
Returns:
• Updated preference settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Bulk update notification preferences for the current user.
This allows updating multiple preferences at once, which is useful
for the settings page where users can toggle many checkboxes.
Request body:
• preferences: List of preferences to update/create
Returns:
• List of updated/created notification preferences
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Bulk Update Preferences Api V1 Notifications Me Bulk Put
Update a notification preference for the current user.
Returns:
• Updated notification preference
Parameters
| Name | In | Type | Required |
|---|---|---|---|
preference_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update notification preference for a specific event type.
Parameters:
• event_type: The notification event type to update
Request body:
• inapp_enabled: Enable/disable in-app notifications
• email_enabled: Enable/disable email notifications
• whatsapp_enabled: Enable/disable WhatsApp notifications
• muted: Mute all notifications for this event type
Returns:
• Updated preference settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
event_type | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Update Notification Preference V2 Api V1 Notifications Preferences V2 Event Type Put
Delete a notification preference.
Returns:
• 204 No Content on success
Parameters
| Name | In | Type | Required |
|---|---|---|---|
preference_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Activity Feed
7 endpointsList activity export jobs for the current user.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Response List Export Jobs Api V1 Activity Export Jobs Get
Get the status of an activity export job.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Download an activity export file.
Returns the file content directly (for inline data) or redirects to signed GCS URL.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get a download URL for the export file.
For GCS-stored files, returns the signed URL.
For inline-stored data, returns a data URL that can be downloaded directly.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Export Download Url Api V1 Activity Export Jobs Job Id Download Url Get
Get the activity feed for the current workspace.
Pulls activities from the Activity model which logs events as they happen:
• Actions (created, completed, messages, files, etc.)
• Goals (created, progress updates)
• Integrations (sync events)
• Records (creates, updates, imports)
• Team (member changes)
Query Parameters:
• types: Filter by activity types (comma-separated: action,goal,record,integration,user)
• search: Search activities by description
• start_date: Filter activities from this date (ISO format)
• end_date: Filter activities until this date (ISO format)
• scope: 'mine' to show only your activities, 'all' for everyone (default: all)
• user_ids: Filter by specific user/member IDs (comma-separated)
• team_ids: Filter by team IDs (comma-separated, shows activity from team members)
• limit: Number of activities to return (default: 20, max: 100)
• offset: Pagination offset
Returns:
• List of activities sorted by timestamp (newest first)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
types | query | string | |
search | query | string | |
start_date | query | string | |
end_date | query | string | |
scope | query | string | |
user_ids | query | string | |
team_ids | query | string | |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Get activity statistics for the dashboard.
Returns counts and metrics for different activity types based on the Activity table.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Activity Stats Api V1 Activity Stats Get
Start an async activity export job.
Returns a job_id immediately. The export runs in the background.
Check job status at /api/v1/activity/export/jobs/{job_id}
When complete, the job output_data will contain a download URL.
You'll also receive a notification based on your notification settings.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Module Settings
5 endpointsList all module settings for the current company.
Returns:
• List of module settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response List Module Settings Api V1 Modules Get
Get settings for a specific module.
Returns:
• Module settings object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
module | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create settings for a module.
Required permissions: Admin
Returns:
• Created module settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Toggle module enabled status.
Required permissions: Admin
Returns:
• Updated module settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
module | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update settings for a module.
Required permissions: Admin
Returns:
• Updated module settings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
module | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Workspace Health
3 endpointsGet workspace health check - check what features are configured.
Returns flags indicating setup status for various features:
• brand: Whether a brand profile has been created
• migration_required: Whether tenant database migration is required
• personal_onboarding_complete: Whether the current user's onboarding is complete
• company_onboarding_complete: Whether workspace onboarding is complete
Returns HTTP 503 Service Unavailable if migration is required.
Returns HTTP 200 if everything is up to date.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Stream tenant migration progress via Server-Sent Events (SSE).
This endpoint provides real-time updates on the migration job progress.
The frontend should connect to this endpoint and listen for status updates.
Events:
• status: QUEUED, RUNNING, COMPLETED, FAILED
• progress: 0-100
• current_step: Human-readable description of current step
• error_message: Error message if status is FAILED
On COMPLETED:
• Migration is complete, workspace is ready
• Frontend should remove maintenance banner and show success toast
On FAILED:
• Migration failed, error details in error_message
• Frontend should log to Sentry and show error message
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Trigger tenant database migration.
This endpoint:
1. Checks if migration is already running (prevents duplicates via Redis lock)
2. Sets a Redis lock to prevent concurrent migrations for the same workspace
3. Runs migration synchronously in the API process (has DB access)
4. Returns job_id and stream_url for progress tracking
The frontend should connect to the stream_url to receive real-time updates.
Note: Migrations run in the same API process (not job_processor) to ensure
database access. They run in a background task to avoid blocking the request.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Records & CRM
Records
15 endpointsList records from recordsets the user has access to.
If recordset_id is provided, checks can_view on that recordset.
Otherwise, returns records from all accessible recordsets.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | query | string | |
page | query | integer | |
page_size | query | integer | |
search | query | string | |
status | query | string | |
tags | query | string | |
fields | query | string | |
sort_by | query | string | |
sort_order | query | string | |
column_filters | query | string | |
date_filters | query | string | |
numeric_filters | query | string | |
tool | query | string | |
exclude_recommendation | query | string | |
group_id | query | string | |
x-workspace-id | header | string |
Response
200
Stream records for map display, optionally with bounding box filtering.
Returns NDJSON (newline-delimited JSON) for efficient streaming.
Each line is a JSON object with: id, geometry (GeoJSON), geometry_type, title, and optional fields.
For Point geometries, lat/lng are also included for backwards compatibility.
The final line contains metadata: {"__meta__": {"count": N, "truncated": bool}}
If bbox is not provided, all records with geometry are returned (use clustering/heatmaps for large datasets).
If limit is omitted, the response is uncapped and streams all matching records.
This endpoint is optimized for large datasets with PostGIS spatial indexing.
Supports any geometry type: Point, MultiPolygon, LineString, etc.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | query | string | ✓ |
bbox | query | string | |
limit | query | string | |
fields | query | string | |
geometry_types | query | string | |
column_filters | query | string | |
numeric_filters | query | string | |
x-workspace-id | header | string |
Response
200
Get a specific record by ID.
Requires can_view permission on the parent recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all comments for a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response List Record Comments Api V1 Records Record Id Comments Get
List version history for a record with user info
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response List Record History Api V1 Records Record Id History Get
List all relationships for a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response List Record Relationships Api V1 Records Record Id Relationships Get
Create a new record.
Requires can_create permission on the target recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Bulk delete records.
If 'all' is True, deletes ALL records in the recordset (requires can_delete permission).
Otherwise, deletes records specified by record_ids.
For specific IDs, each record is checked:
• User needs can_delete permission on the recordset, OR
• can_delete_own if they own the record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Filter records from one recordset by spatial relationship with another.
Use cases:
• Show all leads (points) that intersect with zip codes (polygons) where income > X
• Show all properties (points) within selected census tracts (polygons)
• Exclude records that fall within certain geographic boundaries
• Show all locations within X meters of gas stations (point-to-point)
The source recordset (polygons/lines/points) is used as the filter geometry.
The target recordset (points/features) returns matching record IDs.
Buffer support:
• For WITHIN_DISTANCE: buffer_meters is the search radius (required)
• For other operations: buffer_meters expands source geometries before comparison
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a comment on a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Dismiss (soft remove) a record from a specific tool view.
This clears the tool status so the record no longer appears in that tool's view,
but the record itself is NOT deleted.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
tool | query | string | ✓ |
x-workspace-id | header | string |
Response
200
Restore a record to a previous version from history.
This creates a new version with the field_values from the specified history entry.
Requires can_edit permission on the parent recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
history_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a relationship between records
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Update a record (creates a new version).
Requires can_edit permission on the parent recordset,
OR can_edit_own if the current user created/owns the record.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a record (soft delete by setting status=deleted).
Requires can_delete permission on the parent recordset,
OR can_delete_own if the current user created/owns the record.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Recordsets
21 endpointsList all recordsets the current user has access to.
Access is determined by:
• Workspace admins/owners see all recordsets
• Recordset owners see their owned recordsets
• Users see recordsets they have explicit grants for (direct or via team)
Automatically creates missing recordsets for actively connected integrations.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
search | query | string | |
type | query | string | |
is_active | query | string | |
x-workspace-id | header | string |
Response
200
List all soft-deleted (trashed) recordsets.
These recordsets will be permanently deleted after 30 days.
Requires workspace admin/owner role to view trash.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
search | query | string | |
x-workspace-id | header | string |
Response
200
Get the pipeline associated with a recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get a specific recordset by slug with accurate record count.
Requires can_view permission on the recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all access grants for a recordset.
Requires can_admin permission on the recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get current user's permissions on a recordset.
This endpoint is always accessible to check what permissions the user has.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all views for a recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response List Recordset Views Api V1 Recordsets Recordset Slug Views Get
Create a new recordset
Note: Database is already scoped to workspace via TenantDB dependency.
Slug is auto-generated from name if not provided, with duplicate handling.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Restore a soft-deleted recordset from trash.
Requires workspace admin/owner role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Enable map mode on a recordset and queue GIS backfill job.
This endpoint:
1. Updates recordset settings with GIS field mapping
2. Sets recordset mode to MAP
3. Creates a background job to backfill promoted_gis_1 column
The GIS backfill processes all existing records in batches,
extracting lat/lng values from field_values and populating
the promoted_gis_1 PostGIS column for spatial queries.
Requires can_admin permission on the recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a pipeline for a specific recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Grant access to a member or team on a recordset.
Requires can_admin permission on the recordset.
Either member_id OR team_id must be provided (not both).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Resync promoted columns for all records in a recordset.
Use this after changing promoted field mappings or after bulk imports.
Requires can_admin permission on the recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new view for a recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Update a recordset.
Requires can_admin permission on the recordset.
Note: Slug is NOT updated after creation to preserve bookmarks.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a recordset view
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
view_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Permanently delete a recordset and all its records.
This action cannot be undone!
Requires workspace admin/owner role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Soft delete a recordset (move to trash).
Sets is_active=False and deleted_at timestamp.
Recordset will be auto-purged after 30 days.
Use /trash endpoint to view deleted recordsets.
Use DELETE /trash/{slug} to permanently delete.
Requires can_admin permission on the recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Revoke a member's access to a recordset.
Requires can_admin permission on the recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Revoke a team's access to a recordset.
Requires can_admin permission on the recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
team_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Delete a recordset view
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
view_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
CRUD - Records
6 endpointsList all records with pagination and filters.
The database is automatically scoped to the current workspace via TenantDB dependency.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | query | string | |
page | query | integer | |
page_size | query | integer | |
search | query | string | |
status | query | string | |
tags | query | string | |
x-workspace-id | header | string |
Response
200
Get a specific record by ID.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new record.
The record will be created in the current workspace's schema.
All user references use the member (tenant-scoped user).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Update a record (full update).
This creates a new version of the record if versioning is enabled.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Partially update a record (only provided fields).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a record.
This soft-deletes the record by setting is_latest to False and status to DELETED.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
CRUD - Recordsets
7 endpointsList all recordsets with pagination and filters.
Automatically creates missing recordsets for actively connected integrations.
Uses a single optimized query with JOIN to get record counts efficiently.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
search | query | string | |
type | query | string | |
is_active | query | string | |
x-workspace-id | header | string |
Response
200
Get a specific recordset by ID with accurate record count.
Uses a single query with subquery for the count.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Sync all recordset record counts using a single bulk UPDATE.
This is an admin utility for fixing desynchronized counters.
Uses efficient bulk update instead of loading all records into memory.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update a recordset (full update).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Partially update a recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a recordset (cascades to records).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
CRUD - Record Attachments
3 endpointsList all attachments for a record.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Upload a file attachment for a record.
• record_id: ID of the record to attach the file to
• file: File to upload (multipart/form-data)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Delete a file attachment.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
attachment_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Record Tracking
17 endpointsList insights for a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
page | query | integer | |
page_size | query | integer | |
insight_type | query | string | |
include_dismissed | query | boolean | |
x-workspace-id | header | string |
Response
200
List interactions for a record (timeline view)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
page | query | integer | |
page_size | query | integer | |
interaction_type | query | string | |
x-workspace-id | header | string |
Response
200
List tasks for a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
page | query | integer | |
page_size | query | integer | |
status | query | string | |
priority | query | string | |
include_completed | query | boolean | |
x-workspace-id | header | string |
Response
200
Get tracking dashboard with metrics for a recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Mark action taken on an insight
Parameters
| Name | In | Type | Required |
|---|---|---|---|
insight_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Dismiss an insight
Parameters
| Name | In | Type | Required |
|---|---|---|---|
insight_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Mark a task as complete
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get AI analysis of a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Draft an AI message related to a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Generate AI insights for a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Log a new interaction for a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new task for a record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Generate AI follow-up suggestions for a recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an existing interaction
Parameters
| Name | In | Type | Required |
|---|---|---|---|
interaction_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an existing task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete an interaction
Parameters
| Name | In | Type | Required |
|---|---|---|---|
interaction_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Recordset Import
18 endpointsList geocoding jobs for the current workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
status | query | string | |
x-workspace-id | header | string |
Response
200
Get the status of a geocoding job.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Stream geocoding job progress via Server-Sent Events (SSE).
Connect to this endpoint to receive real-time progress updates.
The stream will close when the job completes or fails.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
Response
200
Public endpoint to download an import error report.
Uses signed URL with expiration - no authentication required.
This allows direct browser downloads without auth headers.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
exp | query | integer | ✓ |
sig | query | string | ✓ |
Response
200
List all import/export jobs for the current workspace.
Jobs are ordered by creation date (newest first).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
job_type | query | string | |
status | query | string | |
x-workspace-id | header | string |
Response
200
Get detailed information about a specific import/export job.
Includes validation summary and report download URL if available.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get a fresh signed URL for downloading the job's error report.
Signed URLs expire, so use this endpoint to get a new URL if the original has expired.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get the status of an import job (legacy endpoint).
Use /import/jobs/{job_id} for more detailed information.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create an export job for a recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Start an async geocoding job for a recordset.
Converts address fields to lat/lng coordinates using Google Maps Geocoding API.
Returns job_id immediately. Use /geocode/jobs/{job_id}/stream for SSE progress.
The job will:
1. Find all records without coordinates
2. Extract address from specified fields
3. Geocode via Google Maps API
4. Update lat/lng fields and PostGIS geometry
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a recordset and start async import from the uploaded file.
This endpoint:
1. Creates the recordset with the specified schema
2. Queues a background job to import records from the file
3. Returns immediately with the recordset ID and job ID
Import runs asynchronously. On completion:
• A report is generated with any validation errors
• The report is stored in GCS
• An email notification is sent to the user
Use the /import/jobs/{job_id} endpoint to check import progress.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Cancel all active (pending/queued/running/processing) import/export jobs.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Cancel a queued or running import/export job.
Cancellation is best-effort for already-running workers. Status is updated
immediately so UI reflects cancellation intent.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Import records from an uploaded file into an existing recordset.
The field_mappings should map CSV columns to existing recordset fields.
Use the /import/upload endpoint first to upload and analyze the file.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Upload a CSV/Excel/GeoJSON/JSON file and analyze its headers.
The file is uploaded to GCS and analyzed to:
• Extract column headers
• Infer field types based on sample data
• Count total rows
Returns a file URI to be used in the subsequent import step.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Analyze headers/types for an already-uploaded file URI.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a signed URL for direct browser upload to GCS.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Delete a completed/failed/cancelled job from history.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Integration Records
3 endpointsQuery records directly from the staging table for an integration recordset.
This endpoint is for VIRTUAL integration recordsets that store data in staging tables
(like shopify_products, meta_ads, etc.) rather than duplicating into the records table.
For Fivetran: If the recordset doesn't exist, it will be auto-created on-the-fly.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
page | query | integer | |
page_size | query | integer | |
search | query | string | |
sort_by | query | string | |
sort_order | query | string | |
x-workspace-id | header | string |
Response
200
Get the total count of records in the staging table.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get a single record from the staging table.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_slug | path | string | ✓ |
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
CRM - AI-Native Contact Management
31 endpointsList contacts with filtering and pagination.
Sort options:
• updated_at: Most recently updated
• created_at: Most recently created
• full_name: Alphabetical
• relationship_score: Highest relationship score first
• last_interaction_at: Most recent interaction
• days_since_contact: Longest time since contact (needs attention)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
search | query | string | |
contact_type | query | string | |
status | query | string | |
owner_id | query | string | |
company | query | string | |
city | query | string | |
state | query | string | |
tags | query | string | |
sort_by | query | string | |
sort_order | query | string | |
x-workspace-id | header | string |
Response
200
Get a contact with all related data (interactions, tasks, insights, property links)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
contact_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all interactions for a contact
Parameters
| Name | In | Type | Required |
|---|---|---|---|
contact_id | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Get CRM dashboard summary.
Returns key metrics and action items for the current user.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
List AI-generated insights.
These are actionable intelligence items the AI has identified:
• Follow-up needed
• Relationship health alerts
• Opportunities
• Risks
Parameters
| Name | In | Type | Required |
|---|---|---|---|
priority | query | string | |
insight_type | query | string | |
contact_id | query | string | |
include_dismissed | query | boolean | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
List contact discovery proposals.
Pending proposals are contacts discovered by AI awaiting review.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
status | query | string | |
trigger_entity_type | query | string | |
trigger_entity_id | query | string | |
min_confidence | query | string | |
page | query | integer | |
page_size | query | integer | |
x-workspace-id | header | string |
Response
200
Get a specific discovery proposal
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List entity relationships with filtering.
Use this to find all relationships for a specific entity,
or filter by relationship type.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
source_type | query | string | |
source_id | query | string | |
target_type | query | string | |
target_id | query | string | |
relationship_type | query | string | |
is_active | query | string | |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Get all relationships for a specific entity.
Direction:
• source: Entity is the source (outgoing relationships)
• target: Entity is the target (incoming relationships)
• both: All relationships involving the entity
Parameters
| Name | In | Type | Required |
|---|---|---|---|
entity_type | path | string | ✓ |
entity_id | path | string | ✓ |
direction | query | string | |
relationship_types | query | string | |
is_active | query | string | |
x-workspace-id | header | string |
Response
200
List tasks across all contacts.
Great for seeing your daily/weekly follow-up queue.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
status | query | string | |
priority | query | string | |
contact_id | query | string | |
assigned_to_me | query | boolean | |
include_completed | query | boolean | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Get comprehensive AI analysis of a contact.
Returns:
• Relationship health assessment
• Communication pattern analysis
• Sentiment trends
• Recommended next actions
• Opportunities and risks
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Trigger AI to discover contacts related to an entity.
The AI will search various sources and create discovery proposals
for contacts it finds related to the specified entity.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Have AI draft a personalized message for a contact.
The AI considers:
• Contact's communication style
• Recent interaction history
• Relationship context
• Purpose of outreach
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Generate AI-prioritized follow-up suggestions.
The AI reviews all contacts (or specified ones) and returns
prioritized suggestions for who needs attention.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a new contact.
The AI will automatically:
• Analyze the contact type and suggest optimal engagement strategy
• Set initial relationship score
• Schedule initial follow-up task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Mark an insight as actioned
Parameters
| Name | In | Type | Required |
|---|---|---|---|
insight_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Dismiss an insight
Parameters
| Name | In | Type | Required |
|---|---|---|---|
insight_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Log an interaction with a contact.
The AI will automatically:
• Analyze sentiment and key topics
• Extract action items
• Update relationship health score
• Suggest follow-up tasks
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Create a new discovery proposal.
Typically called by AI agents when discovering potential contacts.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Approve a discovery proposal and create the contact.
Optionally override contact data before creation and
automatically create suggested relationships.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Merge a discovery proposal with an existing contact.
Updates the existing contact with new information from the proposal.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Reject a discovery proposal
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new entity relationship.
This links two entities together with a specific relationship type.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Bulk create entity relationships.
Useful for importing or AI-generated relationship batches.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a manual task for a contact
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Mark a task as completed
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
outcome | query | string | |
outcome_notes | query | string | |
x-workspace-id | header | string |
Response
200
Update a contact
Parameters
| Name | In | Type | Required |
|---|---|---|---|
contact_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an entity relationship
Parameters
| Name | In | Type | Required |
|---|---|---|---|
relationship_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete (archive) a contact
Parameters
| Name | In | Type | Required |
|---|---|---|---|
contact_id | path | string | ✓ |
permanent | query | boolean | |
x-workspace-id | header | string |
Response
204
Delete (or deactivate) an entity relationship
Parameters
| Name | In | Type | Required |
|---|---|---|---|
relationship_id | path | string | ✓ |
permanent | query | boolean | |
x-workspace-id | header | string |
Response
204
Pipeline & Deals
Pipeline Management
11 endpointsList all pipelines in the workspace
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get the pipeline associated with a recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Pipeline By Recordset Api V1 Pipelines Recordset Recordset Id Get
Get a specific pipeline
Parameters
| Name | In | Type | Required |
|---|---|---|---|
pipeline_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get pipeline data grouped by stage.
Returns records organized by their stage in the pipeline.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
pipeline_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Pipeline Data Api V1 Pipelines Pipeline Id Data Get
Get pipeline statistics
Parameters
| Name | In | Type | Required |
|---|---|---|---|
pipeline_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new pipeline
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Create a pipeline for a specific recordset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Move multiple records to a new stage
Parameters
| Name | In | Type | Required |
|---|---|---|---|
pipeline_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Move a record to a new stage
Parameters
| Name | In | Type | Required |
|---|---|---|---|
pipeline_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a pipeline
Parameters
| Name | In | Type | Required |
|---|---|---|---|
pipeline_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a pipeline (soft delete)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
pipeline_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Investment Criteria & Scoring
13 endpointsList all investment criteria for the current workspace.
Returns criteria sorted by is_default (default first), then by name.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
is_active | query | string | |
x-workspace-id | header | string |
Response
200
Get the default investment criteria for the current workspace.
Returns None if no default is set.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Default Criteria Api V1 Investment Criteria Default Get
Get a specific investment criteria by ID.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
criteria_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
AI-powered analysis of investment opportunities.
Returns portfolio summary, top opportunities with AI insights,
market trends, and action recommendations.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a new investment criteria profile.
If is_default is True, any existing default will be unset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Set a criteria profile as the default.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
criteria_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Filter properties by investment criteria.
Returns IDs of properties that match the criteria above a minimum score.
Used for map filtering.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | query | string | ✓ |
x-workspace-id | header | string |
Response
200
Score a single property against investment criteria.
If criteria_id is not provided, uses the default criteria.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Score multiple properties against investment criteria.
Returns scores for all properties with summary statistics.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Generate an investment thesis using AI based on minimal user inputs.
The AI will use market data, location data, and industry knowledge
to create a comprehensive investment criteria profile.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Generate an investment thesis using AI and save it as a criteria profile.
Combines thesis generation with automatic saving for convenience.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update an existing investment criteria profile.
If is_default is set to True, any existing default will be unset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
criteria_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete an investment criteria profile.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
criteria_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Property Analysis
6 endpointsGet all analysis versions for a property
Parameters
| Name | In | Type | Required |
|---|---|---|---|
property_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get the currently active analysis for a property
Parameters
| Name | In | Type | Required |
|---|---|---|---|
property_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Calculate underwriting metrics based on assumptions.
This is a pure calculation endpoint - no AI involved.
Response
200
Quick AI analysis of a property (not saved).
Use this for on-the-fly analysis without creating a versioned record.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Activate a specific analysis version
Parameters
| Name | In | Type | Required |
|---|---|---|---|
property_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Analyze a property with AI and create a new versioned analysis.
This endpoint:
1. Fetches the property record
2. Runs AI analysis using institutional-grade prompts
3. Saves the analysis as a new version
4. Returns the complete analysis
Parameters
| Name | In | Type | Required |
|---|---|---|---|
property_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Operator Intelligence
20 endpointsList operator benchmarks.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
operator_id | query | string | |
period | query | string | |
min_score | query | string | |
max_score | query | string | |
sort_by | query | string | |
sort_order | query | string | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Response List Benchmarks Api V1 Operators Benchmarks Get
Get the latest benchmark for an operator.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
operator_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get operator intelligence dashboard overview.
Returns summary stats, top/bottom performers, and pending items.
Also pulls operator data from the "Operators" recordset when no benchmark data exists.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get extraction processing statistics.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Extraction Stats Api V1 Operators Extraction Stats Get
List operator metrics with filtering.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
operator_id | query | string | |
property_id | query | string | |
metric_name | query | string | |
category | query | string | |
period | query | string | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Response List Metrics Api V1 Operators Metrics Get
Get trend data for an operator's metrics.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
operator_id | path | string | ✓ |
metric_names | query | string | |
periods | query | integer | |
x-workspace-id | header | string |
Response
200
Response Get Metric Trends Api V1 Operators Metrics Trends Operator Id Get
List reallocation suggestions.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
property_id | query | string | |
current_operator_id | query | string | |
suggested_operator_id | query | string | |
status | query | string | |
min_confidence | query | string | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Response List Reallocation Suggestions Api V1 Operators Reallocations Get
Get a specific reallocation suggestion.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
suggestion_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List operator reports with filtering and pagination.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
operator_id | query | string | |
property_id | query | string | |
source_type | query | string | |
status | query | string | |
period | query | string | |
sort_by | query | string | |
sort_order | query | string | |
x-workspace-id | header | string |
Response
200
Get a specific operator report.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get comprehensive operator scorecard.
Includes current benchmark, history, properties, and key metrics.
Falls back to record data when no benchmark data exists.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
operator_id | path | string | ✓ |
include_history | query | boolean | |
include_metrics | query | boolean | |
x-workspace-id | header | string |
Response
200
Calculate benchmarks for operators.
Processes metrics and generates scores, rankings, and AI analysis.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Compare operators side-by-side.
Returns comparative metrics and AI-generated narrative.
Falls back to record data when no benchmark data exists.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Generate AI-powered reallocation suggestions.
Analyzes underperforming properties and suggests better operators.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a new operator report.
Reports can be created manually or linked to an artifact for AI extraction.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Process all pending reports in batch.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Response Process Pending Reports Api V1 Operators Reports Process Pending Post
Extract data from a report using AI.
Parses the linked artifact and extracts structured financial data.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
force_reextract | query | boolean | |
x-workspace-id | header | string |
Response
200
Review a reallocation suggestion (accept, reject, etc.).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
suggestion_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an operator report.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete an operator report.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Underwriting - One-Click Document Processing
9 endpointsGet seller vs AI assumption comparison for an underwriting record.
Returns all assumption fields with their values, sources, and flags.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get list of supported document types for extraction.
Response
200
Analyze a property using AI and save the results to the record.
This endpoint:
1. Fetches the record
2. Extracts property data
3. Runs AI analysis (recommendation, confidence, insights)
4. Saves results back to the record's field_values
5. Returns the analysis results
The following fields are saved to the record:
• ai_recommendation: "Strong Buy", "Buy", "Hold", "Pass", or "Strong Pass"
• ai_confidence: 0-100 confidence score
• ai_property_summary: Property overview
• ai_market_analysis: Market insights
• ai_risk_assessment: Risk factors
• ai_suggested_* fields: Suggested assumptions
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Analyze a property using AI and return underwriting insights
This endpoint:
1. Fetches the property record
2. Extracts relevant property data
3. Uses Claude AI to analyze the property
4. Returns insights and suggested assumptions
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Calculate underwriting returns and metrics from assumptions.
This endpoint performs all standard CRE underwriting calculations:
• Going-in cap rate
• Cash-on-cash return
• IRR (simplified)
• Equity multiple
• DSCR
• Pro forma income statement
Response
200
One-click underwriting: Process document and create populated underwriting record.
This endpoint:
1. Processes the uploaded document (OM, Rent Roll, T12, etc.)
2. Extracts all underwriting-relevant data
3. Generates AI assumptions and flags
4. Creates a new underwriting record with populated fields
Returns the created record ID and summary.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Parse a rent roll file (Excel, CSV, or PDF) and extract key metrics
This endpoint:
1. Accepts uploaded rent roll file
2. Uses Claude AI to extract unit data and calculate metrics
3. Returns structured rent roll analysis
Parameters
| Name | In | Type | Required |
|---|---|---|---|
property_name | query | string |
Response
200
Process any document and extract underwriting data.
Supports:
• Offering Memorandum (OM) - Most comprehensive
• Rent Roll - Unit-level data
• T12 Operating Statement - 12-month financials
• Broker Email - Quick deal summary
• Property Listing - Basic info
• Appraisal - Valuation data
Returns extracted data with AI assumptions and flags comparing
seller assumptions vs AI recommendations.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update an existing underwriting record with data from a document.
Useful for adding additional documents to an existing deal
(e.g., adding T12 after initial OM upload).
Args:
record_id: ID of existing underwriting record
file: Document to process
overwrite_existing: If True, overwrites existing values; if False, only fills empty fields
document_type: Optional forced document type
Parameters
| Name | In | Type | Required |
|---|---|---|---|
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Maps & Geospatial
Maps
13 endpointsList all map reports accessible to the current user.
Returns:
- my_reports: Reports owned by the current user
- shared_with_me: Reports shared with the current user
- public_reports: Reports marked as public by other users
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | query | string | |
x-workspace-id | header | string |
Response
200
Search for members by display name or email.
Used in the share dialog to find users to share with.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
q | query | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Search Members Api V1 Maps Members Search Get
Get a specific map report by ID.
Returns 404 if the report doesn't exist or user doesn't have access.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all shares for a report.
Only the owner can see the share list.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response List Report Shares Api V1 Maps Report Id Shares Get
Create a new map report.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Create a copy of a map report.
This is used when a viewer wants to save changes as their own copy.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Generate a public share token for a map report.
If one already exists, return the existing one.
Only the owner can generate share links.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Share a report with another user.
Only the owner can share a report.
User can be specified by display_name or user_id.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Update a map report.
• Owners can always update.
• Shared users with can_edit=True can also update.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update share permissions.
Only the owner can update share permissions.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
share_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a map report (soft delete).
Only the owner can delete a report.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Revoke the public share token for a map report.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Remove a share (unshare with a user).
Only the owner can remove shares.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
report_id | path | string | ✓ |
share_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Maps (Public)
2 endpointsPublic endpoint - no authentication required.
Returns a read-only map report by its share token.
Used for TV displays, external sharing, etc.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_slug | path | string | ✓ |
share_token | path | string | ✓ |
Response
200
Public endpoint - returns record data (as GeoJSON) for a shared map report.
No authentication required. Used alongside get_shared_map_report to render the map.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_slug | path | string | ✓ |
share_token | path | string | ✓ |
limit | query | integer |
Response
200
Public Data
9 endpointsList all active public data sources with per-workspace access status.
Each source includes an `access` field:
• "free": Source is free, all data available
• "full": Workspace has an active subscription
• "preview": Paid source, only preview data available
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
List all active data categories.
Response
200
Response List Categories Api V1 Public Data Categories Get
List geographies with optional type filter and search.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
type | query | string | |
search | query | string | |
limit | query | integer | |
offset | query | integer |
Response
200
Search across data series by keyword and/or geography.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
q | query | string | ✓ |
geography_type | query | string | |
limit | query | integer |
Response
200
Get detailed info about a data series.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
series_id | path | string | ✓ |
Response
200
Get data points for a series with optional date/geography filters.
For paid series without subscription, only preview data points are returned.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
series_id | path | string | ✓ |
date_from | query | string | |
date_to | query | string | |
geography_id | query | string | |
geography_type | query | string | |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Get detailed info about a data source.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
source_id | path | string | ✓ |
Response
200
List data series for a source with optional filters.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
source_id | path | string | ✓ |
geography_type | query | string | |
asset_type | query | string | |
limit | query | integer | |
offset | query | integer |
Response
200
Check workspace subscription status for a data source.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
source_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Subscription Api V1 Public Data Sources Source Id Subscription Get
Public Data (Public)
2 endpointsGet data points for a free series (no authentication required).
Only works for series belonging to free data sources.
For paid sources, returns only preview data.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
series_id | path | string | ✓ |
date_from | query | string | |
date_to | query | string | |
geography_id | query | string | |
limit | query | integer | |
offset | query | integer |
Response
200
List free data sources (no authentication required).
Response
200
Response List Public Sources Api V1 Public Data Public Sources Get
Public Layers
7 endpointsList all active public layers with per-workspace access status.
Returns layers grouped by category. Each layer includes an `access` field:
• "free": Layer is free, all features available
• "full": Workspace has an active subscription
• "preview": Paid layer, only preview features available
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
List all active layer categories.
Response
200
Response List Categories Api V1 Public Layers Categories Get
Get full layer details including property schema and style config.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
layer_id | path | string | ✓ |
Response
200
Stream layer features as NDJSON.
Access control:
• Free layers: all features
• Paid layers with subscription: all features
• Paid layers without subscription: only preview features (is_preview=true)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
layer_id | path | string | ✓ |
bbox | query | string | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Check if workspace has a subscription to a layer.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
layer_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Layer Subscription Api V1 Public Layers Layer Id Subscription Get
Clone public layer features into a workspace recordset.
Creates records from public layer features, mapping properties to field values
and optionally storing PostGIS geometry. Supports both creating a new recordset
and importing into an existing one.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
layer_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Refresh a recordset from its source public layer.
Adds new features as records, updates unmodified records, and optionally
overwrites user-edited records based on the `overwrite_modified` flag.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
layer_id | path | string | ✓ |
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Public Layers (Public)
1 endpointsStream layer features without authentication.
For free layers: returns all features.
For paid layers: returns only preview features.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
layer_slug | path | string | ✓ |
bbox | query | string | |
limit | query | integer |
Response
200
AI & Intelligence
AI Assistant
4 endpointsGeneral AI assistant endpoint
Supports multiple assistant types:
• real_estate_analyzer: Real estate analysis
• underwriting_creator: Financial modeling
• deal_evaluator: Quick deal evaluation
• educational_tutor: Concept explanations
• general_assistant: General purpose
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Explain an educational concept
Provides:
• Clear, step-by-step explanations
• Real-world examples
• Visual descriptions
• Follow-up questions
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Analyze a real estate deal or property
Provides comprehensive analysis including:
• Property evaluation
• Market insights
• Cash flow projections
• Risk assessment
• Investment recommendations
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a comprehensive underwriting model
Generates:
• 10-year pro forma
• Key investment metrics (CoC, IRR, NPV)
• Debt service schedule
• Sensitivity analysis
• Exit analysis
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
AI - LLM
5 endpointsList available LLM models.
Returns information about all registered models including:
• Model names and display names
• Provider information
• Context windows and token limits
• Pricing per token
• Capabilities (streaming, vision, etc.)
Future Enhancement:
This endpoint will be enhanced to return only models allowed for the
specific workspace based on subscription tier or custom allowlists.
Current Behavior:
Returns all registered models. The workspace default is highlighted.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get LLM usage statistics for the workspace.
Returns aggregated usage data including:
• Total requests and tokens
• Cost breakdown by model
• Cost breakdown by operation type
• Daily usage trends
Query Parameters:
• `start_date`: Filter from this date (default: current month)
• `end_date`: Filter to this date (default: today)
• `model`: Filter by specific model
• `operation_type`: Filter by operation type
Parameters
| Name | In | Type | Required |
|---|---|---|---|
start_date | query | string | |
end_date | query | string | |
model | query | string | |
operation_type | query | string | |
x-workspace-id | header | string |
Response
200
Complete a prompt using the workspace's default LLM model.
This endpoint provides basic text completion with automatic cost tracking
and quota enforcement. The response includes token usage and estimated cost.
Current Behavior:
• Uses workspace default model (configured in settings)
• Model parameter in request is reserved for future per-workspace restrictions
Future Enhancement:
• Will validate requested model against workspace allowlist
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Stream LLM completion in real-time using Server-Sent Events (SSE).
Returns a stream of text chunks as they are generated by the model.
Useful for providing real-time feedback in UIs.
Response Format:
Each chunk is sent as a Server-Sent Event with format:
```
data: {"content": "text chunk", "done": false}
data: {"content": "", "done": true}
```
NOTE: Creates database session inside generator for streaming lifetime.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Extract structured data from text using LLM.
This endpoint accepts a JSON schema definition and returns validated,
structured data that conforms to the schema. Useful for entity extraction,
data transformation, and format conversion.
Example Schema:
```json
{
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
"email": {"type": "string"}
},
"required": ["name", "email"]
}
```
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
AI - RAG
1 endpointsHealth check for RAG service.
Note: RAG endpoints are temporarily disabled while integrating
the vector search functionality into the new AI library.
Response
200
AI - Image
2 endpointsList available Image Generation models.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Generate images using the workspace's default or specified model.
Images are automatically persisted to cloud storage for long-term access.
Returns HTTP 402 if image generation limit is exceeded.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
AI - Vision
1 endpointsAnalyze images using Claude Vision.
Supports analyzing 1-5 images with a text prompt.
Images should be provided as data URLs.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
AI - Transcription
1 endpointsTranscribe an audio file to text using OpenAI Whisper.
Accepts common audio formats: webm, mp3, mp4, wav, m4a, ogg, flac.
Max file size: 25MB (OpenAI limit).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
AI Prompts
2 endpointsList all available prompt contexts.
Returns:
PromptListResponse: List of available prompt context names
Response
200
Get a specific system prompt by context name.
Args:
context: The prompt context (e.g., 'chat', 'brand-generation')
Returns:
PromptResponse: The system prompt data
Raises:
HTTPException: If prompt not found (404)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
context | path | string | ✓ |
Response
200
Artifact System
16 endpointsList all artifacts
Returns all artifacts with optional filtering.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
limit | query | integer | |
offset | query | integer | |
artifact_type | query | string | |
only_latest | query | boolean | |
x-workspace-id | header | string |
Response
200
Response List Artifacts Api V1 Artifact Actions Artifacts Get
Get an artifact version
If version not specified, returns latest.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
artifact_id | path | string | ✓ |
version | query | string | |
x-workspace-id | header | string |
Response
200
Get diff between two versions
Shows exactly what changed between versions.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
artifact_id | path | string | ✓ |
from_version | query | integer | ✓ |
to_version | query | integer | ✓ |
x-workspace-id | header | string |
Response
200
Get version history for an artifact
Returns all versions in reverse chronological order.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
artifact_id | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
List all proposals
Returns all proposals with optional filtering by status.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
limit | query | integer | |
offset | query | integer | |
status | query | string | |
x-workspace-id | header | string |
Response
200
Response List Proposals Api V1 Artifact Actions Proposals Get
Get a specific proposal by ID
Returns detailed information about a single proposal.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new artifact (version 1)
This creates the first version of an artifact.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Publish an artifact version (make it live)
If version not specified, publishes latest.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
artifact_id | path | string | ✓ |
version | query | string | |
x-workspace-id | header | string |
Response
200
Rollback artifact to a previous version
Creates a new version with content from the target version.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
artifact_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new version of an existing artifact
Creates a new version with updated content.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
artifact_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Rollback an execution
Reverts the changes made by an execution.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
execution_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new action intent
This is the starting point for any meaningful change in the system.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a complete proposal (intent → plan → proposal → checks)
This is the main endpoint for proposing changes.
Automatically runs checks and returns results.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Approve a proposal
After approval, the proposal can be executed.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Execute an approved proposal
Applies the proposed changes to artifacts.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Reject a proposal
Rejected proposals are not executed.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
proposal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Collaboration
Goals & OKRs
5 endpointsList all goals for the current workspace.
Requires `can_view_goal` permission.
Supports filtering by:
• level: company, team, individual
• status: on-track, at-risk, behind, completed
• owner_id: member UUID
• team_id: team UUID
• parent_goal_id: parent goal UUID
Returns:
• List of goals with key results
Parameters
| Name | In | Type | Required |
|---|---|---|---|
level | query | string | |
status | query | string | |
owner_id | query | string | |
team_id | query | string | |
parent_goal_id | query | string | |
x-workspace-id | header | string |
Response
200
Create a new goal with key results/steps.
Requires `can_create_goal` permission.
Returns:
• Goal object with key results
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Update progress on key results/steps.
Requires `can_edit_goal` permission, or `can_edit_own_goal` if user created the goal.
Returns:
• Updated goal with recalculated progress
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update a goal's details and/or key results.
Requires `can_edit_goal` permission, or `can_edit_own_goal` if user created the goal.
Returns:
• Updated goal object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Delete a goal and its key results/steps.
Requires `can_delete_goal` permission, or `can_delete_own_goal` if user created the goal.
Returns:
• 204 No Content on success
Parameters
| Name | In | Type | Required |
|---|---|---|---|
goal_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Tasks
11 endpointsList all tasks across the workspace.
Filters:
• search: Search in title and description
• status: Filter by status (todo, in_progress, blocked, completed, cancelled)
• priority: Filter by priority (low, medium, high, urgent)
• channel_id: Filter by specific channel (null for standalone tasks)
• goal_id: Filter by related goal
• key_result_id: Filter by related key result/step
• owner: 'me' or member ID to filter by owner
• assignee: 'me' or member ID to filter by assignee
• user_ids: Comma-separated member IDs (matches owner OR assignee)
• team_ids: Comma-separated team IDs (matches members of those teams as owner OR assignee)
• include_completed: Include completed/cancelled tasks (default true)
Permission filtering:
• Admins/owners see all tasks
• Others see: channel tasks (if they can view the channel) OR standalone tasks (if they own or are assigned)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
search | query | string | |
status | query | string | |
priority | query | string | |
channel_id | query | string | |
goal_id | query | string | |
key_result_id | query | string | |
owner | query | string | |
assignee | query | string | |
user_ids | query | string | |
team_ids | query | string | |
include_completed | query | boolean | |
x-workspace-id | header | string |
Response
200
Get a specific task by ID.
Permission checks:
• Admins/owners can view any task
• For channel tasks: user must have view access to the channel
• For standalone tasks: user must be owner or assignee
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get all files attached to a task via DocumentLink.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get activity history for a task.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Create a new task.
Tasks can be:
• Associated with a channel (provide channel_id)
• Standalone (omit channel_id)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Mark a task as complete with optional comment and attachments.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Reopen a completed task.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Toggle task completion status
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Verify or reject a completed task.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Documents
30 endpointsList documents with filtering and pagination.
Documents are filtered based on user permissions:
• Owner/Admin: see all documents
• Member/Viewer: only see documents they have access to based on:
1. DocumentLink to entities they can access (channels, records, tasks)
2. Legacy source_type/source_id (for backwards compatibility)
3. Documents they uploaded directly
Parameters
| Name | In | Type | Required |
|---|---|---|---|
search | query | string | |
category | query | string | |
starred | query | string | |
status | query | string | |
folder_id | query | string | |
tags | query | string | |
sort_by | query | string | |
sort_order | query | string | |
skip | query | integer | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Get list of all document categories.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Categories Api V1 Documents Categories Get
Get all documents linked to a specific entity (reverse lookup).
This is used to show related documents on record/task/channel detail pages.
entity_type: 'channel', 'task', 'record', 'recordset', 'goal', 'member'
Parameters
| Name | In | Type | Required |
|---|---|---|---|
entity_type | path | string | ✓ |
entity_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Search for entities that can be linked to a document.
Results are filtered based on user permissions:
• Documents: All accessible documents
• Records: Records in recordsets the user can view
• Channels: Channels the user is a member of or can view
Returns results grouped by type.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
query | query | string | ✓ |
entity_type | query | string | |
exclude_document_id | query | string | |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Access a publicly shared document via its share token.
This endpoint does not require authentication - it uses the share token
and workspace ID to access the document directly.
By default, redirects to the signed GCS URL for direct file access.
Add ?metadata=true to get JSON metadata instead.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
workspace_id | path | string | ✓ |
share_token | path | string | ✓ |
metadata | query | boolean |
Response
200
Get document statistics.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get a specific document and record access.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Redirect to the document file with a fresh signed URL.
Use this endpoint directly in img src, iframe, or anchor href.
The redirect ensures the URL is always fresh and properly signed.
Examples:
• Preview: /api/v1/documents/{id}/file
• Download: /api/v1/documents/{id}/file?download=true
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
download | query | boolean | |
x-workspace-id | header | string |
Response
200
Get all links for a document - shows what entities this document is related to.
Returns channels, tasks, records, goals, etc. that this document is linked to,
with resolved names and URLs for easy navigation.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get all saved relationships for a document.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get AI-suggested relationships for a document.
Uses vector similarity search and AI analysis to find potential
relationships with records, channels, tasks, and other documents.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get a fresh signed URL for a document.
Use this when the stored URL has expired.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
download | query | boolean | |
x-workspace-id | header | string |
Response
200
List all versions of a document.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new document record (metadata only, no file upload).
Use POST /documents/upload for file uploads.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Bulk delete multiple documents.
Permission logic:
• Owner/Admin: can delete any document
• Member: can delete any document they can see (if they have can_delete_document permission)
OR can delete own documents (if they have can_delete_own_document permission)
• Viewer: cannot delete (no delete permissions)
Note: If a document appears in the user's list, they have access to it.
The delete permission is then based on their role's delete capabilities.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Upload a document file to GCS (or local storage in development).
Returns the created document with a signed URL for access.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Upload multiple documents at once.
Supports regular files and .zip archives. Zip files will be extracted
and each file inside will be uploaded as a separate document.
Returns results for each file including document IDs.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Generate an AI summary for a document using RAG.
Uses:
• Document's extracted text as primary content (extracted on-demand if not available)
• Vector search to find similar documents for context
• Linked entities (records, channels, tasks) for additional context
The summary is cached in the ai_summary field.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
force_regenerate | query | boolean | |
x-workspace-id | header | string |
Response
200
Create a new link between a document and another entity.
Allows users to manually connect documents to channels, tasks, records, goals, etc.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Save multiple relationships for a document.
This is typically called after reviewing AI suggestions.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Create a share link for a document.
• Internal share: Creates a link that requires authentication within Fostr
• Public share: Creates a token-based link that works for unauthenticated users
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Toggle starred status of a document.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Upload a new version of a document.
The old version is preserved in version history.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Restore a previous version of a document.
This creates a new version based on the selected old version.
The current version is preserved in history.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
version_number | path | integer | ✓ |
x-workspace-id | header | string |
Response
200
Update document metadata.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update document processing status (used by processing jobs).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
status | query | string | ✓ |
error | query | string | |
x-workspace-id | header | string |
Response
200
Delete a document and its file from storage.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Delete a document link.
Note: Primary links (where the document was originally uploaded) cannot be deleted.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
link_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a document relationship.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
relationship_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Revoke all share links for a document.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
document_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Chat
23 endpointsList member's conversations
Queries by member.id (FK to members table).
Filters:
• folder_id: Only show conversations in this folder
• pinned_only: Only show pinned conversations
• uncategorized: Only show conversations without a folder
Parameters
| Name | In | Type | Required |
|---|---|---|---|
skip | query | integer | |
limit | query | integer | |
archived | query | boolean | |
folder_id | query | string | |
pinned_only | query | boolean | |
uncategorized | query | boolean | |
x-workspace-id | header | string |
Response
200
Response List Conversations Api V1 Chat Conversations Get
Get conversation with messages
Verifies member owns the conversation.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
conversation_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all files attached to a conversation with refreshed signed URLs.
Returns files with fresh signed URLs (valid for 1 hour).
Storage format: gcs://{path} in database, signed URLs in response.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
conversation_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response List Conversation Files Api V1 Chat Conversations Conversation Id Files Get
Get messages for a conversation
Verifies member owns the conversation before returning messages.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
conversation_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Conversation Messages Api V1 Chat Conversations Conversation Id Messages Get
Generate a download URL for a chat file attachment.
Returns a signed URL for GCS files or the local file URL.
Storage format: gcs://{path} (without bucket name, consistent with other uploads).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
file_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List member's chat folders with conversation counts
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response List Folders Api V1 Chat Folders Get
Get a specific folder
Parameters
| Name | In | Type | Required |
|---|---|---|---|
folder_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List available AI models
Response
200
Response List Models Api V1 Chat Models Get
Generate a concise, topic-based title for a chat conversation.
Args:
request: Contains the user's first message
Returns:
GenerateTitleResponse: Object containing the generated title (3-6 words)
Response
200
Generate 4 personalized chat prompt suggestions based on the user's business data.
Suggestions are cached for 24 hours (per day). The first request each day will
generate fresh suggestions using AI with comprehensive business context,
subsequent requests return the cached version.
Uses comprehensive business context including:
• Brand profile (name, industry, target audience, voice, story)
• Products (names, prices, inventory, performance)
• Goals (objectives, key results, progress)
• Revenue metrics (sales, orders, AOV, trends)
• Customer insights (new customers, repeat rate)
• Ad performance (campaigns, spend, CTR)
• Connected integrations
Query Parameters:
force_refresh: If true, bypass cache and regenerate (use sparingly - expensive!)
Returns:
PromptSuggestionsResponse: Object containing 4 suggested prompts with cache metadata
Parameters
| Name | In | Type | Required |
|---|---|---|---|
force_refresh | query | boolean | |
x-workspace-id | header | string |
Response
200
Send a chat message and get AI response (streaming)
Uses member.id (tenant-scoped) for all tenant database operations.
NOTE: For streaming responses, we create the database session inside
the generator to ensure it stays alive for the entire stream duration.
The dependency-injected session (db) is only used for non-streaming.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Chat Api V1 Chat Post
Create a new conversation
Uses member.id as the conversation owner (FK to members table).
System prompt resolution:
1. If prompt_context is provided, resolve the system prompt server-side
2. If system_prompt is directly provided, use that (deprecated)
3. If neither, use None (no system prompt)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Add a message to a conversation.
Used for saving image generation messages or other non-streaming messages.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
conversation_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Upload a file attachment to a conversation.
Files are stored in GCS with path: {workspace_id}/chat/{conversation_id}/{filename}
Files are automatically processed to extract text content.
Storage format: gcs://{path} in database, signed URLs returned to client.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
conversation_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Upload File To Conversation Api V1 Chat Conversations Conversation Id Upload Post
Create a new chat folder
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Reorder folders by providing list of folder IDs in desired order
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Toggle folder collapse state
Parameters
| Name | In | Type | Required |
|---|---|---|---|
folder_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Regenerate an AI message
Uses member.id for authorization and tracking.
NOTE: Creates database session inside generator for streaming lifetime.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
message_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Search workspace business data using semantic search.
This endpoint powers the chat 'search' tool to find specific information
across records, documents, notes, activities, goals, and tasks.
Unlike the 'recordset' tool (which displays data visually), this searches
for specific information that may be scattered across different data sources.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update conversation
Only the conversation owner (member) can update it.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
conversation_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a folder
Parameters
| Name | In | Type | Required |
|---|---|---|---|
folder_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete conversation
Only the conversation owner (member) can delete it.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
conversation_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Delete a folder
Conversations in this folder will have their folder_id set to NULL.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
folder_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Channels
41 endpointsList all channels for the current workspace
• Public channels are visible to all workspace members
• Private channels are only visible to members/teams with explicit access grants
• Workspace owners/admins can see all channels
Note: Database is already scoped to workspace via TenantDB dependency.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
search | query | string | |
status | query | string | |
priority | query | string | |
type | query | string | |
assigned_to | query | string | |
x-workspace-id | header | string |
Response
200
Return unread message counts for every channel the current user participates in.
Used for badge display on channel list and sidebar.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get a specific channel by slug
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all access grants for a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List activities for a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
List all files for a channel.
Queries Documents that are linked to this channel via DocumentLink.
Falls back to legacy ChannelFile query for backwards compatibility.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Redirect to the channel file with a fresh signed URL.
This endpoint handles both:
• Legacy ChannelFile records (local files)
• New Document-based records (GCS or local)
Use this endpoint directly in img src, iframe, or anchor href.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
file_id | path | string | ✓ |
download | query | boolean | |
x-workspace-id | header | string |
Response
200
Get a fresh signed URL for a channel file.
Returns: { "url": "signed-url", "expires_at": "timestamp" }
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
file_id | path | string | ✓ |
download | query | boolean | |
x-workspace-id | header | string |
Response
200
Get all members/participants of a channel.
Returns list of channel participants with their member info populated.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List messages for a channel with cursor-based pagination.
• Default: Returns the most recent `limit` messages
• `before`: Load older messages (scroll up)
• `after`: Load newer messages (scroll down)
• `around`: Load messages centered around a specific message (for deep linking)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
limit | query | integer | |
before | query | string | |
after | query | string | |
around | query | string | |
x-workspace-id | header | string |
Response
200
Get all messages that were squashed into a summary message.
Returns the soft-deleted messages linked to this summary.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
message_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get the current user's permissions on a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get the current user's read status for a channel.
Returns:
• last_read_message_id: The ID of the last message the user has seen
• last_read_at: When the user last viewed the channel
• unread_count: Number of messages posted after the last read message
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List all records linked to a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
List all tasks for a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new channel
Note: Database is already scoped to workspace via TenantDB dependency.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Grant access to a member or team on a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Mark a channel as completed (archives the channel).
Note: Channels are collaborative workspaces, not tasks. "Complete" archives the channel
and records completion metadata. Use tasks within channels for trackable work items.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Upload a file to a channel.
Files are stored as Document records with a DocumentLink to the channel.
This unified approach allows:
• Files to appear in global /documents with proper permission filtering
• Files to be linked to multiple entities (channels, tasks, records)
• Consistent file management across the platform
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
description | query | string | |
x-workspace-id | header | string |
Response
201
Mark channel messages as read.
If message_id is provided, marks that specific message as the last read.
Otherwise, marks the latest message as read.
IMPORTANT: Uses "high water mark" logic - only updates if the new message
is NEWER than the currently saved position. This prevents scrolling up
from changing the saved read position.
Returns the participant's read status including last_read_message_id and
the count of unread messages (messages after the last read).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
message_id | query | string | |
x-workspace-id | header | string |
Response
200
Add a member to a channel (admin action).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Join a channel (current user).
For public channels, any workspace member can join.
For private channels, user must be invited.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Leave a channel (current user).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new message in a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Restore messages that were squashed into a summary.
This will:
1. Un-delete all messages linked to this summary (clear deleted_at and squash_summary_id)
2. Delete the summary message
3. Update the channel message count
Only workspace admins/owners or channel admins can perform this action.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
message_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Squash channel messages above or below a specific message.
This will:
1. Soft-delete all messages in the specified direction (above = older, below = newer)
2. Create a new system message with the provided summary
3. Link the soft-deleted messages to the summary (for potential restoration)
Only workspace admins/owners or channel admins can perform this action.
• direction=above: Squash messages created BEFORE the reference message (older messages)
• direction=below: Squash messages created AFTER the reference message (newer messages)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
message_id | path | string | ✓ |
direction | query | string | ✓ |
summary | query | string | ✓ |
x-workspace-id | header | string |
Response
200
Summarize channel messages above or below a specific message using AI.
• direction=above: Summarize messages created BEFORE the reference message (older messages)
• direction=below: Summarize messages created AFTER the reference message (newer messages)
Returns an AI-generated summary of the messages.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
message_id | path | string | ✓ |
direction | query | string | ✓ |
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Toggle mute status for a channel.
When a channel is muted, the user won't receive any notifications
for that channel (overrides starred status).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Add records to a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Toggle star status for a channel.
When a channel is starred, the user receives notifications for all activity
in the channel (based on their notification preferences).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new task within a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
201
Update an existing channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a message
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
message_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Revoke a member's access to a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
member_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Revoke a team's access to a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
team_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Delete a file from a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
file_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Delete a message
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
message_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Remove a record from a channel
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
record_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Delete a task
Parameters
| Name | In | Type | Required |
|---|---|---|---|
channel_slug | path | string | ✓ |
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Meetings & Huddles
11 endpointsList meetings.
Query params:
• include_ended: Include ended meetings (default False)
• my_meetings_only: Only show meetings I'm participating in (default False)
• limit: Max results (default 50)
• offset: Pagination offset
Parameters
| Name | In | Type | Required |
|---|---|---|---|
include_ended | query | boolean | |
my_meetings_only | query | boolean | |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Get active huddles I'm currently in.
Useful for showing "You're in a huddle" indicators.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get My Active Huddles Api V1 Meetings Active Get
Get meeting by room ID (for joining via link).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
room_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get meeting details.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
meeting_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new scheduled meeting.
For instant huddles, use POST /meetings/huddle instead.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Start an instant huddle (Slack-style).
Creates a meeting and immediately joins you to it.
Returns the meeting info and your join token.
Optional:
• name: Custom huddle name (default: "{your name}'s Huddle")
• invite_member_ids: Members to send huddle invitations to
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
End a meeting (host only).
Disconnects all participants and closes the meeting room.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
meeting_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Join a meeting.
Returns a LiveKit token to connect to the meeting room.
Optional settings:
• password: Meeting password (if required)
• start_muted: Join with microphone muted (default True)
• start_video_off: Join with camera off (default True)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
meeting_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Leave a meeting.
Updates participant status. If you're the last participant,
the meeting may be automatically ended.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
meeting_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update my participant state in a meeting.
Use this to sync local state with server:
• is_muted: Microphone muted state
• is_video_on: Camera on/off
• is_hand_raised: Hand raised state
Parameters
| Name | In | Type | Required |
|---|---|---|---|
meeting_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a meeting (host only).
Permanently removes the meeting and all participant records.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
meeting_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Uploads
1 endpointsServe a file from the uploads directory.
This endpoint is used in local development when files are stored
locally instead of in GCS. Handles brand logos, chat files, profile images, etc.
Args:
path: The path to the file within the uploads directory
Returns:
The file as a streaming response
Parameters
| Name | In | Type | Required |
|---|---|---|---|
path | path | string | ✓ |
Response
200
Integrations & Data
Integrations
20 endpointsList all connected integrations for the current workspace.
Query parameters:
• type: Filter by integration type
• status: Filter by connection status
• is_active: Filter by active status
Returns:
• List of integrations (OAuth tokens are NOT included in response)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
type | query | string | |
status | query | string | |
is_active | query | string | |
x-workspace-id | header | string |
Response
200
Response List Integrations Api V1 Integrations Get
List all available integrations.
Returns a catalog of integrations that can be connected,
along with their current connection status.
Returns:
• List of available integrations with metadata
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response List Available Integrations Api V1 Integrations Available Get
Get the configured data sync provider for OAuth integrations.
Returns which provider is active for OAuth-based data connections:
• "fivetran": Use Fivetran Connect Card
• "airbyte": Use Airbyte Embedded Widget
• "none": No OAuth provider (manual credentials only)
Also returns whether the provider is properly configured.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Data Sync Provider Api V1 Integrations Data Sync Provider Get
Initiate OAuth flow for an integration.
Returns the authorization URL that the user should visit to authorize the integration.
Path parameters:
• integration_type: The type of integration (slack, google_drive, jira, etc.)
Returns:
• authorization_url: URL to redirect the user to for OAuth authorization
• state: State parameter for CSRF protection (store this client-side)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_type | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Initiate Oauth Flow Api V1 Integrations Oauth Integration Type Initiate Get
Get the status of a specific job run.
Use this endpoint to poll for sync progress after triggering a manual sync.
Returns:
• Job run status including: status, started_at, completed_at, error_message
• For Cloud Run jobs, fetches status from Cloud Run API
• For local jobs, returns from in-memory tracking
Parameters
| Name | In | Type | Required |
|---|---|---|---|
run_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Job Run Status Api V1 Integrations Runs Run Id Get
Get logs for a specific job run.
For Cloud Run jobs, fetches logs from Cloud Logging.
For local jobs, returns captured logs from memory.
Returns:
• List of log entries with timestamp, level, and message
Parameters
| Name | In | Type | Required |
|---|---|---|---|
run_id | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Response Get Job Run Logs Api V1 Integrations Runs Run Id Logs Get
Stream real-time status updates for a job run via Server-Sent Events (SSE).
This endpoint replaces polling - connect once and receive updates as they happen.
Much more efficient than polling, especially at scale.
Usage (JavaScript):
```javascript
const eventSource = new EventSource('/api/v1/integrations/runs/{run_id}/stream');
eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Status:', data.status, 'Progress:', data.progress);
// Close connection when job is done
if (['COMPLETED', 'FAILED', 'CANCELLED'].includes(data.status)) {
eventSource.close();
}
};
```
Event format:
```json
{
"run_id": "abc123",
"status": "RUNNING",
"progress": 50,
"current_step": "Syncing orders...",
"timestamp": "2024-01-15T10:30:00Z"
}
```
Status values:
• PENDING: Job is queued
• RUNNING: Job is actively processing
• COMPLETED: Job finished successfully
• FAILED: Job encountered an error
• CANCELLED: Job was cancelled
• HEARTBEAT: Keep-alive signal (every 30s)
Returns:
• SSE stream with job status updates
• Connection auto-closes on terminal status or 5min timeout
Parameters
| Name | In | Type | Required |
|---|---|---|---|
run_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get a specific integration by ID.
Returns:
• Integration object (OAuth tokens are NOT included)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get detailed information about an integration including record counts.
Returns:
• Integration info with total records synced across all tables
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Integration Info Api V1 Integrations Integration Id Info Get
Get logs for recent job runs of this integration.
Returns:
• Job execution logs
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Integration Logs Api V1 Integrations Integration Id Logs Get
Get the current sync status for an integration.
Returns:
• Sync status including last sync time, errors, next sync time, and job logs
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Sync Status Api V1 Integrations Integration Id Status Get
Create a new integration connection.
For OAuth integrations, this should be called after the OAuth flow completes.
For API key integrations, provide the credentials directly.
Required permissions: Admin or integration management permission
Returns:
• Integration object
Note: Credentials are stored in Google Secret Manager if configured,
otherwise stored in database with access_token field.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Experimental Meta Ads query endpoint (allowlisted).
Uses the workspace's stored Meta Ads credentials to fetch data on-demand.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Handle OAuth callback from integration provider.
This endpoint is called by the OAuth provider after user authorization.
Path parameters:
• integration_type: The type of integration (slack, google_drive, jira, etc.)
Request body:
• code: OAuth authorization code
• state: State parameter for CSRF protection
Returns:
• Created/updated integration object with OAuth tokens
Flow:
1. Validate state parameter (CSRF protection)
2. Exchange authorization code for access_token and refresh_token
3. Get user/account info from provider
4. Create or update integration record
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_type | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Experimental Shopify query endpoint (allowlisted).
Uses the workspace's stored Shopify credentials (Secret Manager in prod, DB in dev)
to fetch data on-demand from Shopify.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create virtual recordsets for an integration.
This creates recordsets that point to staging tables without duplicating data.
Call this after an integration is set up to make the integration data
accessible through the Records system.
Returns:
• List of created/updated recordsets with their staging table mappings
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Create Integration Recordsets Api V1 Integrations Integration Id Create Recordsets Post
Manually trigger a sync for an integration.
Request body:
• force: Force sync even if recently synced
Returns:
• {"status": "queued", "job_run_id": "...", "estimated_duration": seconds}
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Trigger Sync Api V1 Integrations Integration Id Sync Post
Toggle integration active status (enable/disable).
Returns:
• Updated integration object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an integration's settings.
Required permissions: Admin or integration management permission
Returns:
• Updated integration object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Disconnect (delete) an integration.
This removes the integration connection, clears all OAuth tokens
from both database and Secret Manager, and deletes associated recordsets.
Required permissions: Admin or integration management permission
Returns:
• Status object with disconnection details
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Disconnect Integration Api V1 Integrations Integration Id Delete
Integrations - OAuth
4 endpointsGoogle Ads OAuth callback - receives authorization code and exchanges for access + refresh tokens.
Note: This endpoint does NOT require authentication because it's called by Google
after the user authorizes the app. The user context is recovered from the state parameter.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
code | query | string | ✓ |
state | query | string | ✓ |
Response
200
Generate Google Ads OAuth URL (authenticated endpoint).
Frontend calls this first to get the URL, then redirects the user.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Slack OAuth callback - receives authorization code and exchanges for access token.
Note: This endpoint does NOT require authentication because it's called by Slack
after the user authorizes the app. The user context is recovered from the state parameter.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
code | query | string | ✓ |
state | query | string | ✓ |
Response
200
Generate Slack OAuth URL (authenticated endpoint).
Frontend calls this first to get the URL, then redirects the user.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Data Retrieval
6 endpointsList all supported integrations.
Returns a list of all integrations that have data retrieval support.
Authentication: Requires valid API key in X-API-Key header.
Example Request:
```
GET /api/v1/data
Headers:
X-API-Key: fos_live_...
```
Example Response:
```json
{
"integrations": ["meta", "shopify"]
}
```
Args:
auth: Authenticated user and workspace (from API key)
Returns:
Dict with list of supported integration names
Parameters
| Name | In | Type | Required |
|---|---|---|---|
X-API-Key | header | string | |
x-workspace-id | header | string |
Response
200
Response List Supported Integrations Api V1 Data Get
List all supported integrations (JWT Auth).
Returns a list of all integrations that have data retrieval support.
Authentication: Requires Bearer token (JWT) and X-Workspace-Id header.
Example Request:
```
GET /api/v1/data/me
Headers:
Authorization: Bearer <jwt_token>
X-Workspace-Id: <workspace_id>
```
Example Response:
```json
{
"integrations": ["meta", "shopify"]
}
```
Args:
user: Authenticated user (from JWT)
workspace: Current workspace (from X-Workspace-Id header)
Returns:
Dict with list of supported integration names
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response List My Supported Integrations Api V1 Data Me Get
List available entity types for a specific integration (JWT Auth).
This endpoint returns all available entity types that can be queried
for the specified integration.
Authentication: Requires Bearer token (JWT) and X-Workspace-Id header.
Path Parameters:
• `integration_name`: Name of the integration (e.g., 'meta', 'shopify')
Example Request:
```
GET /api/v1/data/me/meta
Headers:
Authorization: Bearer <jwt_token>
X-Workspace-Id: <workspace_id>
```
Example Response:
```json
{
"integration_name": "meta",
"entities": [
{
"name": "page_conversations",
"display_name": "Page Conversations",
"table_name": "meta_page_conversations"
},
{
"name": "page_messages",
"display_name": "Page Messages",
"table_name": "meta_page_messages"
}
]
}
```
Args:
integration_name: Integration name from path
user: Authenticated user (from JWT)
workspace: Current workspace (from X-Workspace-Id header)
Returns:
EntityListResponse with available entity types
Raises:
HTTPException:
- 401: Invalid or missing JWT token
- 403: No access to workspace
- 404: Integration not supported
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_name | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Retrieve paginated integration data for a specific entity type (JWT Auth).
This endpoint allows retrieval of synced integration data using JWT authentication.
The data is scoped to the workspace specified in the X-Workspace-Id header.
Authentication: Requires Bearer token (JWT) and X-Workspace-Id header.
Path Parameters:
• `integration_name`: Name of the integration (e.g., 'meta', 'shopify')
• `entity_type`: Type of entity to retrieve (e.g., 'page_conversations', 'customers')
Query Parameters:
• `limit`: Maximum number of rows to return (1-1000, default: 100)
• `offset`: Number of rows to skip for pagination (default: 0)
• `created_after`: Filter records created after this datetime (ISO 8601 format)
• `created_before`: Filter records created before this datetime (ISO 8601 format)
• `updated_after`: Filter records updated after this datetime (ISO 8601 format)
• `updated_before`: Filter records updated before this datetime (ISO 8601 format)
Example Request:
```
GET /api/v1/data/me/meta/page_conversations?limit=50&offset=0
Headers:
Authorization: Bearer <jwt_token>
X-Workspace-Id: <workspace_id>
```
Example Response:
```json
{
"integration_name": "meta",
"entity_type": "page_conversations",
"columns": [
{"name": "id", "type": "VARCHAR", "nullable": false, "primary_key": true},
{"name": "link", "type": "VARCHAR", "nullable": true, "primary_key": false}
],
"rows": [
{"id": "conv_123", "link": "https://..."},
{"id": "conv_456", "link": "https://..."}
],
"total": 150,
"limit": 50,
"offset": 0,
"has_more": true
}
```
Args:
integration_name: Integration name from path
entity_type: Entity type from path
user: Authenticated user (from JWT)
workspace: Current workspace (from X-Workspace-Id header)
limit: Maximum number of rows to return
offset: Number of rows to skip
created_after: Filter for sys_created_at field
created_before: Filter for sys_created_at field
updated_after: Filter for sys_updated_at field
updated_before: Filter for sys_updated_at field
Returns:
DataRetrievalResponse with paginated data
Raises:
HTTPException:
- 401: Invalid or missing JWT token
- 403: No access to workspace
- 404: Integration type or entity type not found
- 500: Internal server error
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_name | path | string | ✓ |
entity_type | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
created_after | query | string | |
created_before | query | string | |
updated_after | query | string | |
updated_before | query | string | |
x-workspace-id | header | string |
Response
200
List available entity types for a specific integration.
This endpoint returns all available entity types that can be queried
for the specified integration.
Authentication: Requires valid API key in X-API-Key header.
Path Parameters:
• `integration_name`: Name of the integration (e.g., 'meta', 'shopify')
Example Request:
```
GET /api/v1/data/meta
Headers:
X-API-Key: fos_live_...
```
Example Response:
```json
{
"integration_name": "meta",
"entities": [
{
"name": "page_conversations",
"display_name": "Page Conversations",
"table_name": "meta_page_conversations"
},
{
"name": "page_messages",
"display_name": "Page Messages",
"table_name": "meta_page_messages"
}
]
}
```
Args:
integration_name: Integration name from path
auth: Authenticated user and workspace (from API key)
Returns:
EntityListResponse with available entity types
Raises:
HTTPException:
- 401: Invalid or missing API key
- 404: Integration not supported
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_name | path | string | ✓ |
X-API-Key | header | string | |
x-workspace-id | header | string |
Response
200
Retrieve paginated integration data for a specific entity type.
This endpoint allows retrieval of synced integration data using API key authentication.
The data is scoped to the workspace associated with the API key.
Authentication: Requires valid API key in X-API-Key header.
Path Parameters:
• `integration_name`: Name of the integration (e.g., 'meta', 'shopify')
• `entity_type`: Type of entity to retrieve (e.g., 'page_conversations', 'customers')
Query Parameters:
• `limit`: Maximum number of rows to return (1-1000, default: 100)
• `offset`: Number of rows to skip for pagination (default: 0)
• `created_after`: Filter records created after this datetime (ISO 8601 format)
• `created_before`: Filter records created before this datetime (ISO 8601 format)
• `updated_after`: Filter records updated after this datetime (ISO 8601 format)
• `updated_before`: Filter records updated before this datetime (ISO 8601 format)
Example Request:
```
GET /api/v1/data/meta/page_conversations?limit=50&offset=0
Headers:
X-API-Key: fos_live_...
```
Example Response:
```json
{
"integration_name": "meta",
"entity_type": "page_conversations",
"columns": [
{"name": "id", "type": "VARCHAR", "nullable": false, "primary_key": true},
{"name": "link", "type": "VARCHAR", "nullable": true, "primary_key": false}
],
"rows": [
{"id": "conv_123", "link": "https://..."},
{"id": "conv_456", "link": "https://..."}
],
"total": 150,
"limit": 50,
"offset": 0,
"has_more": true
}
```
Args:
integration_name: Integration name from path
entity_type: Entity type from path
auth: Authenticated user and workspace (from API key)
limit: Maximum number of rows to return
offset: Number of rows to skip
created_after: Filter for sys_created_at field
created_before: Filter for sys_created_at field
updated_after: Filter for sys_updated_at field
updated_before: Filter for sys_updated_at field
Returns:
DataRetrievalResponse with paginated data
Raises:
HTTPException:
- 401: Invalid or missing API key
- 404: Integration type or entity type not found
- 500: Internal server error
Parameters
| Name | In | Type | Required |
|---|---|---|---|
integration_name | path | string | ✓ |
entity_type | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
created_after | query | string | |
created_before | query | string | |
updated_after | query | string | |
updated_before | query | string | |
X-API-Key | header | string | |
x-workspace-id | header | string |
Response
200
Webhooks
9 endpointsList all webhooks for the current company.
Query parameters:
• skip: Number of webhooks to skip (pagination)
• limit: Maximum number of webhooks to return
• is_active: Filter by active status (true/false)
Returns:
• List of webhooks
Parameters
| Name | In | Type | Required |
|---|---|---|---|
skip | query | integer | |
limit | query | integer | |
is_active | query | string | |
x-workspace-id | header | string |
Response
200
Response List Webhooks Api V1 Webhooks Get
Get total count of webhooks.
Query parameters:
• is_active: Filter by active status
Returns:
• {"count": number}
Parameters
| Name | In | Type | Required |
|---|---|---|---|
is_active | query | string | |
x-workspace-id | header | string |
Response
200
Response Count Webhooks Api V1 Webhooks Count Get
Get a specific webhook by ID.
Returns:
• Webhook object (secret is masked)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
webhook_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new webhook.
Creates a webhook configuration for receiving HTTP callbacks when
specific events occur in the system.
Required permissions: Admin or webhook management permission
Returns:
• Webhook object with generated secret token (only shown once!)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Regenerate the webhook secret.
Use this when the secret has been compromised or for security rotation.
Required permissions: Admin or webhook management permission
Returns:
• Webhook object with new secret (only shown once!)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
webhook_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Test a webhook by sending a test payload.
Request body:
• event: The event type to simulate
• payload: Optional custom payload data
Returns:
• {"success": bool, "status_code": int, "message": str}
Parameters
| Name | In | Type | Required |
|---|---|---|---|
webhook_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Test Webhook Api V1 Webhooks Webhook Id Test Post
Toggle webhook active status (enable/disable).
Returns:
• Updated webhook object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
webhook_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a webhook.
Required permissions: Admin or webhook management permission
Returns:
• Updated webhook object
Parameters
| Name | In | Type | Required |
|---|---|---|---|
webhook_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a webhook.
Required permissions: Admin or webhook management permission
Returns:
• 204 No Content on success
Parameters
| Name | In | Type | Required |
|---|---|---|---|
webhook_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Analytics & Reporting
Analytics
6 endpointsGet available fields for a model with metadata about which can be aggregated/grouped.
Example:
```
GET /analytics/fields?model=action
```
Returns:
• All available fields with type information
• List of aggregatable fields (numeric fields)
• List of groupable fields (indexed fields, enums, etc.)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
model | query | string | ✓ |
x-workspace-id | header | string |
Response
200
Get funnel analytics data combining Meta Ad Insights (ad clicks only) and Shopify funnel data.
Authentication required via Bearer token and X-Workspace-Id header.
Data is automatically scoped to the authenticated workspace via tenant database.
The funnel uses:
• Ad Clicks (link_click) from Meta Ads
• Customer Visits, Add to Cart, Checkout, Purchase from Shopify
Query Parameters:
• aggregation: Deprecated for funnel - always sums across accounts
• timeframe: 'last_30_days', 'last_14_days', 'last_7_days', 'last_90_days' (default: 'last_30_days')
Returns values for each action type in the funnel:
• link_click (Ad Clicks) - from Meta Ads
• landing_page_view (Customer Visits) - from Shopify
• add_to_cart (Add to Cart) - from Shopify
• initiate_checkout (Checkout) - from Shopify
• purchase (Purchase) - from Shopify
Example response:
```json
{
"funnel_data": [
{"action_type": "link_click", "value": 1622828, "source": "meta"},
{"action_type": "landing_page_view", "value": 3423622, "source": "shopify"},
{"action_type": "add_to_cart", "value": 245678, "source": "shopify"},
{"action_type": "initiate_checkout", "value": 123456, "source": "shopify"},
{"action_type": "purchase", "value": 59318, "source": "shopify"}
],
"total_stages": 5,
"metadata": {
"aggregation": "sum",
"timeframe": "last_30_days",
"workspace_id": "workspace-uuid"
}
}
```
Parameters
| Name | In | Type | Required |
|---|---|---|---|
aggregation | query | string | |
timeframe | query | string | |
x-workspace-id | header | string |
Response
200
Response Get Funnel Analytics Api V1 Analytics Funnel Get
Get list of available models for analytics.
Returns:
```json
{
"models": ["action", "record"],
"descriptions": {
"action": "Collaborative work channels",
"record": "Individual data items within recordsets"
}
}
```
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Available Models Api V1 Analytics Models Get
Execute an analytics query using query parameters (alternative to POST with JSON body).
Example URL:
```
GET /analytics/query?model=record&filters=recordset_id:eq:abc123&expand=attachments,comments&page=1&page_size=50
```
Filter format: `field:operator:value`
• For list values (in/not_in), separate with pipes: `status:in:active|draft`
• Operators: eq, ne, gt, gte, lt, lte, in, not_in, like, ilike, is_null, is_not_null, contains
Aggregation format: `function(field):alias` or just `function(field)`
• Functions: count, count_distinct, sum, avg, min, max
• Example: `count(id):total,avg(score):avg_score`
Expand format: Comma-separated relationship names to include
• Example: `attachments,comments` to include attachments and comments in record results
Parameters
| Name | In | Type | Required |
|---|---|---|---|
model | query | string | ✓ |
group_by | query | string | |
aggregate_by | query | string | |
filters | query | string | |
order_by | query | string | |
expand | query | string | |
page | query | integer | |
page_size | query | integer | |
include_total | query | boolean | |
x-workspace-id | header | string |
Response
200
Execute an analytics query with filtering, grouping, and aggregations.
Example request body:
```json
{
"model": "action",
"group_by": ["status", "priority"],
"aggregations": [
{
"function": "count",
"field": "id",
"alias": "total_actions"
},
{
"function": "avg",
"field": "message_count",
"alias": "avg_messages"
}
],
"filters": [
{
"field": "type",
"operator": "eq",
"value": "task"
},
{
"field": "created_at",
"operator": "gte",
"value": "2024-01-01T00:00:00Z"
}
],
"order_by": ["-total_actions"],
"page": 1,
"page_size": 50
}
```
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Explain an analytics query without executing it.
Returns the SQL that would be generated.
Useful for debugging and understanding complex queries.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Explain Query Api V1 Analytics Query Explain Post
Reports
5 endpointsGet status of an async report generation job.
Poll this endpoint until status is 'COMPLETED' or 'FAILED'.
For real-time updates, use the /stream endpoint instead.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Stream real-time status updates via Server-Sent Events (SSE).
Much more efficient than polling - connect once and receive updates as they happen.
Usage (JavaScript):
```javascript
const response = await fetch('/api/v1/reports/jobs/{job_id}/stream', {
headers: { 'Authorization': 'Bearer ...' }
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const text = decoder.decode(value);
for (const line of text.split('\n')) {
if (line.startsWith('data: ')) {
const data = JSON.parse(line.slice(6));
console.log('Status:', data.status, 'Progress:', data.progress);
// Check for completion
if (data.status === 'COMPLETED' && data.result) {
console.log('Report:', data.result.report);
}
}
}
}
```
Event format:
```json
{
"run_id": "abc123",
"status": "RUNNING",
"progress": 50,
"current_step": "Generating report with AI...",
"timestamp": "2024-01-15T10:30:00Z"
}
```
Status values: PENDING, RUNNING, COMPLETED, FAILED, HEARTBEAT
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get or generate a comprehensive executive dashboard report.
Reports are cached for 24 hours (per day). The first request each day will
generate a fresh report using AI, subsequent requests return the cached version.
Query Parameters:
force_refresh: If true, bypass cache and regenerate (use sparingly - expensive!)
Returns:
ReportGenerationResponse: The executive dashboard report with cache metadata
Parameters
| Name | In | Type | Required |
|---|---|---|---|
force_refresh | query | boolean | |
x-workspace-id | header | string |
Response
200
Asynchronously generate a comprehensive executive dashboard report.
Returns a job_id immediately. Use the status_url to poll for completion,
or use the stream_url for real-time SSE updates.
This is recommended for production as reports can take 10-30+ seconds to generate.
Request Body:
days_back: Number of days to analyze (default 30)
previous_period_days: Days for comparison period (default 30)
force_refresh: Bypass cache and regenerate (default False)
Returns:
AsyncReportResponse: Job ID and URLs for status/streaming
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get or generate daily insights for the home dashboard.
Insights are cached for 24 hours (per day). The first request of each day
will generate fresh insights using AI, subsequent requests will return cached data.
Query Parameters:
force_refresh: If true, bypass cache and generate fresh insights (use sparingly)
Returns:
DailyInsightsResponse: 3-5 actionable insights with cache metadata
Parameters
| Name | In | Type | Required |
|---|---|---|---|
force_refresh | query | boolean | |
days_back | query | integer | |
x-workspace-id | header | string |
Response
200
Dashboard
20 endpointsGet all metrics from all recordsets for management purposes.
Returns all configured metrics (including hidden ones) and all
available recordsets for adding new metrics.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get all recordsets available for pinning.
Returns list of recordsets with their pinned status.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get custom recordset-based metrics with full detail.
Returns metrics derived from recordsets including:
• Data sources
• Breakdowns
• Calculation formulas
• AI insights
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get all pinned recordsets with preview data for homepage display.
Returns recordsets with their records and mappability info.
For mappable recordsets, includes lat/lng data for mini-map display.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get all available quick stats with their current enabled state.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get the user's quick stats configuration.
Returns which quick stats are enabled and their order.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get metric configurations for a specific recordset.
Returns the configured metrics and available fields for aggregation.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get aggregated dashboard statistics.
Returns summary metrics including:
• Total actions, active, completed
• Total recordsets and records
• Total members and goals
• Progress metrics
• Recent activity
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Generate AI insights for a specific metric.
Uses the LLM service to analyze the metric data and provide
actionable insights, trends, and recommendations. Results are
cached for 24 hours to reduce API costs.
Args:
metric_id: The metric ID (UUID)
recordset_id: Optional recordset ID. If not provided, we'll search all recordsets.
force_refresh: If True, bypass cache and regenerate insights.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
metric_id | path | string | ✓ |
recordset_id | query | string | |
force_refresh | query | boolean | |
x-workspace-id | header | string |
Response
200
Pin a recordset to the homepage.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Toggle a single quick stat's enabled state.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
stat_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new metric configuration for a recordset.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Toggle a metric's enabled status.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
metric_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Toggle a metric's dashboard visibility (show_on_dashboard).
For default metrics (id starting with 'default-'), this will create
a metric config entry if one doesn't exist.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
metric_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Reorder pinned recordsets (preserves size settings).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update the user's quick stats configuration.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update an existing metric configuration.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
metric_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a pinned recordset's settings (e.g., size).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Unpin a recordset from the homepage.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete a metric configuration.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
recordset_id | path | string | ✓ |
metric_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Billing & Subscription
21 endpointsGet URL to Stripe Billing Portal.
The portal allows users to:
• Update payment method
• View/download invoices
• Cancel subscription (if configured)
If no subscription exists, returns a checkout URL instead.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
return_url | query | string | |
tier | query | string | |
billing_period | query | string | |
x-workspace-id | header | string |
Response
200
Get all features and their status for the workspace.
Returns list of features with enabled status based on tier and overrides.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Features Api V1 Billing Features Get
List past invoices for workspace.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
limit | query | integer | |
x-workspace-id | header | string |
Response
200
Response List Invoices Api V1 Billing Invoices Get
Get the upcoming invoice for current subscription.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get all limits and current usage for the workspace.
Returns list of limits with current usage, remaining, and percentage.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response Get Limits Api V1 Billing Limits Get
Create a Stripe Checkout session from a price ID and redirect to it.
This is a public endpoint that allows creating checkout sessions
directly from a Stripe price ID, useful for affiliate links and
direct product links. Returns an HTTP 302 redirect to the Stripe
checkout page.
Args:
price_id: Stripe price ID (e.g., price_xxx)
ref: Optional affiliate code to add to checkout metadata as affiliate_code
days: Optional trial period in days. If 0, no trial (immediate payment).
If not provided, uses default from settings.STRIPE_TRIAL_DAYS.
Only applies to subscription prices.
Returns:
HTTP 302 redirect to Stripe checkout URL
Parameters
| Name | In | Type | Required |
|---|---|---|---|
price_id | path | string | ✓ |
ref | query | string | |
days | query | integer |
Response
200
Get current subscription status for workspace.
Syncs live data from Stripe first to ensure we have the latest
info even if webhooks were missed.
Returns subscription tier, status, billing period, trial info, etc.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Lightweight subscription status check.
Does NOT sync from Stripe - uses cached local data for fast checks.
Use this for quick access checks on page loads.
Returns:
- is_active: Whether workspace has active access
- requires_payment: Whether user needs to upgrade/pay
- message: Human-readable status explanation
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
List all available subscription tiers with features and limits.
Public endpoint for pricing page.
Response
200
Response List Tiers Api V1 Billing Tiers Get
Get detailed usage events for a specific limit type.
Returns individual events with user info for transparency.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
limit_type | path | string | ✓ |
limit | query | integer | |
offset | query | integer | |
x-workspace-id | header | string |
Response
200
Check current usage for a specific limit type.
Useful for checking if an action is allowed before performing it.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
limit_type | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Cancel subscription.
By default, cancels at end of current billing period (user keeps access until then).
Set cancel_immediately=true to cancel right away (not recommended).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Cancel a pending scheduled downgrade.
If a downgrade was scheduled (to take effect at end of billing period),
this endpoint cancels it and keeps the current plan.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Change subscription plan (upgrade or downgrade).
Behavior differs based on direction:
• Upgrade: Applied immediately with proration (user pays difference now)
• Downgrade: Scheduled for end of billing period (user keeps current features until then)
For downgrades, the response includes `is_scheduled: true` and `effective_date`.
If no active Stripe subscription exists (e.g., manually granted access),
returns a checkout URL instead to start a proper subscription.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a Stripe Checkout session for subscription with trial.
Returns a URL to redirect the user to Stripe's hosted checkout page.
After checkout, user is redirected to success_url with session_id.
Requires workspace admin role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a Stripe Checkout session for a one-time payment (non-subscription).
This is used for one-time plan purchases that don't require recurring billing.
Supports payment methods including card, SEPA debit, and bank transfers.
The plan duration is determined by the tier's duration_months field.
Requires workspace admin role.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
End trial early and start paid subscription immediately.
This will immediately charge the customer and start their
regular billing cycle. Useful for users who hit their trial
daily limits and want to unlock full access now.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a Setup Intent for the public signup flow.
This allows collecting payment method details during registration
before the user account is created.
No authentication required - used during signup.
Response
200
Reactivate a subscription that was set to cancel at period end.
Only works if the subscription hasn't actually canceled yet.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a Setup Intent for custom payment form integration.
Use this if you want to build a custom payment form with Stripe Elements.
After collecting payment method, call POST /billing/subscription.
Returns client_secret for Stripe.js confirmSetup().
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create subscription after Setup Intent completion.
Call this after user completes payment method setup via Stripe Elements.
Creates subscription with trial if eligible.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Brand & E-commerce
16 endpointsGet brand profile for current workspace.
Query Parameters:
brand_id: Optional. If provided, fetch that specific brand (must belong to workspace).
Otherwise, get the first/primary brand for the workspace.
Note: Each workspace has its own database, so security is enforced at the workspace level.
Even if a brand_id from another workspace is provided, it won't be found.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
brand_id | query | string | |
x-workspace-id | header | string |
Response
200
Get products associated with the brand with pagination support.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
x-workspace-id | header | string |
Response
200
Get scrape job status.
Poll until status is 'completed' or 'failed'.
For real-time updates, use the /stream endpoint instead.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Stream real-time status updates via Server-Sent Events (SSE).
Also handles persisting results from Cloud Function when it
publishes completion events with result data.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
job_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Scrape product details from a URL using Firecrawl + AI Vision.
This endpoint analyzes a product page to extract:
• Product name, description, price
• High-quality product images (verified with AI)
• Product variants (size, color, etc.)
• Key benefits and unique selling points
• Problem this product solves
• Target audience and ideal customer profile
• Product category
Uses the unified ProductScrapeService from job_processor.
Returns HTTP 402 if product scrape limit is exceeded.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Async product scraping - returns job_id immediately.
Poll /scrape/jobs/{job_id} for status, or use /scrape/jobs/{job_id}/stream for SSE updates.
Dispatch method is controlled by JOB_DISPATCH_METHOD setting:
• "cloud_function": Pub/Sub → Cloud Function (production)
• "cloud_tasks": Cloud Tasks → Cloud Run (legacy)
• "local": Background task in same process (development)
Returns HTTP 402 if product scrape limit is exceeded.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a new brand profile or update the first/primary one.
For backwards compatibility, this acts as upsert for the primary brand.
For creating additional brands, use POST /api/v1/brand/{id} in the future.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Upload a logo for the brand profile.
Uploads to GCS with workspace isolation. Stores the GCS path identifier
in the database and returns a signed URL for immediate display.
Args:
logo: The logo image file to upload
Returns:
dict: Contains the logo_url (signed URL for display)
Raises:
400: If file upload fails
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Add a product to the brand catalog.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Add multiple products to the brand catalog in a single request.
This is much more efficient than calling POST /profile/products multiple times
when importing many products (e.g., from Shopify).
Maximum 100 products per request for safety. For larger imports,
make multiple batched requests.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Use AI to enhance a product with missing metadata.
This endpoint analyzes existing product information (name, description, price)
and generates:
• Key benefits (list)
• Problem this product solves
• Target audience / ideal customer
Useful for Shopify imports which lack these fields.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
brand_product_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Enhance Brand Product Api V1 Brand Profile Products Brand Product Id Enhance Post
Scrape brand profile from a website URL using Firecrawl + AI Vision.
This endpoint analyzes a website to extract:
• Brand name and logo
• Primary and secondary colors
• Primary and secondary fonts
• Brand story and voice
• Target audience
• Industry
Uses the BrandScrapingService which follows DDD patterns and
integrates with the native LLM library.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Async brand scraping - returns job_id immediately.
Poll /scrape/jobs/{job_id} for status, or use /scrape/jobs/{job_id}/stream for SSE updates.
Dispatch method is controlled by JOB_DISPATCH_METHOD setting:
• "cloud_function": Pub/Sub → Cloud Function (production)
• "cloud_tasks": Cloud Tasks → Cloud Run (legacy)
• "local": Background task in same process (development)
Returns HTTP 402 if brand scrape limit is exceeded.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update a product in the brand catalog.
This endpoint updates both the Product table and BrandProduct table.
Allows editing of:
• Product details (name, description, price, category, images)
• AI metadata (benefits, problem_solved, who_its_for)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
brand_product_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update a specific brand profile by ID.
Args:
brand_id: UUID of the brand to update
profile_data: Brand profile data to update
Returns:
Updated brand profile
Raises:
404: If brand not found or doesn't belong to workspace
Parameters
| Name | In | Type | Required |
|---|---|---|---|
brand_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Remove a product from the brand catalog.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
brand_product_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Company Onboarding
11 endpointsGet current context health score.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get website scrape progress by polling.
For real-time updates, use the SSE stream endpoint instead.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get website scrape result after completion.
Returns the extracted company context, source URLs, and confidence scores.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Stream scrape progress via Server-Sent Events (SSE).
Provides real-time progress updates during the scraping process.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
task_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Get current company onboarding status and progress.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Mark company onboarding as complete.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Save onboarding goals.
Creates actual Goal records in the database.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Start website scraping for context extraction.
Uses Firecrawl to scrape the website and LLM to extract company context.
Returns a task ID for progress tracking via SSE or polling.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Skip a specific step in onboarding.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Start the onboarding process for a workspace.
Creates or updates the brand profile with initial data.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Update company context information.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
User Onboarding
9 endpointsGet prefill data for user onboarding.
Checks if user was found in org chart (from admin onboarding) and
returns pre-populated fields if available. Also returns industry-specific
options based on the workspace's configured industry.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get current user's profile health/completeness score.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Get current user's onboarding status and progress.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Submit personality assessment and generate profile (Step 3).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Mark user onboarding as complete (Step 5).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Save user identity data (Step 1).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Save user preferences (Step 4).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Save user role data (Step 2).
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Skip a specific step in onboarding.
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Learning Management System
18 endpointsList all active course categories
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Response List Course Categories Api V1 Lms Categories Get
List all courses with filtering and pagination
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
search | query | string | |
category_id | query | string | |
level | query | string | |
is_free | query | string | |
include_unpublished | query | boolean | |
x-workspace-id | header | string |
Response
200
Get full course details including modules and lessons
Parameters
| Name | In | Type | Required |
|---|---|---|---|
course_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
List current user's course enrollments
Parameters
| Name | In | Type | Required |
|---|---|---|---|
page | query | integer | |
page_size | query | integer | |
status | query | string | |
x-workspace-id | header | string |
Response
200
Get all lesson progress for an enrollment
Parameters
| Name | In | Type | Required |
|---|---|---|---|
enrollment_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Response Get Enrollment Progress Api V1 Lms Enrollments Enrollment Id Progress Get
Get learning statistics for current user
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Create a new course
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Generate a complete course structure using AI
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
200
Enroll current user in a course
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Update progress for a specific lesson
Parameters
| Name | In | Type | Required |
|---|---|---|---|
enrollment_id | path | string | ✓ |
lesson_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Create a new lesson in a module
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Create a new module in a course
Parameters
| Name | In | Type | Required |
|---|---|---|---|
x-workspace-id | header | string |
Response
201
Update an existing course
Parameters
| Name | In | Type | Required |
|---|---|---|---|
course_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an existing lesson
Parameters
| Name | In | Type | Required |
|---|---|---|---|
lesson_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Update an existing module
Parameters
| Name | In | Type | Required |
|---|---|---|---|
module_id | path | string | ✓ |
x-workspace-id | header | string |
Response
200
Delete or archive a course
Parameters
| Name | In | Type | Required |
|---|---|---|---|
course_id | path | string | ✓ |
hard_delete | query | boolean | |
x-workspace-id | header | string |
Response
204
Delete a lesson
Parameters
| Name | In | Type | Required |
|---|---|---|---|
lesson_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Delete a module and all its lessons
Parameters
| Name | In | Type | Required |
|---|---|---|---|
module_id | path | string | ✓ |
x-workspace-id | header | string |
Response
204
Other
Untagged
3 endpointsResponse
200
Response
200
Show workspace selector page.
Response
200