Skip to content

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

NameInTypeDescription
id (required)pathstringProject ID
target_kind (required)querystringstage, tool, toolset, door, feature, doc_tag, skill_tag or agent
targetquerystringThe thing's name

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Schema: access.ruleRequest.

FieldTypeDescription
accept_unverifiedbooleanAcceptUnverified lets apps whose identity is not verified pass the target's app rules (an app's rule only).
effectstringOne of: block, exception.
partyaccess.party
targetaccess.target
validityaccess.validity

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror envelope

Remove a block or an exception ​

DELETE/v1/projects/{id}/access-rules

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID
effect (required)querystringblock or exception
party_kind (required)querystringcustomer, user, group, app or door
party_idqueryintegerA customer's, a person's or a group's id
party_namequerystringAn app's origin or a door's kind
target_kind (required)querystringstage, tool, toolset, door, feature, doc_tag, skill_tag or agent
targetquerystringThe thing's name

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID

Responses

StatusDescriptionBody
200OKdata
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Type: object or api.customerField[].

Responses

StatusDescriptionBody
200OKdata
400Bad Requesterror envelope
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
pagequeryintegerPage to return, 1-based (default 1)
page_sizequeryintegerRows per page (default 50, max 500)
sortquerystringOrder: created_at, identifier, name, id, each also accepted with a leading - for descending
limitqueryintegerDEPRECATED, use page_size. Max clients per page (max 500)
offsetqueryintegerDEPRECATED, use page. Rows to skip (default 0)
qquerystringCase-insensitive filter over identifier, name, external_subject, and external_email
tagquerystringOnly the customers with this tag
statusquerystringOnly the customers in this status: revoked, not_connected, expired or connected
archivedquerystringfalse (the default): live customers; true: archived ones; all: both
inactive_daysqueryintegerOnly the customers with no activity in this many days
filterquerystringAn 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

StatusDescriptionBody
200OKdata
400Bad Requesterror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Schema: api.createClientRequest.

FieldTypeDescription
grantsapi.grantRequest[]
identifierstring
namestring

Responses

StatusDescriptionBody
201Createddata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID

Request body (application/json)

Schema: api.renameClientRequest.

FieldTypeDescription
fieldsobjectFields sets the customer's typed fields by key; null removes one.
identifierstring
identitiesobject (map)
namestring
tagsstring[]

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror envelope
409Conflicterror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerCustomer ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID
kindsquerystringComma-separated: session, call, tool, note, system
beforequerystringThe previous page's next_before
limitqueryintegerPage size, at most 100

Responses

StatusDescriptionBody
200OKdata
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID

Request body (application/json)

Schema: api.replaceGrantsRequest.

FieldTypeDescription
grantsapi.grantRequest[]

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID
limitqueryintegerPage size, at most 100
offsetqueryintegerRows to skip

Responses

StatusDescriptionBody
200OKdata
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID
Idempotency-Key (required)headerstringThe user action's key, a UUID

Request body (application/json)

Schema: api.customerNoteRequest.

FieldTypeDescription
bodystring

Responses

StatusDescriptionBody
201Createddata
400Bad Requesterror envelope
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
409Conflicterror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID
noteID (required)pathstringNote ID

Request body (application/json)

Schema: api.customerNoteRequest.

FieldTypeDescription
bodystring

Responses

StatusDescriptionBody
200OKdata
400Bad Requesterror envelope
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope

Delete a note ​

DELETE/v1/projects/{id}/clients/{clientID}/notes/{noteID}

Only the note's author deletes it (403).

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID
noteID (required)pathstringNote ID

Responses

StatusDescriptionBody
204No Content
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID

Responses

StatusDescriptionBody
200OKdata
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID

Request body (application/json)

Schema: api.purgeRequest.

FieldTypeDescription
challenge_idstring
codestring
confirmstring

Responses

StatusDescriptionBody
202Accepteddata
400Bad Requesterror envelope
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID

Responses

StatusDescriptionBody
200OKdata
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
409Conflicterror envelope
429Too Many Requestserror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathstringCustomer ID
sessionID (required)pathstringConversation ID
limitqueryintegerEntries per page, at most 100
afterquerystringThe previous page's next_after

Responses

StatusDescriptionBody
200OKdata
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
409Conflicterror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID

Responses

StatusDescriptionBody
200OKdata
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID
clientID (required)pathintegerClient ID
approvalID (required)pathstringApproval ID

Responses

StatusDescriptionBody
204No Content
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID

Responses

StatusDescriptionBody
200SSE stream
401Unauthorized
403Forbidden
404Not Found
422Unprocessable 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

NameInTypeDescription
id (required)pathstringProject ID

Responses

StatusDescriptionBody
200OKdata
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Type: object or api.goalOperation[].

Responses

StatusDescriptionBody
200OKdata
400Bad Requesterror envelope
401Unauthorizederror envelope
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Schema: access.groupRequest.

FieldTypeDescription
audiencestringOne of: customers, people.
claim_keystring
claim_valuestring
descriptionstring
kindstringOne of: listed, rule, claim, union.
namestring
priorityintegerPriority orders groups where one must win (an agent's model per group): the highest wins.
ruleobjectRule is a rule group's condition (foundation/expr) over the roots customer and now.
stage_idstringStageID is the stage the group is for; empty for every stage of the project.

Responses

StatusDescriptionBody
201Createddata
403Forbiddenerror envelope
404Not Founderror envelope
409Conflicterror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror envelope

A group of the project ​

GET/v1/projects/{id}/groups/{groupID}

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Request body (application/json)

Schema: access.groupRequest.

FieldTypeDescription
audiencestringOne of: customers, people.
claim_keystring
claim_valuestring
descriptionstring
kindstringOne of: listed, rule, claim, union.
namestring
priorityintegerPriority orders groups where one must win (an agent's model per group): the highest wins.
ruleobjectRule is a rule group's condition (foundation/expr) over the roots customer and now.
stage_idstringStageID is the stage the group is for; empty for every stage of the project.

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
409Conflicterror envelope
422Unprocessable Entityerror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Request body (application/json)

Schema: access.bindingRequest.

FieldTypeDescription
permissionstringPermission 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.
targetaccess.target
validityaccess.validity

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror envelope

Unbind a group ​

DELETE/v1/projects/{id}/groups/{groupID}/bindings

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID
target_kind (required)querystringorganization, project, stage, tool, toolset, method, door, feature, doc_tag, skill_tag or agent
targetquerystringThe thing's name
permission (required)querystringThe permission bound

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Request body (application/json)

Schema: access.membershipRequest.

FieldTypeDescription
asstringOne of: listed, excluded, blocked.
memberaccess.party
validityaccess.validity

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror envelope

Take a membership fact out of a group ​

DELETE/v1/projects/{id}/groups/{groupID}/members

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID
kind (required)querystringcustomer, user or group
member_id (required)queryintegerThe member's id
as (required)querystringlisted, excluded or blocked

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope
503Service Unavailableerror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID
groupID (required)pathintegerGroup ID

Responses

StatusDescriptionBody
202Accepteddata
403Forbiddenerror envelope
404Not Founderror 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

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Schema: access.previewRequest.

FieldTypeDescription
limitintegerLimit is how many matching customers to list, at most 50.
ruleobjectRule is a group's condition (foundation/expr) over the roots customer and now.

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope