API referenceGET

List workspaces

List the workspaces a RedReplier credential can act in, with the role and permissions held in each.

GEThttps://ai.redreplier.com/ai-app/api/v1/workspaces

List 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 the X-Workspace-Id header 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. key is admin, editor, contributor or viewer.
  • permissions (string[]): Permission keys you hold in this workspace, such as redreplier.write.
  • isDefault (boolean): True for the workspace a call lands in when you send no X-Workspace-Id header.
  • 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
    }
  ]
}