EaserixDocs
DevelopersAPI referenceAuth & accountsAuth

Switch the active organization

Mints a new org-scoped access token for a workspace the caller belongs to and records it as the default. The refresh token is unchanged.

View as Markdown
POST
/v1/auth/switch-org
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/auth/switch-org" \  -H "Content-Type: application/json" \  -d '{    "org_id": "string"  }'
{  "access_token": "string",  "expires_at": "2019-08-24T14:15:22Z",  "org": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "slug": "string",    "name": "string",    "kind": "string",    "avatar_url": "string",    "role": "string",    "permissions": [      "string"    ],    "tools": [      "string"    ]  }}