# Organizations

> Read and rename your organization, the account that owns zones, members and tokens.

An organization is the account that owns zones, members, clients and API tokens. A token belongs to exactly one organization, so `GET /v1/orgs` returns the token's own organization.

| Operation | Endpoint |
|---|---|
| [List organizations](https://developers.openwaf.dev/api/organizations/#list-orgs) | `GET /v1/orgs` |
| [Get organization](https://developers.openwaf.dev/api/organizations/#get-org) | `GET /v1/orgs/{org}` |
| [Rename organization](https://developers.openwaf.dev/api/organizations/#rename-org) | `PATCH /v1/orgs/{org}` |

## List organizations

```http
GET /v1/orgs
```

Returns the organization of the token. A token belongs to exactly one organization, so the list always has one item; use its `id` as `{org}` in every other route.

**Required role:** `readonly` or higher.

#### Response

- `200`: Returns `items`, an array of [Organization](https://developers.openwaf.dev/api/schemas/#organization).

| Field | Type | Description |
|---|---|---|
| `items[].id` | string (uuid) | Id. |
| `items[].name` | string | Name. |
| `items[].ns_pair` | array of string | Name servers the delegated zones use. Exactly 2 items. |
| `items[].created_at` | string (date-time) | Creation time. |
| `items[].updated_at` | string (date-time) | Last change. |
| `items[].pending_approval` | boolean | Sign-up waiting for approval (no writes). |
| `items[].suspended_at` | string (date-time) or null | Suspended (no writes; its zones are not served). |
| `items[].suspended_reason` | string or null |  |
| `items[].features` | array of string | Features enabled for the organization (`egress`: AI egress). Items: one of `egress`. |

#### Errors

| Status | Description |
|---|---|
| `401` | Missing, invalid or expired token (`unauthorized`). |

#### Example

**curl**


```sh
curl "https://dash.openwaf.dev/v1/orgs" \
  -H "Authorization: Bearer $OPENWAF_TOKEN"
```

**TypeScript**


```ts
import { OpenWAF } from "./openwaf";

const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKEN
const result = await owf.listOrgs();
```

**Python**


```py
from openwaf import OpenWAF

owf = OpenWAF(base_url="https://dash.openwaf.dev")  # token from OPENWAF_TOKEN
result = owf.list_orgs()
```



```json
{
  "items": [
    {
      "id": "1e7c9a3b-5d2f-4b8a-9c6e-0f2a4b6c8d1e",
      "name": "Acme Digital",
      "ns_pair": [
        "ns1.example-dns.net",
        "ns2.example-dns.net"
      ],
      "created_at": "2026-03-02T10:15:00Z",
      "updated_at": "2026-10-01T08:00:00Z",
      "pending_approval": false,
      "suspended_at": null,
      "suspended_reason": null,
      "features": [
        "egress"
      ]
    }
  ]
}
```

## Get organization

```http
GET /v1/orgs/{org}
```

Returns the organization, with the pair of name servers (`ns_pair`) that its delegated zones use.

**Required role:** `readonly` or higher.

#### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `org` | path | string (uuid) | Yes | Organization id. Every route checks that it is the token's organization (otherwise `404`). |

#### Response

- `200`: Returns [Organization](https://developers.openwaf.dev/api/schemas/#organization).

| Field | Type | Description |
|---|---|---|
| `id` | string (uuid) | Id. |
| `name` | string | Name. |
| `ns_pair` | array of string | Name servers the delegated zones use. Exactly 2 items. |
| `created_at` | string (date-time) | Creation time. |
| `updated_at` | string (date-time) | Last change. |
| `pending_approval` | boolean | Sign-up waiting for approval (no writes). |
| `suspended_at` | string (date-time) or null | Suspended (no writes; its zones are not served). |
| `suspended_reason` | string or null |  |
| `features` | array of string | Features enabled for the organization (`egress`: AI egress). Items: one of `egress`. |

#### Errors

| Status | Description |
|---|---|
| `404` | Not found, or not visible to the token (`not_found`). |

#### Example

**curl**


```sh
curl "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG" \
  -H "Authorization: Bearer $OPENWAF_TOKEN"
```

**TypeScript**


```ts
import { OpenWAF } from "./openwaf";

const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKEN
const result = await owf.getOrg();
```

**Python**


```py
from openwaf import OpenWAF

owf = OpenWAF(base_url="https://dash.openwaf.dev")  # token from OPENWAF_TOKEN
result = owf.get_org()
```



```json
{
  "id": "1e7c9a3b-5d2f-4b8a-9c6e-0f2a4b6c8d1e",
  "name": "Acme Digital",
  "ns_pair": [
    "ns1.example-dns.net",
    "ns2.example-dns.net"
  ],
  "created_at": "2026-03-02T10:15:00Z",
  "updated_at": "2026-10-01T08:00:00Z",
  "pending_approval": false,
  "suspended_at": null,
  "suspended_reason": null,
  "features": [
    "egress"
  ]
}
```

## Rename organization

```http
PATCH /v1/orgs/{org}
```

Changes the name of the organization.

**Required role:** `admin` or higher. Organization-wide.

#### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `org` | path | string (uuid) | Yes | Organization id. Every route checks that it is the token's organization (otherwise `404`). |

#### Request body

Content type `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | Yes | Name. |

#### Response

- `200`: Returns [Organization](https://developers.openwaf.dev/api/schemas/#organization).

| Field | Type | Description |
|---|---|---|
| `id` | string (uuid) | Id. |
| `name` | string | Name. |
| `ns_pair` | array of string | Name servers the delegated zones use. Exactly 2 items. |
| `created_at` | string (date-time) | Creation time. |
| `updated_at` | string (date-time) | Last change. |
| `pending_approval` | boolean | Sign-up waiting for approval (no writes). |
| `suspended_at` | string (date-time) or null | Suspended (no writes; its zones are not served). |
| `suspended_reason` | string or null |  |
| `features` | array of string | Features enabled for the organization (`egress`: AI egress). Items: one of `egress`. |

#### Errors

| Status | Description |
|---|---|
| `403` | The token's role or limits do not allow it (`forbidden`). |

#### Example

**curl**


```sh
curl -X PATCH "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG" \
  -H "Authorization: Bearer $OPENWAF_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
    "name": "Acme Digital"
  }'
```

**TypeScript**


```ts
import { OpenWAF } from "./openwaf";

const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKEN
const result = await owf.renameOrg({
  body: {
    name: "Acme Digital"
  }
});
```

**Python**


```py
from openwaf import OpenWAF

owf = OpenWAF(base_url="https://dash.openwaf.dev")  # token from OPENWAF_TOKEN
result = owf.rename_org(
    body={
        "name": "Acme Digital"
    },
)
```



```json
{
  "id": "1e7c9a3b-5d2f-4b8a-9c6e-0f2a4b6c8d1e",
  "name": "Acme Digital",
  "ns_pair": [
    "ns1.example-dns.net",
    "ns2.example-dns.net"
  ],
  "created_at": "2026-03-02T10:15:00Z",
  "updated_at": "2026-10-01T08:00:00Z",
  "pending_approval": false,
  "suspended_at": null,
  "suspended_reason": null,
  "features": [
    "egress"
  ]
}
```
