---
title: "Set up the tenant of the caller's organization"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up the tenant of the caller's organization

Path: CloudRaker Workspace API › Onboarding

`POST /onboarding/tenant`

Sets up the tenant of an organization that was created somewhere else, the same way as the organization create: the tenant itself, then the default space. The organization comes from the session: its organization when it carries one, else the organization the caller already belongs to. Idempotent: an organization that already has its tenant answers `provisioned: false` and nothing changes. Creates no organization and no membership.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.cloudraker.com/onboarding/tenant \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/onboarding/tenant';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/onboarding/tenant"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

The organization and whether this call set up its tenant.

#### Example

```json
{
  "organizationId": "org_01J…",
  "tenantSlug": "acme-corp",
  "provisioned": true
}
```

- `organizationId` (`ensureOnboardingTenant.response.200.organizationId`; string, required)
  - example `"org_01J…"`
- `tenantSlug` (`ensureOnboardingTenant.response.200.tenantSlug`; string, required)
  - example `"acme-corp"`
- `provisioned` (`ensureOnboardingTenant.response.200.provisioned`; boolean, required)

### 403

The caller is not a person. Organization API keys and embed tokens authenticate, but cannot hold a membership.

### 404

The caller belongs to no organization.

### 422

`disposable_email`: the organization founder signed up with a disposable mailbox. Sign up with a work or personal email address.

### 429

`rate_limited`: too many onboarding requests. Try again in one minute.


Source: https://docs.cloudraker.com/workspace/api/onboarding/ensure-onboarding-tenant/index.md
