# Organization API: Customers: Oauth clients

> The 2 Organization API operations for oauth clients.

Source: https://docs.coritan.com/api/reference/organizations/customers/oauth-clients/

Part of [Customers](/api/reference/organizations/customers/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/oauth-clients`](#op-get-api-v1-orgs-org-slug-oauth-clients) | List OAuth clients |
| POST | [`/api/v1/orgs/{org_slug}/oauth-clients`](#op-post-api-v1-orgs-org-slug-oauth-clients) | Create OAuth client |

### List OAuth clients {#op-get-api-v1-orgs-org-slug-oauth-clients}

`GET /api/v1/orgs/{org_slug}/oauth-clients`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

A `200` response is a list; each item has these fields:

| Field | Type |
| --- | --- |
| `[].id` | integer |
| `[].org_id` | integer |
| `[].client_id` | string |
| `[].name` | string |
| `[].redirect_uris` | array of any |
| `[].allowed_scopes` | array of any or null |
| `[].grant_types` | array of any or null |
| `[].is_active` | boolean |
| `[].created_at` | string (date-time) or null |

### Create OAuth client {#op-post-api-v1-orgs-org-slug-oauth-clients}

`POST /api/v1/orgs/{org_slug}/oauth-clients`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `name` | string | yes |
| `redirect_uris` | array of string | yes |
| `allowed_scopes` | array of string or null | no |
| `grant_types` | array of string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `201` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

Fields of a `201` response:

| Field | Type |
| --- | --- |
| `id` | integer |
| `org_id` | integer |
| `client_id` | string |
| `name` | string |
| `redirect_uris` | array of any |
| `allowed_scopes` | array of any or null |
| `grant_types` | array of any or null |
| `is_active` | boolean |
| `created_at` | string (date-time) or null |
| `client_secret` | string |
