> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.prividium.com/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# organizations

## GET /organizations/

`GET /organizations/`

Search organizations with pagination

### Query parameters

- `limit` `integer`
- `offset` `integer`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
  - `brandName` `string | null` _(required)_
  - `logoUrl` `string | null` _(required)_
  - `primaryColor` `string | null` _(required)_
  - `siweLoginEnabled` `boolean` _(required)_
  - `siweAllowedDomains` `string[]` _(required)_
  - `deletedAt` `string <date-time>` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `defaultRoles` `object[]` _(required)_
    - `id` `string` _(required)_
    - `roleName` `string` _(required)_
    - `systemPermissions` `string[]`
    - `isSystemRole` `boolean`
    - `organizationId` `string | null`
    - `createdAt` `string <date-time>`
    - `updatedAt` `string <date-time>`
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/?limit=10&offset=0'
```

```ts
fetch('/api/organizations/?limit=10&offset=0')
```

## POST /organizations/

`POST /organizations/`

Creates a new organization

### Request body (required) (`application/json`)

- `name` `string` _(required)_
- `defaultRoles` `object[]` _(required)_
  - `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `brandName` `string | null` _(required)_
- `logoUrl` `string | null` _(required)_
- `primaryColor` `string | null` _(required)_
- `siweLoginEnabled` `boolean` _(required)_
- `siweAllowedDomains` `string[]` _(required)_
- `deletedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `defaultRoles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/ \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "defaultRoles": [
    {
      "id": "string"
    }
  ]
}'
```

```ts
fetch('/api/organizations/', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'string',
    defaultRoles: [
      {
        id: 'string'
      }
    ]
  })
})
```

## GET /organizations/{id}

`GET /organizations/{id}`

Get organization by id

### Path parameters

- `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `brandName` `string | null` _(required)_
- `logoUrl` `string | null` _(required)_
- `primaryColor` `string | null` _(required)_
- `siweLoginEnabled` `boolean` _(required)_
- `siweAllowedDomains` `string[]` _(required)_
- `deletedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `defaultRoles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string
```

```ts
fetch('/api/organizations/string')
```

## PUT /organizations/{id}

`PUT /organizations/{id}`

Update an organization by id

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `name` `string` _(required)_
- `defaultRoles` `object[]` _(required)_
  - `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `brandName` `string | null` _(required)_
- `logoUrl` `string | null` _(required)_
- `primaryColor` `string | null` _(required)_
- `siweLoginEnabled` `boolean` _(required)_
- `siweAllowedDomains` `string[]` _(required)_
- `deletedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `defaultRoles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "defaultRoles": [
    {
      "id": "string"
    }
  ]
}'
```

```ts
fetch('/api/organizations/string', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'string',
    defaultRoles: [
      {
        id: 'string'
      }
    ]
  })
})
```

## PATCH /organizations/{id}

`PATCH /organizations/{id}`

Update an organization's branding (name, logo, colors)

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `name` `string`
- `brandName` `string` _(required)_
- `logoUrl` `string` _(required)_
- `primaryColor` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `brandName` `string | null` _(required)_
- `logoUrl` `string | null` _(required)_
- `primaryColor` `string | null` _(required)_
- `siweLoginEnabled` `boolean` _(required)_
- `siweAllowedDomains` `string[]` _(required)_
- `deletedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `defaultRoles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "brandName": "string",
  "logoUrl": "string",
  "primaryColor": "string"
}'
```

```ts
fetch('/api/organizations/string', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'string',
    brandName: 'string',
    logoUrl: 'string',
    primaryColor: 'string'
  })
})
```

## DELETE /organizations/{id}

`DELETE /organizations/{id}`

Soft-delete an organization, revoking its members' sessions and the API keys of the credentials it owns

### Path parameters

- `id` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string', {
  method: 'DELETE'
})
```

## POST /organizations/{id}/users

`POST /organizations/{id}/users`

Assign a user to an organization

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `userId` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `displayName` `string` _(required)_
- `source` `string` _(required)_
- `suspendedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `organization` `object` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`
- `wallets` `object[]` _(required)_
  - `id` `integer` _(required)_
  - `walletAddress` `string` _(required)_
  - `userId` `string` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/users \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "userId": "string"
}'
```

```ts
fetch('/api/organizations/string/users', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    userId: 'string'
  })
})
```

## GET /organizations/{id}/oidc-provider

`GET /organizations/{id}/oidc-provider`

Public OIDC discovery for an organization: issuer, client ID and branding, so admin/user panels can route to the organization's identity provider before authenticating. Excludes the JWKS URI.

### Path parameters

- `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `issuer` `string` _(required)_
- `clientId` `string` _(required)_
- `displayName` `string | null` _(required)_
- `userPanelUrl` `string | null` _(required)_
- `siweLoginEnabled` `boolean` _(required)_
- `branding` `object` _(required)_
  - `brandName` `string | null` _(required)_
  - `logoUrl` `string | null` _(required)_
  - `primaryColor` `string | null` _(required)_

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/oidc-provider
```

```ts
fetch('/api/organizations/string/oidc-provider')
```

## PUT /organizations/{id}/oidc-provider

`PUT /organizations/{id}/oidc-provider`

Set (create or replace) an organization's OIDC identity provider

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `issuer` `string` _(required)_
- `jwksUri` `string` _(required)_
- `audience` `string` _(required)_
- `clientId` `string` _(required)_
- `displayName` `string | null`
- `userPanelUrl` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `organizationId` `string` _(required)_
- `issuer` `string` _(required)_
- `jwksUri` `string` _(required)_
- `audience` `string` _(required)_
- `clientId` `string` _(required)_
- `displayName` `string | null` _(required)_
- `userPanelUrl` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/oidc-provider \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "issuer": "string",
  "jwksUri": "string",
  "audience": "string",
  "clientId": "string",
  "displayName": "string",
  "userPanelUrl": "string"
}'
```

```ts
fetch('/api/organizations/string/oidc-provider', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    issuer: 'string',
    jwksUri: 'string',
    audience: 'string',
    clientId: 'string',
    displayName: 'string',
    userPanelUrl: 'string'
  })
})
```

## DELETE /organizations/{id}/oidc-provider

`DELETE /organizations/{id}/oidc-provider`

Remove an organization's OIDC identity provider

### Path parameters

- `id` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/oidc-provider \
  --request DELETE
```

```ts
fetch('/api/organizations/string/oidc-provider', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/oidc-provider/config

`GET /organizations/{id}/oidc-provider/config`

Get an organization's full OIDC provider configuration for the operator view

### Path parameters

- `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `organizationId` `string` _(required)_
- `issuer` `string` _(required)_
- `jwksUri` `string` _(required)_
- `audience` `string` _(required)_
- `clientId` `string` _(required)_
- `displayName` `string | null` _(required)_
- `userPanelUrl` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/oidc-provider/config
```

```ts
fetch('/api/organizations/string/oidc-provider/config')
```

## PUT /organizations/{id}/siwe-settings

`PUT /organizations/{id}/siwe-settings`

Set an organization's SIWE wallet-login settings. When enabled, the host of the org's OIDC userPanelUrl plus the extra allowed domains become valid SIWE domains for the org's login challenges (authenticated wallet-association challenges accept them regardless).

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `siweLoginEnabled` `boolean` _(required)_
- `siweAllowedDomains` `string[]` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `brandName` `string | null` _(required)_
- `logoUrl` `string | null` _(required)_
- `primaryColor` `string | null` _(required)_
- `siweLoginEnabled` `boolean` _(required)_
- `siweAllowedDomains` `string[]` _(required)_
- `deletedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `defaultRoles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/siwe-settings \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "siweLoginEnabled": true,
  "siweAllowedDomains": [
    "string"
  ]
}'
```

```ts
fetch('/api/organizations/string/siwe-settings', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    siweLoginEnabled: true,
    siweAllowedDomains: ['string']
  })
})
```

## GET /organizations/{id}/pending-admins

`GET /organizations/{id}/pending-admins`

List the pending admins seeded for an organization

### Path parameters

- `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `organizationId` `string` _(required)_
- `oidcSub` `string` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/pending-admins
```

```ts
fetch('/api/organizations/string/pending-admins')
```

## POST /organizations/{id}/pending-admins

`POST /organizations/{id}/pending-admins`

Pre-seed an organization's first admin by OIDC sub (consumed on their first login)

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `oidcSub` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `organizationId` `string` _(required)_
- `oidcSub` `string` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/pending-admins \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "oidcSub": "string"
}'
```

```ts
fetch('/api/organizations/string/pending-admins', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    oidcSub: 'string'
  })
})
```

## DELETE /organizations/{id}/pending-admins/{oidcSub}

`DELETE /organizations/{id}/pending-admins/{oidcSub}`

Remove a pending admin from an organization

### Path parameters

- `id` `string` _(required)_
- `oidcSub` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/pending-admins/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/pending-admins/string', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/users/{userId}

`GET /organizations/{id}/users/{userId}`

Get a single member of the organization

### Path parameters

- `id` `string` _(required)_
- `userId` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `displayName` `string` _(required)_
- `source` `string` _(required)_
- `suspendedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `organization` `object` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`
- `wallets` `object[]` _(required)_
  - `id` `integer` _(required)_
  - `walletAddress` `string` _(required)_
  - `userId` `string` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/users/string
```

```ts
fetch('/api/organizations/string/users/string')
```

## DELETE /organizations/{id}/users/{userId}

`DELETE /organizations/{id}/users/{userId}`

Remove a member from an organization

### Path parameters

- `id` `string` _(required)_
- `userId` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/users/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/users/string', {
  method: 'DELETE'
})
```

## POST /organizations/{id}/users/invite

`POST /organizations/{id}/users/invite`

Pre-authorize a member by OIDC subject (claimed on first login via the org IdP)

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `oidcSub` `string` _(required)_
- `displayName` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `displayName` `string` _(required)_
- `source` `string` _(required)_
- `suspendedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `organization` `object` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`
- `wallets` `object[]` _(required)_
  - `id` `integer` _(required)_
  - `walletAddress` `string` _(required)_
  - `userId` `string` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/users/invite \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "oidcSub": "string",
  "displayName": "string"
}'
```

```ts
fetch('/api/organizations/string/users/invite', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    oidcSub: 'string',
    displayName: 'string'
  })
})
```

## PUT /organizations/{id}/users/{userId}/roles

`PUT /organizations/{id}/users/{userId}/roles`

Set a member's organization-scoped roles

### Path parameters

- `id` `string` _(required)_
- `userId` `string` _(required)_

### Request body (required) (`application/json`)

- `roles` `string[]` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `displayName` `string` _(required)_
- `source` `string` _(required)_
- `suspendedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `organization` `object` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`
- `wallets` `object[]` _(required)_
  - `id` `integer` _(required)_
  - `walletAddress` `string` _(required)_
  - `userId` `string` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/users/string/roles \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "roles": [
    "string"
  ]
}'
```

```ts
fetch('/api/organizations/string/users/string/roles', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    roles: ['string']
  })
})
```

## GET /organizations/{id}/admins

`GET /organizations/{id}/admins`

List the admins of an organization

### Path parameters

- `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `displayName` `string` _(required)_
- `source` `string` _(required)_
- `suspendedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `organization` `object` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`
- `wallets` `object[]` _(required)_
  - `id` `integer` _(required)_
  - `walletAddress` `string` _(required)_
  - `userId` `string` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/admins
```

```ts
fetch('/api/organizations/string/admins')
```

## GET /organizations/{id}/audit-logs

`GET /organizations/{id}/audit-logs`

Paginated, filterable view of the organization's audit log

### Path parameters

- `id` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`
- `userId` `string`
- `actionType` `string`
- `traceId` `string`
- `startDate` `string <date-time> | string`
- `endDate` `string <date-time> | string`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `string` _(required)_
  - `activeUserId` `string | null` _(required)_
  - `activeTenantId` `null` _(required)_
  - `activeServiceId` `null` _(required)_
  - `activeOrganizationId` `string | null`
  - `actionType` `string` _(required)_
  - `actionDetails` `object` _(required)_
    - `resourceType` `string`
    - `resourceId` `string`
    - `operation` `string`
    - `result` `string`
    - `statusCode` `number`
    - `reason` `string`
    - `clientIp` `string`
    - `m2mAppId` `string`
    - `organizationLinkChange` `string`
  - `traceId` `string | null` _(required)_
  - `requestId` `string | null` _(required)_
  - `actorType` `string | null` _(required)_
  - `authSubject` `null` _(required)_
  - `ipAddress` `null` _(required)_
  - `userAgent` `null` _(required)_
  - `createdAt` `string` _(required)_
  - `operatorBypass` `boolean` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/audit-logs?limit=50&offset=0&userId=string&actionType=string&traceId=string&startDate=1970-01-01T00:00:00.000Z&endDate=1970-01-01T00:00:00.000Z'
```

```ts
fetch('/api/organizations/string/audit-logs?limit=50&offset=0&userId=string&actionType=string&traceId=string&startDate=1970-01-01T00:00:00.000Z&endDate=1970-01-01T00:00:00.000Z')
```

## POST /organizations/{id}/sessions/revoke

`POST /organizations/{id}/sessions/revoke`

Revoke all active sessions of the organization's users

### Path parameters

- `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `revoked` `integer` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/sessions/revoke \
  --request POST
```

```ts
fetch('/api/organizations/string/sessions/revoke', {
  method: 'POST'
})
```

## GET /organizations/{id}/roles

`GET /organizations/{id}/roles`

List an organization's custom roles

### Path parameters

- `id` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`
- `searchQuery` `string`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]` _(required)_
  - `isSystemRole` `boolean` _(required)_
  - `organizationId` `string | null` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `contractPermissionsCount` `integer` _(required)_
  - `usersCount` `integer` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/roles?limit=10&offset=0&searchQuery=string'
```

```ts
fetch('/api/organizations/string/roles?limit=10&offset=0&searchQuery=string')
```

## POST /organizations/{id}/roles

`POST /organizations/{id}/roles`

Create a custom role scoped to the organization

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `roleName` `string` _(required)_
- `systemPermissions` `string[]` _(required)_
- `organizationId` `string | null`

### Responses

#### `201`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `roleName` `string` _(required)_
- `systemPermissions` `string[]` _(required)_
- `isSystemRole` `boolean` _(required)_
- `organizationId` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `422`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/roles \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "roleName": "string",
  "systemPermissions": [
    "string"
  ],
  "organizationId": "string"
}'
```

```ts
fetch('/api/organizations/string/roles', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    roleName: 'string',
    systemPermissions: ['string'],
    organizationId: 'string'
  })
})
```

## GET /organizations/{id}/roles/{roleId}

`GET /organizations/{id}/roles/{roleId}`

Get one of an organization's custom roles by id

### Path parameters

- `id` `string` _(required)_
- `roleId` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `roleName` `string` _(required)_
- `systemPermissions` `string[]` _(required)_
- `isSystemRole` `boolean` _(required)_
- `organizationId` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/roles/string
```

```ts
fetch('/api/organizations/string/roles/string')
```

## PUT /organizations/{id}/roles/{roleId}

`PUT /organizations/{id}/roles/{roleId}`

Replace an organization role's permissions

### Path parameters

- `id` `string` _(required)_
- `roleId` `string` _(required)_

### Request body (required) (`application/json`)

- `roleName` `string` _(required)_
- `systemPermissions` `string[]` _(required)_
- `organizationId` `string | null`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `roleName` `string` _(required)_
- `systemPermissions` `string[]` _(required)_
- `isSystemRole` `boolean` _(required)_
- `organizationId` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/roles/string \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "roleName": "string",
  "systemPermissions": [
    "string"
  ],
  "organizationId": "string"
}'
```

```ts
fetch('/api/organizations/string/roles/string', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    roleName: 'string',
    systemPermissions: ['string'],
    organizationId: 'string'
  })
})
```

## DELETE /organizations/{id}/roles/{roleId}

`DELETE /organizations/{id}/roles/{roleId}`

Delete one of an organization's custom roles

### Path parameters

- `id` `string` _(required)_
- `roleId` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `422`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/roles/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/roles/string', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/roles/{roleId}/function-permissions

`GET /organizations/{id}/roles/{roleId}/function-permissions`

List the function permissions one of the organization's roles grants

### Path parameters

- `id` `string` _(required)_
- `roleId` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `integer` _(required)_
  - `contractAddress` `string` _(required)_
  - `methodSelector` `string` _(required)_
  - `accessType` `string` _(required)_
  - `functionSignature` `string` _(required)_
  - `ruleType` `string` _(required)_
  - `isUmbrella` `boolean` _(required)_
  - `organizationOnly` `boolean`
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `roles` `object[]`
    - `id` `string` _(required)_
    - `roleName` `string`
  - `argumentRestrictions` `object[]`
    - `argumentIndex` `integer` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/roles/string/function-permissions?limit=10&offset=0'
```

```ts
fetch('/api/organizations/string/roles/string/function-permissions?limit=10&offset=0')
```

## GET /organizations/{id}/m2m-applications

`GET /organizations/{id}/m2m-applications`

List the M2M credentials visible to the organization: its own credentials plus zone-level credentials the operator assigned to it.

### Path parameters

- `id` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
  - `description` `string | null` _(required)_
  - `ownerOrganizationId` `string | null` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `roles` `object[]` _(required)_
    - `id` `string` _(required)_
    - `roleName` `string` _(required)_
    - `systemPermissions` `string[]` _(required)_
    - `isSystemRole` `boolean` _(required)_
    - `createdAt` `string <date-time>` _(required)_
    - `updatedAt` `string <date-time>` _(required)_
  - `hasOverbroadIpWhitelist` `boolean` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/m2m-applications?limit=10&offset=0'
```

```ts
fetch('/api/organizations/string/m2m-applications?limit=10&offset=0')
```

## POST /organizations/{id}/m2m-applications

`POST /organizations/{id}/m2m-applications`

Create an M2M credential owned by the organization

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `name` `string` _(required)_
- `description` `string | null`
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_

### Responses

#### `201`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `ownerOrganizationId` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]` _(required)_
  - `isSystemRole` `boolean` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
- `hasOverbroadIpWhitelist` `boolean` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "description": "string",
  "roles": [
    {
      "id": "string"
    }
  ]
}'
```

```ts
fetch('/api/organizations/string/m2m-applications', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'string',
    description: 'string',
    roles: [
      {
        id: 'string'
      }
    ]
  })
})
```

## GET /organizations/{id}/m2m-applications/{appId}

`GET /organizations/{id}/m2m-applications/{appId}`

Get one of the M2M credentials visible to the organization: its own, or a zone-level one assigned to it. Anything else returns 404.

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `ownerOrganizationId` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]` _(required)_
  - `isSystemRole` `boolean` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
- `hasOverbroadIpWhitelist` `boolean` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications/string
```

```ts
fetch('/api/organizations/string/m2m-applications/string')
```

## PUT /organizations/{id}/m2m-applications/{appId}

`PUT /organizations/{id}/m2m-applications/{appId}`

Update an org-owned M2M credential's settings and role/permission selection (within the org-admin ceiling). A credential the org does not own returns 404.

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_

### Request body (required) (`application/json`)

- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `ownerOrganizationId` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]` _(required)_
  - `isSystemRole` `boolean` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
- `hasOverbroadIpWhitelist` `boolean` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications/string \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "description": "string",
  "roles": [
    {
      "id": "string"
    }
  ]
}'
```

```ts
fetch('/api/organizations/string/m2m-applications/string', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'string',
    description: 'string',
    roles: [
      {
        id: 'string'
      }
    ]
  })
})
```

## DELETE /organizations/{id}/m2m-applications/{appId}

`DELETE /organizations/{id}/m2m-applications/{appId}`

Delete an org-owned M2M credential. Zone-level credentials are operator-delete-only; a credential the org does not own returns 404.

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/m2m-applications/string', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/m2m-applications/{appId}/api-keys

`GET /organizations/{id}/m2m-applications/{appId}/api-keys`

List the API keys of an org-owned M2M credential

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `string` _(required)_
  - `name` `string` _(required)_
  - `keyPrefix` `string` _(required)_
  - `expiresAt` `string <date-time>` _(required)_
  - `lastUsedAt` `string <date-time>` _(required)_
  - `lastUsedIp` `string | null` _(required)_
  - `revokedAt` `string <date-time>` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/m2m-applications/string/api-keys?limit=10&offset=0'
```

```ts
fetch('/api/organizations/string/m2m-applications/string/api-keys?limit=10&offset=0')
```

## POST /organizations/{id}/m2m-applications/{appId}/api-keys

`POST /organizations/{id}/m2m-applications/{appId}/api-keys`

Create an API key for an org-owned M2M credential (the full key is returned only once)

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_

### Request body (required) (`application/json`)

- `name` `string` _(required)_
- `expiresAt` `unknown` _(required)_

### Responses

#### `201`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `name` `string` _(required)_
- `keyPrefix` `string` _(required)_
- `expiresAt` `string <date-time>` _(required)_
- `lastUsedAt` `string <date-time>` _(required)_
- `lastUsedIp` `string | null` _(required)_
- `revokedAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `fullKey` `string` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications/string/api-keys \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string"
}'
```

```ts
fetch('/api/organizations/string/m2m-applications/string/api-keys', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'string'
  })
})
```

## DELETE /organizations/{id}/m2m-applications/{appId}/api-keys/{keyId}

`DELETE /organizations/{id}/m2m-applications/{appId}/api-keys/{keyId}`

Revoke an API key of an org-owned M2M credential

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_
- `keyId` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications/string/api-keys/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/m2m-applications/string/api-keys/string', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/m2m-applications/{appId}/ip-whitelist

`GET /organizations/{id}/m2m-applications/{appId}/ip-whitelist`

List the IP whitelist of an org-owned M2M credential

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `string` _(required)_
  - `ipAddress` `string` _(required)_
  - `description` `string | null` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `isOverbroad` `boolean` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/m2m-applications/string/ip-whitelist?limit=10&offset=0'
```

```ts
fetch('/api/organizations/string/m2m-applications/string/ip-whitelist?limit=10&offset=0')
```

## POST /organizations/{id}/m2m-applications/{appId}/ip-whitelist

`POST /organizations/{id}/m2m-applications/{appId}/ip-whitelist`

Add an IP address to an org-owned M2M credential's whitelist

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_

### Request body (required) (`application/json`)

- `ipAddress` `string` _(required)_
- `description` `string | null`

### Responses

#### `201`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `ipAddress` `string` _(required)_
- `description` `string | null` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `isOverbroad` `boolean` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications/string/ip-whitelist \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "ipAddress": "string",
  "description": "string"
}'
```

```ts
fetch('/api/organizations/string/m2m-applications/string/ip-whitelist', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    ipAddress: 'string',
    description: 'string'
  })
})
```

## DELETE /organizations/{id}/m2m-applications/{appId}/ip-whitelist/{entryId}

`DELETE /organizations/{id}/m2m-applications/{appId}/ip-whitelist/{entryId}`

Remove an IP address from an org-owned M2M credential's whitelist

### Path parameters

- `id` `string` _(required)_
- `appId` `string` _(required)_
- `entryId` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/m2m-applications/string/ip-whitelist/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/m2m-applications/string/ip-whitelist/string', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/contracts

`GET /organizations/{id}/contracts`

List the organization's contracts grouped by template. Returns template groups (with counts) followed by ungrouped contracts.

### Path parameters

- `id` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`
- `searchQuery` `string`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `integer` _(required)_
  - `totalPages` `integer` _(required)_
  - `totalItems` `integer` _(required)_
  - `limit` `integer` _(required)_
  - `offset` `integer` _(required)_
- `totalGroups` `integer` _(required)_
- `totalUngrouped` `integer` _(required)_
- `totalContracts` `integer` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/contracts?limit=10&offset=0&searchQuery=string'
```

```ts
fetch('/api/organizations/string/contracts?limit=10&offset=0&searchQuery=string')
```

## POST /organizations/{id}/contracts

`POST /organizations/{id}/contracts`

Register a contract owned by the organization

### Path parameters

- `id` `string` _(required)_

### Request body (required) (`application/json`)

- `contractAddress` `string` _(required)_
- `abi` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `templateId` `integer`
- `templateKey` `string | null`

### Responses

#### `201`: Default Response

Body (`application/json`):

- `contractAddress` `string` _(required)_
- `abi` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `discloseErc20TotalSupply` `boolean` _(required)_
- `discloseBytecode` `boolean` _(required)_
- `templateId` `integer` _(required)_
- `isSystemContract` `boolean` _(required)_
- `organizationId` `string | null` _(required)_
- `disclosedAddresses` `object[]` _(required)_
  - `address` `string` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `disclosureStartBlock` `string` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "contractAddress": "string",
  "abi": "string",
  "name": "string",
  "description": "string",
  "templateId": 0,
  "templateKey": "string"
}'
```

```ts
fetch('/api/organizations/string/contracts', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    contractAddress: 'string',
    abi: 'string',
    name: 'string',
    description: 'string',
    templateId: 0,
    templateKey: 'string'
  })
})
```

## GET /organizations/{id}/contracts/by-template/{templateId}

`GET /organizations/{id}/contracts/by-template/{templateId}`

List one of the organization's contracts for a specific template with pagination

### Path parameters

- `id` `string` _(required)_
- `templateId` `integer` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`
- `searchQuery` `string`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `contractAddress` `string` _(required)_
  - `abi` `string` _(required)_
  - `name` `string` _(required)_
  - `description` `string | null` _(required)_
  - `discloseErc20TotalSupply` `boolean` _(required)_
  - `discloseBytecode` `boolean` _(required)_
  - `templateId` `integer` _(required)_
  - `isSystemContract` `boolean` _(required)_
  - `organizationId` `string | null` _(required)_
  - `disclosedAddresses` `object[]` _(required)_
    - `address` `string` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `disclosureStartBlock` `string` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `integer` _(required)_
  - `totalPages` `integer` _(required)_
  - `totalItems` `integer` _(required)_
  - `limit` `integer` _(required)_
  - `offset` `integer` _(required)_
- `template` `object` _(required)_
  - `id` `integer` _(required)_
  - `templateKey` `string` _(required)_
  - `name` `string` _(required)_
  - `description` `string | null` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/contracts/by-template/0?limit=10&offset=0&searchQuery=string'
```

```ts
fetch('/api/organizations/string/contracts/by-template/0?limit=10&offset=0&searchQuery=string')
```

## GET /organizations/{id}/contracts/{contractAddress}

`GET /organizations/{id}/contracts/{contractAddress}`

Get one of the organization's contracts by address

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `contractAddress` `string` _(required)_
- `abi` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `discloseErc20TotalSupply` `boolean` _(required)_
- `discloseBytecode` `boolean` _(required)_
- `templateId` `integer` _(required)_
- `isSystemContract` `boolean` _(required)_
- `organizationId` `string | null` _(required)_
- `disclosedAddresses` `object[]` _(required)_
  - `address` `string` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `disclosureStartBlock` `string` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string
```

```ts
fetch('/api/organizations/string/contracts/string')
```

## PUT /organizations/{id}/contracts/{contractAddress}

`PUT /organizations/{id}/contracts/{contractAddress}`

Replace one of the organization's contracts (full update)

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_

### Request body (required) (`application/json`)

- `contractAddress` `string` _(required)_
- `abi` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `templateId` `integer`
- `templateKey` `string | null`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `contractAddress` `string` _(required)_
- `abi` `string` _(required)_
- `name` `string` _(required)_
- `description` `string | null` _(required)_
- `discloseErc20TotalSupply` `boolean` _(required)_
- `discloseBytecode` `boolean` _(required)_
- `templateId` `integer` _(required)_
- `isSystemContract` `boolean` _(required)_
- `organizationId` `string | null` _(required)_
- `disclosedAddresses` `object[]` _(required)_
  - `address` `string` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `disclosureStartBlock` `string` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `409`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `503`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "contractAddress": "string",
  "abi": "string",
  "name": "string",
  "description": "string",
  "templateId": 0,
  "templateKey": "string"
}'
```

```ts
fetch('/api/organizations/string/contracts/string', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    contractAddress: 'string',
    abi: 'string',
    name: 'string',
    description: 'string',
    templateId: 0,
    templateKey: 'string'
  })
})
```

## DELETE /organizations/{id}/contracts/{contractAddress}

`DELETE /organizations/{id}/contracts/{contractAddress}`

Delete one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/contracts/string', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/contracts/{contractAddress}/function-permissions

`GET /organizations/{id}/contracts/{contractAddress}/function-permissions`

List the function-level role permissions on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `integer` _(required)_
  - `contractAddress` `string` _(required)_
  - `methodSelector` `string` _(required)_
  - `accessType` `string` _(required)_
  - `functionSignature` `string` _(required)_
  - `ruleType` `string` _(required)_
  - `isUmbrella` `boolean` _(required)_
  - `organizationOnly` `boolean`
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `roles` `object[]`
    - `id` `string` _(required)_
    - `roleName` `string`
  - `argumentRestrictions` `object[]`
    - `argumentIndex` `integer` _(required)_
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/contracts/string/function-permissions?limit=10&offset=0'
```

```ts
fetch('/api/organizations/string/contracts/string/function-permissions?limit=10&offset=0')
```

## POST /organizations/{id}/contracts/{contractAddress}/function-permissions

`POST /organizations/{id}/contracts/{contractAddress}/function-permissions`

Create a function-level role permission on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_

### Request body (required) (`application/json`)

- `methodSelector` `string`
- `accessType` `string` _(required)_
- `functionSignature` `string` _(required)_
- `ruleType` `string` _(required)_
- `roles` `object[]`
  - `id` `string` _(required)_
  - `roleName` `string`
- `argumentRestrictions` `object[]`
  - `argumentIndex` `integer` _(required)_

### Responses

#### `201`: Default Response

Body (`application/json`):

- `id` `integer` _(required)_
- `contractAddress` `string` _(required)_
- `methodSelector` `string` _(required)_
- `accessType` `string` _(required)_
- `functionSignature` `string` _(required)_
- `ruleType` `string` _(required)_
- `isUmbrella` `boolean` _(required)_
- `organizationOnly` `boolean`
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `roles` `object[]`
  - `id` `string` _(required)_
  - `roleName` `string`
- `argumentRestrictions` `object[]`
  - `argumentIndex` `integer` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string/function-permissions \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "methodSelector": "string",
  "accessType": "read",
  "functionSignature": "string",
  "ruleType": "public",
  "roles": [
    {
      "id": "string",
      "roleName": "string"
    }
  ],
  "argumentRestrictions": [
    {
      "argumentIndex": 0
    }
  ]
}'
```

```ts
fetch('/api/organizations/string/contracts/string/function-permissions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    methodSelector: 'string',
    accessType: 'read',
    functionSignature: 'string',
    ruleType: 'public',
    roles: [
      {
        id: 'string',
        roleName: 'string'
      }
    ],
    argumentRestrictions: [
      {
        argumentIndex: 0
      }
    ]
  })
})
```

## PUT /organizations/{id}/contracts/{contractAddress}/function-permissions/{permissionId}

`PUT /organizations/{id}/contracts/{contractAddress}/function-permissions/{permissionId}`

Replace a function-level role permission on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_
- `permissionId` `integer` _(required)_

### Request body (required) (`application/json`)

- `methodSelector` `string` _(required)_
- `accessType` `string` _(required)_
- `functionSignature` `string` _(required)_
- `ruleType` `string` _(required)_
- `roles` `object[]`
  - `id` `string` _(required)_
  - `roleName` `string`
- `argumentRestrictions` `object[]`
  - `argumentIndex` `integer` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `integer` _(required)_
- `contractAddress` `string` _(required)_
- `methodSelector` `string` _(required)_
- `accessType` `string` _(required)_
- `functionSignature` `string` _(required)_
- `ruleType` `string` _(required)_
- `isUmbrella` `boolean` _(required)_
- `organizationOnly` `boolean`
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `roles` `object[]`
  - `id` `string` _(required)_
  - `roleName` `string`
- `argumentRestrictions` `object[]`
  - `argumentIndex` `integer` _(required)_

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string/function-permissions/0 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "methodSelector": "string",
  "accessType": "read",
  "functionSignature": "string",
  "ruleType": "public",
  "roles": [
    {
      "id": "string",
      "roleName": "string"
    }
  ],
  "argumentRestrictions": [
    {
      "argumentIndex": 0
    }
  ]
}'
```

```ts
fetch('/api/organizations/string/contracts/string/function-permissions/0', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    methodSelector: 'string',
    accessType: 'read',
    functionSignature: 'string',
    ruleType: 'public',
    roles: [
      {
        id: 'string',
        roleName: 'string'
      }
    ],
    argumentRestrictions: [
      {
        argumentIndex: 0
      }
    ]
  })
})
```

## DELETE /organizations/{id}/contracts/{contractAddress}/function-permissions/{permissionId}

`DELETE /organizations/{id}/contracts/{contractAddress}/function-permissions/{permissionId}`

Delete a function-level role permission on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_
- `permissionId` `integer` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string/function-permissions/0 \
  --request DELETE
```

```ts
fetch('/api/organizations/string/contracts/string/function-permissions/0', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/contracts/{contractAddress}/event-permissions

`GET /organizations/{id}/contracts/{contractAddress}/event-permissions`

List the event-level role permissions on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_

### Query parameters

- `limit` `integer`
- `offset` `integer`

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `id` `string` _(required)_
  - `contractAddress` `string` _(required)_
  - `topic0Constant` `string` _(required)_
  - `topic1Constant` `string` _(required)_
  - `topic2Constant` `string` _(required)_
  - `topic3Constant` `string` _(required)_
  - `topic1ConditionType` `string` _(required)_
  - `topic2ConditionType` `string` _(required)_
  - `topic3ConditionType` `string` _(required)_
  - `organizationOnly` `boolean` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_
  - `roles` `object[]` _(required)_
    - `id` `string` _(required)_
    - `roleName` `string` _(required)_
    - `systemPermissions` `string[]`
    - `isSystemRole` `boolean`
    - `organizationId` `string | null`
    - `createdAt` `string <date-time>`
    - `updatedAt` `string <date-time>`
- `pagination` `object` _(required)_
  - `currentPage` `number` _(required)_
  - `totalPages` `number` _(required)_
  - `totalItems` `number` _(required)_
  - `limit` `number` _(required)_
  - `offset` `number` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl '/api/organizations/string/contracts/string/event-permissions?limit=10&offset=0'
```

```ts
fetch('/api/organizations/string/contracts/string/event-permissions?limit=10&offset=0')
```

## POST /organizations/{id}/contracts/{contractAddress}/event-permissions

`POST /organizations/{id}/contracts/{contractAddress}/event-permissions`

Create an event-level role permission on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_

### Request body (required) (`application/json`)

- `topic0Constant` `string`
- `topic1Constant` `string`
- `topic2Constant` `string`
- `topic3Constant` `string`
- `topic1ConditionType` `string`
- `topic2ConditionType` `string`
- `topic3ConditionType` `string`
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_

### Responses

#### `201`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_
- `topic0Constant` `string` _(required)_
- `topic1Constant` `string` _(required)_
- `topic2Constant` `string` _(required)_
- `topic3Constant` `string` _(required)_
- `topic1ConditionType` `string` _(required)_
- `topic2ConditionType` `string` _(required)_
- `topic3ConditionType` `string` _(required)_
- `organizationOnly` `boolean` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string/event-permissions \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "topic0Constant": "string",
  "topic1Constant": "string",
  "topic2Constant": "string",
  "topic3Constant": "string",
  "topic1ConditionType": "equalTo",
  "topic2ConditionType": "equalTo",
  "topic3ConditionType": "equalTo",
  "roles": [
    {
      "id": "string"
    }
  ]
}'
```

```ts
fetch('/api/organizations/string/contracts/string/event-permissions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    topic0Constant: 'string',
    topic1Constant: 'string',
    topic2Constant: 'string',
    topic3Constant: 'string',
    topic1ConditionType: 'equalTo',
    topic2ConditionType: 'equalTo',
    topic3ConditionType: 'equalTo',
    roles: [
      {
        id: 'string'
      }
    ]
  })
})
```

## PUT /organizations/{id}/contracts/{contractAddress}/event-permissions/{eventPermissionId}

`PUT /organizations/{id}/contracts/{contractAddress}/event-permissions/{eventPermissionId}`

Replace an event-level role permission on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_
- `eventPermissionId` `string` _(required)_

### Request body (required) (`application/json`)

- `topic0Constant` `string` _(required)_
- `topic1Constant` `string` _(required)_
- `topic2Constant` `string` _(required)_
- `topic3Constant` `string` _(required)_
- `topic1ConditionType` `string` _(required)_
- `topic2ConditionType` `string` _(required)_
- `topic3ConditionType` `string` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_
- `topic0Constant` `string` _(required)_
- `topic1Constant` `string` _(required)_
- `topic2Constant` `string` _(required)_
- `topic3Constant` `string` _(required)_
- `topic1ConditionType` `string` _(required)_
- `topic2ConditionType` `string` _(required)_
- `topic3ConditionType` `string` _(required)_
- `organizationOnly` `boolean` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_
- `roles` `object[]` _(required)_
  - `id` `string` _(required)_
  - `roleName` `string` _(required)_
  - `systemPermissions` `string[]`
  - `isSystemRole` `boolean`
  - `organizationId` `string | null`
  - `createdAt` `string <date-time>`
  - `updatedAt` `string <date-time>`

#### `400`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string/event-permissions/string \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "topic0Constant": "string",
  "topic1Constant": "string",
  "topic2Constant": "string",
  "topic3Constant": "string",
  "topic1ConditionType": "equalTo",
  "topic2ConditionType": "equalTo",
  "topic3ConditionType": "equalTo",
  "roles": [
    {
      "id": "string"
    }
  ]
}'
```

```ts
fetch('/api/organizations/string/contracts/string/event-permissions/string', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    topic0Constant: 'string',
    topic1Constant: 'string',
    topic2Constant: 'string',
    topic3Constant: 'string',
    topic1ConditionType: 'equalTo',
    topic2ConditionType: 'equalTo',
    topic3ConditionType: 'equalTo',
    roles: [
      {
        id: 'string'
      }
    ]
  })
})
```

## DELETE /organizations/{id}/contracts/{contractAddress}/event-permissions/{eventPermissionId}

`DELETE /organizations/{id}/contracts/{contractAddress}/event-permissions/{eventPermissionId}`

Delete an event-level role permission on one of the organization's contracts

### Path parameters

- `id` `string` _(required)_
- `contractAddress` `string` _(required)_
- `eventPermissionId` `string` _(required)_

### Responses

#### `204`: Default Response

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/contracts/string/event-permissions/string \
  --request DELETE
```

```ts
fetch('/api/organizations/string/contracts/string/event-permissions/string', {
  method: 'DELETE'
})
```

## GET /organizations/{id}/feature-permissions

`GET /organizations/{id}/feature-permissions`

List the feature permissions an organization admin may grant on its roles

### Path parameters

- `id` `string` _(required)_

### Responses

#### `200`: Default Response

Body (`application/json`):

- `items` `object[]` _(required)_
  - `name` `string` _(required)_
  - `feature` `string` _(required)_
  - `orgGrantable` `boolean` _(required)_
  - `enabled` `boolean` _(required)_

#### `401`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `403`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

#### `404`: Default Response

Body (`application/json`):

- `error` `object` _(required)_
  - `code` `string` _(required)_
  - `message` `string` _(required)_
  - `issues` `unknown[]`

### Example request

```bash
curl /api/organizations/string/feature-permissions
```

```ts
fetch('/api/organizations/string/feature-permissions')
```
