Built by API
Members, who built what, and who you are in this workspace.
Endpoints
/api/v1/workspace/whoAmIWho this connection acts as: the workspace, what you may do in it (the role label and its grants), the account, and how you are connected (and when that connection must be renewed). Call it first when unsure where you are working. No params. Returns { workspace: { id, name }, person: { id, name, email }, role: { label, grants }, connectedBy (chat, oauth_app, api_key or dashboard), connection: { name, expiresAt } (the AI app's or API key's name and when it must be renewed; expiresAt null = never) or null }. serenitiesAccount: true means this connection is the Serenities account's own AI connection or API key, with no person behind it: whatever the role label says, doors that need a person (profile details, API keys and AI connections, members and roles, money) refuse it; say so instead of retrying. A change to who may run an app's actions that lets more run waits on an Allow card someone else answers; one that only narrows applies at once. The connection's own limits still apply: a "Read only" connection can only read, whatever grants lists. Only reads; every member may call it.
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/workspace/whoAmI \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{}'/api/v1/workspace/whatTheyBuiltList what one person built in this workspace (sites, flows, functions, agents, triggers, connections, bases and tables) with each item's name, group and whether it runs (a base or table never runs), so the person asking can decide what to keep, change or pause, each in its own place. Works for a person who already LEFT: nothing they built stopped when they left. Params: personId (required; from workspace_formerMembers), list (optional: "built", the default, for what they created; "edited" for the sites, flows, functions, agents, connections, bases and tables they changed but did not create; a table counts as changed when they updated its rows, fields or views, added, imported, restored or bulk-removed rows, linked, unlinked or reordered linked records, moved the table, or renamed it (renaming a base is an edit of the base); removing one row, and adding or removing a field, a view, a link field or a board relation, are not recorded), limit (1 to 100, default 50), cursor (the nextCursor of the page before, from the same list). Returns { builtBy, items: [{ kind, id, group, name, running, canPause }], total, counts (per group, deleted items included), nextCursor (null on the last page), aiApps }. Only reads: it pauses or changes nothing. Readable by the workspace Owner and by Admins; a CURRENT member also by whoever holds "Change roles and remove people" and may remove them; anyone else is refused. A person this workspace has no record of reads "not available".
Parameters
personId | stringrequired | |
limit | integer | |
cursor | string | |
list | string | Allowed values: |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/workspace/whatTheyBuilt \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"personId": "example",
"limit": {},
"cursor": "example"
}'/api/v1/workspace/formerMembersList the people who LEFT this workspace (removed, or left on their own) and built or edited something in it, by name. Use it to find the person, then call workspace_whatTheyBuilt with their personId. Params (both optional): limit (1 to 100, default 50), cursor (the nextCursor of the page before). Returns { people: [{ personId, name }], nextCursor } (null on the last page). Names only, never an email. Readable by the workspace Owner and by Admins; anyone else is refused.
Parameters
limit | integer | |
cursor | string |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/workspace/formerMembers \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"limit": {},
"cursor": "example"
}'/api/v1/workspace/membersForAiList the people who are ACTIVE members of this workspace now, each with their id, name and role name. Use it to find a person's member id before a tool that takes one (e.g. the person subject of appActions_setConsent). If two listed people look the same (the same name), ask the user which one they mean; never guess. Params (both optional): limit (1 to 100, default 50), cursor (the nextCursor of the page before). Returns { members: [{ id, name, role }], nextCursor } (null on the last page). Never an email; suspended members, people who left and pending invitations are not listed. Readable by whoever holds "Change roles and remove people" (the Owner, Admins, and a role given that permission); anyone else is refused.
Parameters
limit | integer | |
cursor | string |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/workspace/membersForAi \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"limit": {},
"cursor": "example"
}'