Appearance
Your account
17 operations. Paths are relative to https://api.frege.io.
Whether this deployment has an assistant
GET/v1/assistant
Says whether an assistant is configured, what it is called, and whether the caller has allowed it to act as them, so a dashboard can decide whether to show the button and what it does. Deliberately separate from minting and connecting: asking "is there one" changes nothing.
Authentication: bearer token.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
Allow the assistant to act as you
POST/v1/assistant/connect
Starts the social sign-in that lets the assistant act as the caller, with the provider named (google). Returns the URL to send the browser to: the provider, after which the browser lands back on return_to (a dashboard page; anything else is replaced by the dashboard's home) with gottlob=connected, gottlob=mismatch when the sign-in came back as another account, or gottlob=failed. An emailed code is the other way in: POST /assistant/connect/code. 409 upstream_misconfigured when the assistant's environment cannot renew a credential, which would leave the assistant working for minutes only.
Authentication: bearer token.
Request body (application/json)
Schema: api.assistantConnectRequest.
| Field | Type | Description |
|---|---|---|
provider | string | Provider is the social sign-in to confirm with: google. An emailed code goes through /assistant/connect/code. |
return_to | string |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
Stop the assistant acting as you
DELETE/v1/assistant/connect
Forgets the credential POST /assistant/connect stored. The person's conversations stay; the assistant cannot act for them until they allow it again.
Authentication: bearer token.
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 404 | Not Found | error envelope |
Email a code to allow the assistant
POST/v1/assistant/connect/code
Sends a one-time code to the caller's own address — never another: the address is not taken from the request. Posting it to /assistant/connect/code/verify allows the assistant to act as the caller, with no redirect.
Authentication: bearer token.
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
| 429 | Too Many Requests | error envelope |
Allow the assistant with an emailed code
POST/v1/assistant/connect/code/verify
Checks the code POST /assistant/connect/code sent to the caller's address and, when it is right, allows the assistant to act as them. 401 when the code is wrong or expired; 409 assistant_identity_mismatch when it signs in another account than the caller's.
Authentication: bearer token.
Request body (application/json)
Schema: api.assistantVerifyCodeRequest.
| Field | Type | Description |
|---|---|---|
code | string |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 401 | Unauthorized | error envelope |
| 409 | Conflict | error envelope |
| 429 | Too Many Requests | error envelope |
A token for the dashboard's own assistant
POST/v1/assistant/token
Mints a short-lived embed token so the signed-in person can talk to this deployment's assistant about their own account. The assistant acts with the credential the person gave it through POST /assistant/connect, renewed by the assistant environment's own recipe; until they have, this answers 409 assistant_not_connected. Returns 404 when no assistant is configured, which is the default.
Authentication: bearer token.
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Created | data |
| 401 | Unauthorized | error envelope |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
Read an invitation from its token
GET/v1/invitations/{token}
Unauthenticated on purpose: the page must be able to say who invited you to what BEFORE asking you to sign in, otherwise the sign-in prompt is unexplained. Returns the project and inviter, never the invited email address — the link may have been forwarded.
Authentication: none.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
token (required) | path | string | Invitation token from the email link |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 404 | Not Found | error envelope |
| 410 | Expired, or already accepted or revoked | error envelope |
Accept an invitation
POST/v1/invitations/{token}/accept
Grants the membership to whichever account is signed in when this is called — the invitation is a link, not a check against the invited address, so anyone holding it may accept as themselves once signed in. Returns the org and project the invitation was for, since the accepting account may belong to other organizations too. Returns 410 if the invitation expired or was already used.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
token (required) | path | string | Invitation token from the email link |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 404 | Not Found | error envelope |
| 409 | Already a member | error envelope |
| 410 | Gone | error envelope |
Decline an invitation
POST/v1/invitations/{token}/decline
Marks the invitation revoked so the link stops working, for whichever account is signed in when this is called. Recorded against the project's audit trail, so an inviter can see the offer was refused rather than silently ignored.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
token (required) | path | string | Invitation token from the email link |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 401 | Unauthorized | error envelope |
| 404 | Not Found | error envelope |
| 410 | Gone | error envelope |
Get the current user
GET/v1/me
Returns the profile plus every organization the caller can see. is_admin marks the one you own; every other listed org is visible because you hold a role on at least one of its projects — roles themselves live on project objects. is_superadmin says the caller runs this deployment, which is what opens the admin; superadmin_role says what they may do there: readonly sees, support also works organizations' notes and reads a tenant's content the tenant granted, finance also moves money, owner does everything and names the other superadmins.
Authentication: bearer token.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
Update the current user's profile
PATCH/v1/me
Authentication: bearer token.
Request body (application/json)
Schema: api.updateMeRequest.
| Field | Type | Description |
|---|---|---|
name | string | |
timezone | string |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 422 | Unprocessable Entity | error envelope |
Record where the user is
PUT/v1/me/selection
Stores the organization the user is in and, optionally, the project open within it, so is_selected on GET /me and GET /projects reflects it on every later request from any client. Selection is per (user, organization): switching organizations returns you to the project you last had open THERE, rather than to one global project that probably belongs elsewhere. The selected ORGANIZATION is simply the one most recently recorded. Send project_id null to keep the organization but clear the project — the state after archiving what you had open. Both ids are verified against the caller's own access, so this cannot be used to probe which organizations or projects exist. Calling it is optional: without it the server still designates a sensible default, and this only makes that choice stick.
Authentication: bearer token.
Request body (application/json)
Schema: api.setSelectionRequest.
| Field | Type | Description |
|---|---|---|
org_id | string | |
project_id | string |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 401 | Unauthorized | error envelope |
| 422 | Unprocessable Entity | error envelope |
List my sign-in sessions
GET/v1/me/sessions
The caller's live sessions, newest activity first: where each was last seen from (ip, user_agent) and when. is_current marks the session this very request used. Sessions are recorded as they are observed, so a session signed in before this feature existed appears after its next request. Paged by default at 50 per page; pass limit (up to 100) and offset to widen or move the window — the end is reached when a page comes back shorter than limit.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
page | query | integer | Page to return, 1-based (default 1) |
page_size | query | integer | Rows per page (default 50, max 100) |
sort | query | string | Order: last_seen_at, created_at, id, each also accepted with a leading - for descending |
limit | query | integer | DEPRECATED, use page_size. Max sessions per page (max 100) |
offset | query | integer | DEPRECATED, use page. Rows to skip (default 0) |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
Sign out everywhere else
DELETE/v1/me/sessions
Revokes every live session except the one making this request. Fails whole if any single revocation fails, so a partial result is never reported as success.
Authentication: bearer token.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
Revoke one of my sessions
DELETE/v1/me/sessions/{sessionID}
Signs that device out: the session's refresh token stops working immediately, and its current access token expires within ~5 minutes. Revoking the session this request itself is using is allowed — it is a self sign-out.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
sessionID (required) | path | integer | Session ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 404 | Not Found | error envelope |
List the tools you always allow
GET/v1/me/tool-approvals
Every approval beyond one turn you have answered in the dashboard (playground and agent chat), across agents, newest first: for one conversation (scope conversation), or "always allow" (scope always) for 30 days from when it was last given (expires_at). Yours alone, even from a turn run as a customer: that customer's own widget never sees them. They last until then, or until you sign in again.
Authentication: bearer token.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
Stop always allowing a tool
DELETE/v1/me/tool-approvals/{approvalID}
The tool asks you again next time. Another person's id is 404.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
approvalID (required) | path | string | Approval ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 404 | Not Found | error envelope |