Appearance
Customers
42 operations. Paths are relative to https://api.frege.io.
The blocks and exceptions on a thing of this environment
GET/v1/projects/{id}/access-rules
On the environment itself (target_kind stage), a tool, a toolset, a door, a feature, a doc or skill tag or an agent: of individuals, groups, apps and doors, each with its validity and whether it holds now.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
target_kind (required) | query | string | stage, tool, toolset, door, feature, doc_tag, skill_tag or agent |
target | query | string | The thing's name |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
Block or except
POST/v1/projects/{id}/access-rules
In this order: a block on an individual (a customer or a person) always wins; an exception on an individual beats a block on a group they are in (on the environment it lifts every group block of it; on a thing it is an explicit allow for a current customer); otherwise a thing is allowed when a grant reaches it and no group block holds. An app (the MCP door's, by its verified origin) is blocked, or excepted where apps are held to those excepted; an unverified app is refused wherever an app rule holds unless accept_unverified. A door is excepted on a tool, a toolset or an agent: only the doors excepted reach it. validity limits the rule; writing it again replaces its validity.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Request body (application/json)
Schema: access.ruleRequest.
| Field | Type | Description |
|---|---|---|
accept_unverified | boolean | AcceptUnverified lets apps whose identity is not verified pass the target's app rules (an app's rule only). |
effect | string | One of: block, exception. |
party | access.party | |
target | access.target | |
validity | access.validity |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
Remove a block or an exception
DELETE/v1/projects/{id}/access-rules
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
effect (required) | query | string | block or exception |
party_kind (required) | query | string | customer, user, group, app or door |
party_id | query | integer | A customer's, a person's or a group's id |
party_name | query | string | An app's origin or a door's kind |
target_kind (required) | query | string | stage, tool, toolset, door, feature, doc_tag, skill_tag or agent |
target | query | string | The thing's name |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
The customer fields
GET/v1/projects/{id}/client-fields
The fields a customer card carries in this environment, by position then key. A field's typed value lives in the customer's fields under its key (PATCH /projects/{id}/clients/{clientID} sets it, checked against these definitions). required refuses removing the value; validation bounds a number or money (min, max) or a text (pattern, an RE2 expression, and max_length); pii (none, personal, sensitive; personal by default) decides whether the value reaches a model or an event; agent_access (none, read, write; none by default) whether an agent's instructions may read it.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Replace the customer fields
PUT/v1/projects/{id}/client-fields
The body is the whole list: it replaces every field, and [] clears them. A key is lowercase letters, digits and underscores, starting with a letter, at most 63 characters, unique, and not subject; a label 1 to 200 characters; a select or multi_select has 1 to 100 distinct options, every other type none. min and max only on a number or money (whole cents), min at most max; pattern (RE2, at most 500 bytes) only on text, phone, email or url; max_length (1 to 10000) only on text, email or url. required, validation, pii and agent_access may be left out: false, none, personal and none. At most 100 fields. The schema is told to the modules that keep a copy (crm.customer_schema.changed); values customers already have in their identities under a key that becomes a field are copied into their fields when it does.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Request body (application/json)
Type: object or api.customerField[].
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 400 | Bad Request | error envelope |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
List a project's clients
GET/v1/projects/{id}/clients
Clients are the organization's own end-users: scoped, revocable access to this project's tools and docs. Each row is a customer who signed in through the environment's MCP address. Read identities to know WHO a row is: an object of facts (phone, email, username, name, and any key an update_client hook step mapped) recorded by an update_client hook step, a phone shared in Telegram or the email Google verified when a reader signs in to the Docs MCP door, never by any other sign-in, a later value replacing an earlier one under the same key. name is a single guess made once at sign-in and is usually the word "Customer", so a list read by it alone is ten identical rows. status and credential_expires_at report connection health using the same judgement the door makes, so what an operator sees and what a customer experiences cannot disagree. Use a row's id as client_id when running a tool as that customer. Paged by default at 50 per page; pass limit (up to 500) and offset to widen or move the window, newest first — the end is reached when a page comes back shorter than limit. q filters case-insensitively over identifier, name, external_subject, external_email and every recorded identity before the page is cut, so a phone number finds its customer whether it is pasted with spaces or without. default_client is the one reserved test client a successful POST /upstream/recipe/test provisions for this stage — never one of the rows in list or counted in total, since it is not a customer; absent until a recipe test has succeeded here at least once. tag, status, archived and inactive_days narrow the list for the CRM; archived customers are left out unless archived is true or all. filter keeps the customers whose typed fields hold for a condition over customer.fields.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
page | query | integer | Page to return, 1-based (default 1) |
page_size | query | integer | Rows per page (default 50, max 500) |
sort | query | string | Order: created_at, identifier, name, id, each also accepted with a leading - for descending |
limit | query | integer | DEPRECATED, use page_size. Max clients per page (max 500) |
offset | query | integer | DEPRECATED, use page. Rows to skip (default 0) |
q | query | string | Case-insensitive filter over identifier, name, external_subject, and external_email |
tag | query | string | Only the customers with this tag |
status | query | string | Only the customers in this status: revoked, not_connected, expired or connected |
archived | query | string | false (the default): live customers; true: archived ones; all: both |
inactive_days | query | integer | Only the customers with no activity in this many days |
filter | query | string | An expr condition (JSON, URL-encoded) over customer.fields.<key>: all and any of equals, in and exists, and lt, lte, gt and gte on a number, money, date or datetime; a multi_select takes exists only. Anything else is 400, error.fields keyed filter and the JSON Pointer of what is wrong |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 400 | Bad Request | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Create a client
POST/v1/projects/{id}/clients
Issues a scoped capability token. The plaintext token is returned once, in this response only.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Request body (application/json)
Schema: api.createClientRequest.
| Field | Type | Description |
|---|---|---|
grants | api.grantRequest[] | |
identifier | string | |
name | string |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Created | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
A client
GET/v1/projects/{id}/clients/{clientID}
One customer as the CRM's card reads them: the list's row, with their tags, when they were archived and when they were last active.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Rename a client
PATCH/v1/projects/{id}/clients/{clientID}
A partial update. identifier and name change when not blank; identities merges, a string setting a kind and null removing it (subject is the sign-in's own and refused); tags, when sent, replace the customer's tags (at most 50, each at most 64 characters); fields merges the customer's typed fields, a value of the field's type setting a key and null removing it, each checked against the environment's customer fields (GET /projects/{id}/client-fields): text, phone, email, url, select, date (2006-01-02) and datetime (RFC 3339, kept in UTC to the second) are strings, number a number, money a whole number of cents, boolean a boolean, multi_select a list of its options. A key that is not a field, a value of the wrong type, one outside the field's validation, or null for a required field is 422, error.fields keyed by its JSON Pointer (/fields/<key>). A change is told as upstream.customer_fields.changed. {} changes nothing.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
Request body (application/json)
Schema: api.renameClientRequest.
| Field | Type | Description |
|---|---|---|
fields | object | Fields sets the customer's typed fields by key; null removes one. |
identifier | string | |
identities | object (map) | |
name | string | |
tags | string[] |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Revoke a client
DELETE/v1/projects/{id}/clients/{clientID}
Disables the client's token and portal session. The record is kept for audit.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
A customer's groups, blocks and exceptions
GET/v1/projects/{id}/clients/{clientID}/access
For the customer card: the project's groups the customer is a member of now, and the blocks and exceptions on them in their environment.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Customer ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 503 | Service Unavailable | error envelope |
A customer's timeline
GET/v1/projects/{id}/clients/{clientID}/activity
One page of what happened with the customer, newest first: their conversations (session), the handoffs of them (system) and the notes on them (note); call and tool rows are the other modules' and not listed yet. kinds, comma-separated, narrows it; next_before continues it with the same kinds, null at the end. 50 per page by default, at most 100.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
kinds | query | string | Comma-separated: session, call, tool, note, system |
before | query | string | The previous page's next_before |
limit | query | integer | Page size, at most 100 |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Archive a client
POST/v1/projects/{id}/clients/{clientID}/archive
Hides the customer from the list's default view. Neither a revoke nor a purge: their access, data and open handoffs stay. Archiving an archived customer changes nothing.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Restore a client
DELETE/v1/projects/{id}/clients/{clientID}/archive
Brings an archived customer back to the list's default view. Restoring a live customer changes nothing.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Replace a client's grants
PUT/v1/projects/{id}/clients/{clientID}/grants
Replaces the entire grant set. Kinds: operation (one operationId), method (all operations with that HTTP method), tag (all operations with that spec tag), doc_tag (documentation with that tag), skill_tag (skills with that tag). A grant with expires_at stops applying after that time.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
Request body (application/json)
Schema: api.replaceGrantsRequest.
| Field | Type | Description |
|---|---|---|
grants | api.grantRequest[] |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
A customer's notes
GET/v1/projects/{id}/clients/{clientID}/notes
The staff's internal notes on the customer, newest first; the customer never sees them. can_edit says whether the caller wrote the note. Paged by limit and offset (or page and page_size): 20 by default, at most 100.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
limit | query | integer | Page size, at most 100 |
offset | query | integer | Rows to skip |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Add a note on a customer
POST/v1/projects/{id}/clients/{clientID}/notes
An internal note, nonblank and at most 8000 characters. Idempotency-Key, a UUID, makes a retry the same note; the same key with another body is 409 handoff_idempotency_conflict.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
Idempotency-Key (required) | header | string | The user action's key, a UUID |
Request body (application/json)
Schema: api.customerNoteRequest.
| Field | Type | Description |
|---|---|---|
body | string |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Created | data |
| 400 | Bad Request | error envelope |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
| 422 | Unprocessable Entity | error envelope |
Edit a note
PATCH/v1/projects/{id}/clients/{clientID}/notes/{noteID}
Replaces the note's body; only its author edits it (403).
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
noteID (required) | path | string | Note ID |
Request body (application/json)
Schema: api.customerNoteRequest.
| Field | Type | Description |
|---|---|---|
body | string |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 400 | Bad Request | error envelope |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Delete a note
DELETE/v1/projects/{id}/clients/{clientID}/notes/{noteID}
Only the note's author deletes it (403).
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
noteID (required) | path | string | Note ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
A customer's purge
GET/v1/projects/{id}/clients/{clientID}/purge
Where the customer's purge is: none, cleaning while their modules delete what they hold, completed once the customer is gone. checked_at is when it was last looked at. Answers for a purged customer too.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Purge a customer
POST/v1/projects/{id}/clients/{clientID}/purge
Deletes the customer and everything Frege holds about them, irreversibly, confirmed by the phrase (the project's name) and the caller's last purge code, which it spends. 202 is accepted, not done: the CRM's own rows are gone and every module deletes its own (crm.customer.purged); GET purge says when the customer is gone. A repeat of an accepted purge answers its status.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
Request body (application/json)
Schema: api.purgeRequest.
| Field | Type | Description |
|---|---|---|
challenge_id | string | |
code | string | |
confirm | string |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | data |
| 400 | Bad Request | error envelope |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Ask for a customer's purge code
POST/v1/projects/{id}/clients/{clientID}/purge-code
Emails the caller six digits that confirm the purge of the customer: ten minutes long, five wrong guesses, a new code at most once a minute (429), each replacing the last. confirm is the phrase to type with it, the project's name. No body. A customer already being purged is 409; a server that sends no email 503.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
| 429 | Too Many Requests | error envelope |
| 503 | Service Unavailable | error envelope |
One of a customer's conversations
GET/v1/projects/{id}/clients/{clientID}/sessions/{sessionID}
What the customer and the agent said, then the messages of the conversation's handoffs, oldest first, bound to its revision: next_after continues it, and a page asked for after it changed answers 409 handoff_conflict. steps and tools are the agent module's and empty here, their cursors null. 100 entries per page by default, at most 100.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | string | Customer ID |
sessionID (required) | path | string | Conversation ID |
limit | query | integer | Entries per page, at most 100 |
after | query | string | The previous page's next_after |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
| 422 | Unprocessable Entity | error envelope |
List the tools a customer always allows
GET/v1/projects/{id}/clients/{clientID}/tool-approvals
Every approval beyond one turn this customer has given, 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). They last until then, until the customer signs in again, or until withdrawn here.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 404 | Not Found | error envelope |
Withdraw a customer's "always allow"
DELETE/v1/projects/{id}/clients/{clientID}/tool-approvals/{approvalID}
The tool asks this customer again next time. Manager only, like every other change to what a customer may do.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
clientID (required) | path | integer | Client ID |
approvalID (required) | path | string | Approval ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 404 | Not Found | error envelope |
The customers, live
GET/v1/projects/{id}/clients/stream
Server-sent events of this environment's customers, pushed as they change (Postgres notifies; nothing polls): clients.changed, with an empty object, on connect and after every change to a customer of the environment — a sign-in through the MCP or Docs MCP door, an edit, a revocation — so the reader fetches GET /clients again. A comment line keeps a quiet stream open every 15 seconds; the stream ends after 5 minutes, and a reconnect checks access again.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | SSE stream | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found | |
| 422 | Unprocessable Entity |
The goals
GET/v1/projects/{id}/goal-operations
The tool operations whose successful call counts as a conversion in this environment, by operation id.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
Replace the goals
PUT/v1/projects/{id}/goal-operations
The body is the whole list: it replaces every goal, and [] clears them. An operation id is 1 to 512 characters with no surrounding spaces, listed once; a label at most 200 characters. At most 100 goals.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Request body (application/json)
Type: object or api.goalOperation[].
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 400 | Bad Request | error envelope |
| 401 | Unauthorized | error envelope |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
The project's groups
GET/v1/projects/{id}/groups
Its audiences of customers or of its people, highest priority first. A group's members, bindings and blocks are OpenFGA's (GET …/members, …/bindings).
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Add a group to the project
POST/v1/projects/{id}/groups
A group of customers or of the project's people, for every stage or one (stage_id). kind listed takes members by hand or the API; rule materializes the customers a condition over customer and now holds (written to the authorization store in the background, recomputed when their data changes, when the rule changes, and when time changes it; progress at GET /groups/{groupID}/recompute); claim the customers whose sign-in captured claim_key with claim_value; union is other groups' members. At most 500 groups.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Request body (application/json)
Schema: access.groupRequest.
| Field | Type | Description |
|---|---|---|
audience | string | One of: customers, people. |
claim_key | string | |
claim_value | string | |
description | string | |
kind | string | One of: listed, rule, claim, union. |
name | string | |
priority | integer | Priority orders groups where one must win (an agent's model per group): the highest wins. |
rule | object | Rule is a rule group's condition (foundation/expr) over the roots customer and now. |
stage_id | string | StageID is the stage the group is for; empty for every stage of the project. |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Created | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
A group of the project
GET/v1/projects/{id}/groups/{groupID}
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Replace a group's definition
PUT/v1/projects/{id}/groups/{groupID}
A change to a rule, a claim or the group's stage recomputes its derived members in the background; a group no longer derived loses them.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Request body (application/json)
Schema: access.groupRequest.
| Field | Type | Description |
|---|---|---|
audience | string | One of: customers, people. |
claim_key | string | |
claim_value | string | |
description | string | |
kind | string | One of: listed, rule, claim, union. |
name | string | |
priority | integer | Priority orders groups where one must win (an agent's model per group): the highest wins. |
rule | object | Rule is a rule group's condition (foundation/expr) over the roots customer and now. |
stage_id | string | StageID is the stage the group is for; empty for every stage of the project. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 409 | Conflict | error envelope |
| 422 | Unprocessable Entity | error envelope |
Delete a group
DELETE/v1/projects/{id}/groups/{groupID}
With every fact on it: its members stop holding what it gave them, its blocks stop holding them back.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 503 | Service Unavailable | error envelope |
What a group is bound to
GET/v1/projects/{id}/groups/{groupID}/bindings
Its bindings on the project, on this environment and on its things (tools, toolsets, methods, doors, features, doc and skill tags, agents), each with its validity and whether it holds now.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 503 | Service Unavailable | error envelope |
Bind a group
POST/v1/projects/{id}/groups/{groupID}/bindings
To a permission of the project or this environment (a can_* of the model), or to using a thing of it: invoke a tool, a toolset or a method, use a door, a feature or an agent, read a doc or skill tag, approve an agent's writes, edit an agent. Access is the union of a member's grants less every block; a door or a feature bound to a group is shut to everyone else. A permission of the project or the environment is given only by one who holds it. validity limits the binding.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Request body (application/json)
Schema: access.bindingRequest.
| Field | Type | Description |
|---|---|---|
permission | string | Permission is a can_* permission of the model on the organization, the project or the stage, or use, invoke, read, approve or edit on a thing of the stage. |
target | access.target | |
validity | access.validity |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
Unbind a group
DELETE/v1/projects/{id}/groups/{groupID}/bindings
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
target_kind (required) | query | string | organization, project, stage, tool, toolset, method, door, feature, doc_tag, skill_tag or agent |
target | query | string | The thing's name |
permission (required) | query | string | The permission bound |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
A group's members
GET/v1/projects/{id}/groups/{groupID}/members
Every fact of its membership: listed, excluded and blocked (customers, people, other groups' members), and those its rule (matched) or a sign-in claim (claimed) made members, each with its validity and whether it holds now.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 503 | Service Unavailable | error envelope |
List, exclude or block one in a group
POST/v1/projects/{id}/groups/{groupID}/members
member is a customer or a person (by the group's audience), or another group (listed: its members are this group's; excluded: they are not). A block takes one individual out, whatever else lists them. validity limits the fact to a window and/or a weekly schedule; writing it again replaces its validity.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Request body (application/json)
Schema: access.membershipRequest.
| Field | Type | Description |
|---|---|---|
as | string | One of: listed, excluded, blocked. |
member | access.party | |
validity | access.validity |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
Take a membership fact out of a group
DELETE/v1/projects/{id}/groups/{groupID}/members
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
kind (required) | query | string | customer, user or group |
member_id (required) | query | integer | The member's id |
as (required) | query | string | listed, excluded or blocked |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | No Content | |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |
| 503 | Service Unavailable | error envelope |
A rule or claim group's latest recomputation
GET/v1/projects/{id}/groups/{groupID}/recompute
Its progress: the customers read so far, the members added and removed. A rule group's first computation starts when it is saved.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Recompute a rule or claim group's members
POST/v1/projects/{id}/groups/{groupID}/recompute
In the background, in batches, over the customers it holds: the answer is the job, its progress at GET.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
groupID (required) | path | integer | Group ID |
Responses
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
Preview a rule
POST/v1/projects/{id}/groups/preview
Who of this environment's customers the rule (a group's condition over customer and now) holds now: the first limit (at most 50), and how many were read (at most 5000). Nothing is written.
Authentication: bearer token.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | path | string | Project ID |
Request body (application/json)
Schema: access.previewRequest.
| Field | Type | Description |
|---|---|---|
limit | integer | Limit is how many matching customers to list, at most 50. |
rule | object | Rule is a group's condition (foundation/expr) over the roots customer and now. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | OK | data |
| 403 | Forbidden | error envelope |
| 404 | Not Found | error envelope |
| 422 | Unprocessable Entity | error envelope |