API referenceGET
List workspaces
List the workspaces a RedReplier credential can act in, with the role and permissions held in each.
GET
https://ai.redreplier.com/ai-app/api/v1/workspacesList the workspaces a RedReplier credential can act in, with the role and permissions held in each.
Bearer Token (RedReplier API token)
Parameters
This endpoint does not take path or query parameters.
Request body
This endpoint does not require a JSON body.
Response
Returns an object with a workspaces array.
workspaces(Workspace[]): Workspaces this credential can act in.
Workspace object
id(string): Workspace ID. Send it in theX-Workspace-Idheader to act in this workspace.name(string): Workspace name.organization({ id, name }): Organization that owns the workspace.role({ key, name }): Your role in this workspace.keyisadmin,editor,contributororviewer.permissions(string[]): Permission keys you hold in this workspace, such asredreplier.write.isDefault(boolean): True for the workspace a call lands in when you send noX-Workspace-Idheader.current(boolean): True for the workspace this call landed in.
Notes
An OAuth sign-in, such as the Claude or ChatGPT connector, reaches every workspace its member belongs to, across organizations. An API key reaches only its own workspace, so the list has one entry. Pick a workspace by sending its id in the X-Workspace-Id header on any other request.
Errors
401 Unauthorized: Missing or invalid Bearer token.500 Internal Server Error: Unexpected server error.
Example request (curl)
curl --request GET \
--url https://ai.redreplier.com/ai-app/api/v1/workspaces \
--header 'Authorization: Bearer redreplier_test_1234567890'200
{
"workspaces": [
{
"id": "acct_7dK9pQ2",
"name": "Acme CRM",
"organization": { "id": "org_01J8ZK4M2Q", "name": "Acme" },
"role": { "key": "editor", "name": "Editor" },
"permissions": ["workspace.read", "redreplier.write"],
"isDefault": true,
"current": true
},
{
"id": "acct_3Hm8XwR",
"name": "Northwind",
"organization": { "id": "org_01J9P7T3XB", "name": "Northwind Studio" },
"role": { "key": "viewer", "name": "Viewer" },
"permissions": ["workspace.read"],
"isDefault": false,
"current": false
}
]
}