Skip to main content
GET
Read one embedded user's chat usage

Authorizations

apiKey
string
query
required

Path Parameters

projectId
string<uuid>
required

GET /v2/api/projects/:projectId/chat-usage Parameter

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Query Parameters

apiKey
string

Upsolve API key, generated under Account → Developer settings in the Upsolve Hub. Keys are user-scoped: pass organizationId alongside the key to select which org to act on.

Minimum string length: 1
Example:

"up_embed_************"

organizationId
string<uuid>

Your Upsolve organization's UUID — the org that owns the API key and project. This is NOT a project organization: do not pass a value registered via /projects/register-organization, and do not pass an externalId (only projectOrganizationId accepts those). Omit it when using an org-bound API key — the org is read from the key and any value sent here is ignored. Required only for user-scoped API keys (created under Account → Developer settings) and for the Supabase JWT path, where the org is ambiguous and membership is verified against it.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
Example:

"123e4567-e89b-12d3-a456-426614174000"

externalId
string
required

Your own id for the person, as you send it in user.externalId to embed-token or register-user-token. Required: usage is read per person.

Required string length: 1 - 256
organizationExternalId
string

Your own id for the organization the person belongs to (organization.externalId on embed-token). An external id is unique only within one project organization, so the same id can name one person in each organization that has them; pass this to read just one. Omit it to read every match.

Required string length: 1 - 256
environment
string

Only the project users of this environment, e.g. production or staging. Omit it to read them all.

since
string<date-time>

ISO-8601 timestamp. Counts only activity at or after it: a conversation started earlier and continued after it counts as a session, with just its newer questions. Omit it to count all time.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
workspaceId
string<uuid>

Only this workspace. Omit it to read every workspace the person has chatted in.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Response

GET /v2/api/projects/:projectId/chat-usage Positive response

status
string
required
Allowed value: "success"
data
object
required