Member Management API Reference
Every call in the Member Management API - add and remove Access Groups, check groups, list and look up Members, change roles and groups, deactivate, and bulk calls - with fields, responses, limits and errors.
Manage Members From Your Own Tools
The Member Management API lets your checkout, CRM or automation tool manage the Members of one App with an API key from that App. It has eleven calls: add to and remove from Access Groups, check a person's groups, list and look up Members, change a role or groups, deactivate a Member, and three bulk calls for up to 100 people at a time.
For a step-by-step setup of automatic adds and removals, see Adding and Removing Members Automatically. To create a key, see API Keys.
Send a Request
Send every request to this base URL, followed by the call's path:
https://app.thoughtflow.ai
Every request needs two headers. Replace YOUR_API_KEY with your key, keeping the word Bearer and the space after it:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
In paths shown with {email}, put the person's email address in its place, as in /api/v1/access/members/avery.lane@example.com.
Responses
A successful response is JSON with the result under data:
{
"data": { "revoked": true, "user_id": "0d6f5c1e-0000-4000-8000-000000000000" }
}
A failed request answers with an HTTP error status and an error holding a code and a message:
{
"error": {
"code": "user_not_found",
"message": "No user with that email exists in this App"
}
}
See Errors for every code.
Things to Know
- Access changes take effect right away.
- Sending the same add or remove twice is safe. Nothing doubles up.
roleon an add applies only to people who are new to your App. It never changes the role of someone already in it. Use Change Role for that.- An unrecognized
roleis an error, not ignored. Sendmemberoreditor. - Group changes take add and remove lists, never a replacement list, so a mistyped list can't strip someone's access.
- You can add groups to an App Admin like anyone else, but the API never changes an App Admin's role, deactivates one, or adds back a removed one.
- Nothing is ever deleted. A deactivated Member can be added back.
- Your App can't receive webhooks. Your other tool calls this API; there's no address in ThoughtFlow for it to post to.
Rate Limits
| Limit | Amount |
|---|---|
| Requests | 300 a minute for each API key. A bulk call counts as one request. |
| Invitation emails | 1,000 an hour for each API key. |
| People in a bulk call | 100. |
| Access Groups in one add or group change | 25. |
Over a request or invitation limit, the response is 429 with a Retry-After header and retry_after_seconds in the error. Wait that many seconds, then send the request again.
Retry-After: 30
{
"error": {
"code": "request_limit_reached",
"message": "This API key has sent too many requests. Try again in 30 seconds.",
"retry_after_seconds": 30
}
}
Add to Access Group
POST /api/v1/access/grant
Adds a person to one or more Access Groups. If they aren't in your App yet, they're added as a Member and, unless you say otherwise, sent an invitation email.
| Field | Description |
|---|---|
email | Required. The person's email. |
access_group_id or access_group_name | One group, by ID (recommended) or by name. Send one of the two, not both. Names match without regard to capitals. |
access_group_ids or access_group_names | Several groups, by ID or by name, 25 at most. Use these instead of the single-group fields, not with them. |
name | Optional. Used only when the person has no name yet. It never changes a name that's already set. |
send_invitation | Optional, true or false. Left out, people who need an invitation get one. false adds them with no email. A person already active in your App never gets another invitation. |
role | Optional, member or editor, member by default. Applies only to people new to your App. |
external_user_id | Optional. Your own ID for the person. |
Copy a group's ID from Group ID on the Access Groups page, or from the Snippet Generator. See Access Groups.
curl -X POST https://app.thoughtflow.ai/api/v1/access/grant \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "avery.lane@example.com",
"name": "Avery Lane",
"access_group_id": "7b1c9a52-0000-4000-8000-000000000000"
}'
{
"data": {
"status": "new",
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"active_groups": ["Founding Clients"]
}
}
status is new for someone new to ThoughtFlow, existing for someone already in your App, and existing_added_to_workspace for someone with a ThoughtFlow account who wasn't active in your App, including a former Member added back. active_groups lists every group the person is in now, by name.
With the list form, the response also gives the person's role and a result for each group: added, or already_member if they were in it already.
curl -X POST https://app.thoughtflow.ai/api/v1/access/grant \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "avery.lane@example.com",
"access_group_ids": [
"7b1c9a52-0000-4000-8000-000000000000",
"3e8f2d10-0000-4000-8000-000000000000"
],
"send_invitation": false
}'
{
"data": {
"status": "new",
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"active_groups": ["Founding Clients", "Monthly Coaching"],
"role": "member",
"groups": [
{ "access_group_id": "7b1c9a52-0000-4000-8000-000000000000", "name": "Founding Clients", "result": "added" },
{ "access_group_id": "3e8f2d10-0000-4000-8000-000000000000", "name": "Monthly Coaching", "result": "added" }
]
}
}
Adding someone back. If the person was deactivated, or their access had ended, this call restores them with the role they had before and clears any old end date. Their old groups aren't restored, so name every group they should have. No email is sent, except an invitation to someone who never accepted their first one. A removed App Admin can't be added back this way.
Remove from Access Group
POST /api/v1/access/revoke
Removes a person from one Access Group. To remove several at once, use Change Groups.
| Field | Description |
|---|---|
email | Required. The person's email. |
access_group_id or access_group_name | One group, by ID (recommended) or by name. Send one of the two, not both. |
curl -X POST https://app.thoughtflow.ai/api/v1/access/revoke \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "avery.lane@example.com",
"access_group_id": "7b1c9a52-0000-4000-8000-000000000000"
}'
{
"data": { "revoked": true, "user_id": "0d6f5c1e-0000-4000-8000-000000000000" }
}
The answer is the same if the person wasn't in the group. Removing a group doesn't remove the person from your App: they keep your Open tools and whatever their other groups give them. A person who isn't in your App, or is deactivated, gets 404 user_not_found.
Check Groups
GET /api/v1/access/users/{email}/groups
Lists the Access Groups a person is in now, with when each was granted and when it ends, if it does.
curl https://app.thoughtflow.ai/api/v1/access/users/avery.lane@example.com/groups \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"groups": [
{
"name": "Founding Clients",
"access_group_id": "7b1c9a52-0000-4000-8000-000000000000",
"granted_at": "2026-11-01T15:04:05.000Z",
"ends_at": null
}
]
}
}
List Members
GET /api/v1/access/members
Lists the people in your App, a page at a time.
| Query value | Description |
|---|---|
status | Optional. active (the default), expired or deactivated. |
limit | Optional. A whole number from 1 to 200, 100 by default. |
cursor | Optional. The next_cursor from the previous page, to get the next one. next_cursor is null on the last page. |
curl "https://app.thoughtflow.ai/api/v1/access/members?status=active&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"members": [
{
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"name": "Avery Lane",
"role": "member",
"status": "active",
"ends_at": null,
"groups": [
{ "access_group_id": "7b1c9a52-0000-4000-8000-000000000000", "name": "Founding Clients" }
]
}
],
"next_cursor": null
}
}
Each entry gives the person's role (member, editor or admin), status (active, expired or deactivated), ends_at and current groups.
Look Up Member
GET /api/v1/access/members/{email}
Finds one person by email. The answer holds a member entry in the same shape as List Members.
curl https://app.thoughtflow.ai/api/v1/access/members/avery.lane@example.com \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"member": {
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"name": "Avery Lane",
"role": "member",
"status": "active",
"ends_at": null,
"groups": [
{ "access_group_id": "7b1c9a52-0000-4000-8000-000000000000", "name": "Founding Clients" }
]
}
}
}
Change Role
PATCH /api/v1/access/members/{email}
Switches a person between Member and Editor.
| Field | Description |
|---|---|
role | Required. member or editor. |
curl -X PATCH https://app.thoughtflow.ai/api/v1/access/members/avery.lane@example.com \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "role": "editor" }'
{
"data": {
"changed": true,
"member": {
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"name": "Avery Lane",
"role": "editor",
"status": "active",
"ends_at": null,
"groups": [
{ "access_group_id": "7b1c9a52-0000-4000-8000-000000000000", "name": "Founding Clients" }
]
}
}
}
changed is false when the person already had that role. A deactivated Member must be added back first. An App Admin's role can't be changed here. What each role can do is covered in Team Roles.
Change Groups
PATCH /api/v1/access/members/{email}/groups
Adds and removes Access Groups in one call.
| Field | Description |
|---|---|
add_access_group_ids, add_access_group_names | Lists of groups to add, by ID or by name. |
remove_access_group_ids, remove_access_group_names | Lists of groups to remove, by ID or by name. |
Send at least one list, with 25 groups at most in all. A group can't be both added and removed. A deactivated Member must be added back first.
curl -X PATCH https://app.thoughtflow.ai/api/v1/access/members/avery.lane@example.com/groups \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"add_access_group_ids": ["7b1c9a52-0000-4000-8000-000000000000"],
"remove_access_group_ids": ["3e8f2d10-0000-4000-8000-000000000000"]
}'
{
"data": {
"member": {
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"name": "Avery Lane",
"role": "member",
"status": "active",
"ends_at": null,
"groups": [
{ "access_group_id": "7b1c9a52-0000-4000-8000-000000000000", "name": "Founding Clients" }
]
},
"groups": [
{ "access_group_id": "7b1c9a52-0000-4000-8000-000000000000", "name": "Founding Clients", "result": "added" },
{ "access_group_id": "3e8f2d10-0000-4000-8000-000000000000", "name": "Monthly Coaching", "result": "removed" }
]
}
}
Each group's result is added, already_member, removed or not_member.
Deactivate Member
DELETE /api/v1/access/members/{email}
Ends a person's access to your App and removes them from all of their Access Groups. It never deletes them. Adding them back later restores their access, but not their groups.
curl -X DELETE https://app.thoughtflow.ai/api/v1/access/members/avery.lane@example.com \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"deactivated": true,
"member": {
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"name": "Avery Lane",
"role": "member",
"status": "deactivated",
"ends_at": null,
"groups": []
}
}
}
deactivated is false when the person was already deactivated. An App Admin can't be deactivated here.
Bulk Calls
The three bulk calls take a members list of up to 100 people and answer with one result for each person, in the order you sent them. Each result has the email as you sent it and ok: true with the person's data, or false with an error. succeeded and failed count them. One person failing doesn't stop the others.
Some mistakes refuse the whole request, and nothing changes for anyone:
- The body isn't a JSON object, or
membersis missing or empty. - More than 100 people.
- The same email more than once.
- An Access Group that doesn't exist, in Bulk Add or Bulk Update.
If a result's error code is not_processed, the request ran out of time before it reached that person, and nothing changed for them. Send them again.
Bulk Add
POST /api/v1/access/bulk/add
Each person in members takes the same fields as Add to Access Group.
curl -X POST https://app.thoughtflow.ai/api/v1/access/bulk/add \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"members": [
{ "email": "avery.lane@example.com", "access_group_id": "7b1c9a52-0000-4000-8000-000000000000" },
{ "email": "jordan.reyes@example.com", "access_group_ids": ["7b1c9a52-0000-4000-8000-000000000000", "3e8f2d10-0000-4000-8000-000000000000"] }
]
}'
{
"data": {
"results": [
{
"email": "avery.lane@example.com",
"ok": true,
"data": { "status": "new", "user_id": "0d6f5c1e-0000-4000-8000-000000000000", "active_groups": ["Founding Clients"] }
},
{
"email": "jordan.reyes@example.com",
"ok": false,
"error": {
"code": "invitation_limit_reached",
"message": "This API key has sent too many invitations. Try again in 30 seconds.",
"retry_after_seconds": 30
}
}
],
"succeeded": 1,
"failed": 1
}
}
Bulk Update
POST /api/v1/access/bulk/update
Each person in members takes an email, plus role, the four group lists from Change Groups, or both. Send at least one. Each successful result holds the person's member entry, changed when you sent a role, and groups when you sent a group list.
curl -X POST https://app.thoughtflow.ai/api/v1/access/bulk/update \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"members": [
{ "email": "avery.lane@example.com", "add_access_group_ids": ["3e8f2d10-0000-4000-8000-000000000000"] },
{ "email": "casey.morgan@example.com", "role": "editor" }
]
}'
{
"data": {
"results": [
{
"email": "avery.lane@example.com",
"ok": true,
"data": {
"member": {
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"name": "Avery Lane",
"role": "member",
"status": "active",
"ends_at": null,
"groups": [
{ "access_group_id": "7b1c9a52-0000-4000-8000-000000000000", "name": "Founding Clients" },
{ "access_group_id": "3e8f2d10-0000-4000-8000-000000000000", "name": "Monthly Coaching" }
]
},
"groups": [
{ "access_group_id": "3e8f2d10-0000-4000-8000-000000000000", "name": "Monthly Coaching", "result": "added" }
]
}
},
{
"email": "casey.morgan@example.com",
"ok": false,
"error": { "code": "user_not_found", "message": "No user with that email exists in this App" }
}
],
"succeeded": 1,
"failed": 1
}
}
Bulk Deactivate
POST /api/v1/access/bulk/deactivate
Each person in members takes only an email. Each successful result holds the same data as Deactivate Member.
curl -X POST https://app.thoughtflow.ai/api/v1/access/bulk/deactivate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "members": [ { "email": "avery.lane@example.com" }, { "email": "jordan.reyes@example.com" } ] }'
{
"data": {
"results": [
{
"email": "avery.lane@example.com",
"ok": true,
"data": {
"deactivated": true,
"member": {
"user_id": "0d6f5c1e-0000-4000-8000-000000000000",
"email": "avery.lane@example.com",
"name": "Avery Lane",
"role": "member",
"status": "deactivated",
"ends_at": null,
"groups": []
}
}
},
{
"email": "jordan.reyes@example.com",
"ok": false,
"error": { "code": "user_not_found", "message": "No user with that email exists in this App" }
}
],
"succeeded": 1,
"failed": 1
}
}
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | The body is missing a field or isn't valid. The message names the field, such as "email is required." |
| 401 | unauthorized | The API key is missing, wrong or revoked. The message is "Invalid or missing API key". |
| 403 | insufficient_permission | The API key doesn't have the Access Management permission. |
| 403 | admin_role_refused | The call tried to change or deactivate an App Admin, or sent role as admin. |
| 404 | access_group_not_found | No Access Group with that ID or name exists in this App. A list call names the groups it couldn't find. |
| 404 | user_not_found | No person with that email is in this App. |
| 409 | admin_restore_refused | The person is an App Admin whose access was removed, so an add can't restore it. |
| 409 | member_deactivated | The Member is deactivated. Add them back before changing their role or groups. |
| 409 | membership_changed | The person's membership changed while the request ran. Send it again. |
| 429 | request_limit_reached | This key sent too many requests. Wait for the Retry-After seconds. |
| 429 | invitation_limit_reached | This key caused too many invitation emails. Nothing changed for that person. Wait for the Retry-After seconds. |
| 429 | rate_limited | "The email service is not accepting more invitations right now. Try again later." |
| 500 | db_error | A read or write failed. Send the request again. |
| 500 | invite_failed | The invitation email couldn't be sent. |
| 500 | account_create_failed | The account couldn't be created. Try again. |
| 500 | auth_lookup_failed | The account lookup failed. Try again. |
| 200 | not_processed | In a bulk result only: the request ran out of time before this person. Nothing changed for them. Send them again. |