> ## Documentation Index
> Fetch the complete documentation index at: https://developers.resistant.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API operations

## Try it in Postman

If you prefer Postman over cURL, you can [explore our Postman Workspace](https://www.postman.com/solutions-resistant-9740811/resistant-ai). The workspace contains two collections:

* **Documents**: For the core Resistant Documents API.
* **Tenants**: For the Tenant Management API. This collection contains the environments (Testing and Production).

### Required variables

The collections are designed to be used with collection variables:

* `baseUrl` (API base URL)
* `access_token` (Bearer access token)
* `tenant_id` (used for tenant-scoped endpoints)
* `application_id` (used for application-scoped endpoints)

After importing, set these variables at the collection level (or in a Postman environment) before running requests.

> These requests use an **access token** in the `Authorization: Bearer ...` header.\
> If you’re using JWT client assertion, the JWT is used to obtain the access token from the token endpoint (it is not sent to these API endpoints directly).

## API operations

`baseUrl`

* Production: `https://api.tenants.resistant.ai/v0`
* Testing: `https://api.tenants.testing.resistant.ai/v0`

### List tenants in organization

```bash theme={null}
curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  {{baseUrl}}/tenants
```

### Create tenant

```bash theme={null}
curl -X POST \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  {{baseUrl}}/tenants \
  -d '{"name": "tenant_name"}'
```

### Get tenant

```bash theme={null}
curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  {{baseUrl}}/tenants/<tenant_id>
```

### Delete tenant

```bash theme={null}
curl -X DELETE \
  -H "Authorization: Bearer <access_token>" \
  {{baseUrl}}/tenants/<tenant_id>
```
