# Organization admin check service

Checks authorization preconditions rather than creating or modifying administrator grants.

OpenAPI file: [`nominal.authorization.permissions.v1.json`](https://dev.nominal.io/api/_downloads/314d2e8fd0e5dcf40c19a4f25abc98a9/nominal.authorization.permissions.v1.json)

## Endpoints

### Check organization admin

POST `/authorization/permissions/v1/organization-admin-checks/check`

Checks that the caller is an admin of their current org. Returns an empty response when the caller is. Changes nothing.

Errors:

- PERMISSION_DENIED: the caller is not an admin of their current org.

Body

An empty JSON object, `{}`.

Response

An empty JSON object, `{}`.

Request

**curl**

```shell
curl -X POST "https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check" \
  -H "Authorization: Bearer <api key>" \
  -H "Content-Type: application/json" \
  --data '{}'
```

**requests**

```python
import requests

response = requests.post(
    "https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check",
    headers={"Authorization": "Bearer <api key>"},
    json={},
)
response.raise_for_status()
print(response.json())
```

**httpx**

```python
import httpx

response = httpx.post(
    "https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check",
    headers={"Authorization": "Bearer <api key>"},
    json={},
)
response.raise_for_status()
print(response.json())
```

**aiohttp**

```python
import asyncio

import aiohttp

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        async with session.post(
            "https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check",
            headers={"Authorization": "Bearer <api key>"},
            json={},
        ) as response:
            response.raise_for_status()
            print(await response.json())

asyncio.run(main())
```

Response: `200`

```json
{}
```

Page design based on [Scalar](https://scalar.com), MIT License.
