# tenants — NCM API

Use the tenants endpoint to manage role-based access for users within tenants. This endpoint is used in concert with the tenant_authorizations and users endpoints.

Base URL: https://api.cradlepointecm.com

## Authentication

This is a v3 endpoint (`/api/v3/` path). Send a Bearer token on every request:

```http
Authorization: Bearer <token>
```

Tokens are generated in the NCM UI under API Keys. The v2 and v3 auth schemes are NOT interchangeable: v2 API-key headers are rejected on v3 endpoints.

### GET /api/v3/tenants

Get tenants

Return a list of tenants/organizations

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| filter[name] | query | string | no |  |
| filter[type] | query | string | no |  |
| page[after] | query | string | no | Cursor for next page. |
| page[before] | query | string | no | Cursor for prior page. |
| page[size] | query | integer | no | Number of results to return per page. |
| sort | query | array of string (name | -name | created_at | -created_at | updated_at | -updated_at) | no | Which field to use when ordering the results. |

**Example request**

```bash
curl "https://api.cradlepointecm.com/api/v3/tenants" \
  -H "Authorization: Bearer <token>"
```

**Response 200**

### GET /api/v3/tenants/{id}

Get tenants by ID

Get a single tenant/organization

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes |  |

**Example request**

```bash
curl "https://api.cradlepointecm.com/api/v3/tenants/{id}" \
  -H "Authorization: Bearer <token>"
```

**Response 200**
