Docs

Workspaces

GET
/v1/workspaces

Retrieve all workspaces.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100
search?string

Search workspaces by name

limit?integer

Maximum number of items to return per page

Range1 <= value <= 100
Default20
cursor?string

Cursor for pagination - omit for first page

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/workspaces"
{  "items": [    {      "id": "ws_It13CUaGEhLLAB87simX0",      "name": "my-workspace",      "logoUrl": "http://example.com",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
GET
/v1/workspaces/{id}

Retrieve a workspace by ID.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0"
{  "id": "ws_It13CUaGEhLLAB87simX0",  "name": "my-workspace",  "logoUrl": "http://example.com",  "createdAt": "2019-08-24T14:15:22Z"}
PATCH
/v1/workspaces/{id}

Update a workspace.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "ws_It13CUaGEhLLAB87simX0",  "name": "my-workspace",  "logoUrl": "http://example.com",  "createdAt": "2019-08-24T14:15:22Z"}
DELETE
/v1/workspaces/{id}

Delete a workspace. The workspace must have no projects.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0"
Empty
GET
/v1/workspaces/{id}/members

List all members of a workspace.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0/members"
{  "items": [    {      "userId": "string",      "email": "string",      "name": "string",      "image": "string",      "role": "workspace.member",      "joinedAt": "2019-08-24T14:15:22Z"    }  ]}
POST
/v1/workspaces/{id}/members

Add a member to a workspace by email. The user must already have an account.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0/members" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com",    "role": "workspace.member"  }'
{  "userId": "string",  "email": "string",  "name": "string",  "image": "string",  "role": "workspace.member",  "joinedAt": "2019-08-24T14:15:22Z"}
PATCH
/v1/workspaces/{id}/members/{userId}

Update a workspace member's role.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$
userId*string

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0/members/string" \  -H "Content-Type: application/json" \  -d '{    "role": "workspace.member"  }'
{  "userId": "string",  "email": "string",  "name": "string",  "image": "string",  "role": "workspace.member",  "joinedAt": "2019-08-24T14:15:22Z"}
DELETE
/v1/workspaces/{id}/members/{userId}

Remove a member from a workspace.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$
userId*string

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0/members/string"
Empty
GET
/v1/workspaces/{id}/settings

Read the ai-agent settings for a workspace. Returns defaults (enabled: true, debugPermissionMode: auto) when the workspace has never customized them.

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0/settings"
{  "workspaceId": "ws_It13CUaGEhLLAB87simX0",  "enabled": true,  "debugPermissionMode": "auto",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
PATCH
/v1/workspaces/{id}/settings

Update the ai-agent settings for a workspace. Supports debugPermissionMode (ask requires human approval on every ai-agent debug command, auto runs them without asking) and enabled (false turns the ai-agent off so incoming triggers are rejected before any session runs).

AuthorizationBearer <token>

API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys

In: header

Path Parameters

id*string

Unique identifier for the workspace.

Matchws_[0-9a-zA-Z]{24}$

Query Parameters

workspace?string

Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/workspaces/ws_It13CUaGEhLLAB87simX0/settings" \  -H "Content-Type: application/json" \  -d '{}'
{  "workspaceId": "ws_It13CUaGEhLLAB87simX0",  "enabled": true,  "debugPermissionMode": "auto",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}