# Clients

## API Authorization <a href="#api-authorization" id="api-authorization"></a>

Before you can make requests to this resource, you must have a valid bearer token. Review our API [authorization guide](https://docs.korewireless.com/en-us/developers/api-management/auth) to learn how to generate a token. Here's a curl example of how to define your access token in a header:

{% code overflow="wrap" %}

```bash
curl -L "https://client.api.korewireless.com/v1/ping" -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" 
```

{% endcode %}

{% hint style="warning" %}
The examples below do not show the required `Authorization` header due to a bug. We're working on fixing that. In the meantime, be sure to include that in all of your requests.
{% endhint %}

## List Client

> List all active clients

```json
{"openapi":"3.0.1","info":{"title":"Client APIs","version":"1.0.0"},"tags":[{"name":"Clients","description":"These APIs enable users to perform various operations, including creating, retrieving, updating, and deleting client information. Through these APIs, users can interact with a wide range of client data, encompassing client IDs, secrets, account associations, ownership details, types, and lock status."}],"servers":[{"url":"https://client.api.korewireless.com","description":"PRODUCTION URL"}],"security":[{},{"Auth":[]}],"components":{"securitySchemes":{"Auth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"200GetClients":{"type":"object","properties":{"meta":{"type":"object","properties":{"count":{"type":"number","description":"Total number of clients returned in the response."},"page_number":{"type":"number","description":"Current page number of the returned client list."},"page_size":{"type":"number","description":"Number of clients per page in the returned client list."},"previous_page_url":{"type":"string","description":"Previous page url in client list."},"next_page_url":{"type":"string","description":"Next page url in client list."}}},"clients":{"type":"array","items":{"$ref":"#/components/schemas/Client"}}}},"Client":{"type":"object","properties":{"client_id":{"type":"string","description":"Unique identifier for the client."},"account_id":{"type":"string","description":"Identifier of the account to which the client belongs."},"name":{"type":"string","description":"Name of the client."},"client_owner":{"type":"string","description":"Email address of the client owner. If not specified, defaults to the account owner's email."},"client_type":{"type":"string","enum":["admin","standard"],"description":"Type of the client, either 'admin' or 'standard'."},"locked":{"type":"boolean","description":"Indicates whether the client is locked. If true, the client is locked; if false, it is unlocked; if null, it has not been locked."},"date_created":{"type":"string","description":"Date and time when the client was created."}}},"Error":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"code":{"type":"integer","format":"int32"},"info":{"type":"string"}}}}},"paths":{"/v1/clients":{"get":{"tags":["Clients"],"summary":"List Client","description":"List all active clients","operationId":"listClient","parameters":[{"name":"page_size","in":"query","description":"Enter the number of items you want to view per page.","schema":{"type":"integer","format":"int32","minimum":1,"exclusiveMinimum":true},"required":true},{"name":"page_number","in":"query","description":"Input the page number you wish to navigate to.","schema":{"type":"integer","format":"int32","minimum":1,"exclusiveMinimum":true},"required":true},{"name":"client_type","in":"query","description":"Type of the client","schema":{"type":"string","enum":["admin","standard"]},"required":false},{"name":"Authorization","in":"header","description":"JWT token for authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/200GetClients"}}}},"400":{"description":"Bad Request","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorised User","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The specified resource was not found","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server Error","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Bad gateway","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Service Unavailable","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Gateway Timeout error","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create Client

> Create a new API client for the account for which the API credentials are for. Once created, the client ID and secret will be shown, the latter only shown once during the creation process.

```json
{"openapi":"3.0.1","info":{"title":"Client APIs","version":"1.0.0"},"tags":[{"name":"Clients","description":"These APIs enable users to perform various operations, including creating, retrieving, updating, and deleting client information. Through these APIs, users can interact with a wide range of client data, encompassing client IDs, secrets, account associations, ownership details, types, and lock status."}],"servers":[{"url":"https://client.api.korewireless.com","description":"PRODUCTION URL"}],"security":[{},{"Auth":[]}],"components":{"securitySchemes":{"Auth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"CreateClient":{"type":"object","properties":{"account_id":{"type":"string","description":"ID of the account the client belongs to. Defaults to the clientCred's account scope if not specified."},"name":{"type":"string","description":"Name of the client."},"locked":{"type":"boolean","description":"Specifies whether the client is locked or not. Can be true, false, or null."},"scopes":{"type":"object","properties":{"products":{"type":"array","items":{"type":"string","enum":["SuperSIM","ProgrammableWireless"],"description":"Name of the product resource."}}}}},"required":["name","locked","scopes"],"additionalProperties":false},"201CreateClient":{"type":"object","properties":{"message":{"type":"string","description":"A message indicating the status of the client creation process."},"client_id":{"type":"string","description":"The unique identifier assigned to the newly created client."},"client_secret":{"type":"string","description":"The unique identifier secret assigned to the newly created client."},"client_type":{"type":"string","enum":["standard"],"description":"Type of the client. This will always be 'standard'."},"account_id":{"type":"string","description":"ID of the account the client is for."},"name":{"type":"string","description":"Name of the client."},"date_created":{"type":"string","format":"date-time","description":"Date and time when the client was created."},"client_owner":{"type":"string","description":"Email of the user who is the client owner."},"locked":{"type":"boolean","description":"Specifies whether the client is locked or not."}}},"Error":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"code":{"type":"integer","format":"int32"},"info":{"type":"string"}}}}},"paths":{"/v1/clients":{"post":{"tags":["Clients"],"summary":"Create Client","description":"Create a new API client for the account for which the API credentials are for. Once created, the client ID and secret will be shown, the latter only shown once during the creation process.","operationId":"createClient","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClient"}}}},"responses":{"201":{"description":"201 response","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/201CreateClient"}}}},"400":{"description":"Bad Request","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized User","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The specified resource was not found","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server Error","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Bad gateway","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Service Unavailable","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Gateway Timeout error","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get Client

> Get Specific Client Details

```json
{"openapi":"3.0.1","info":{"title":"Client APIs","version":"1.0.0"},"tags":[{"name":"Clients","description":"These APIs enable users to perform various operations, including creating, retrieving, updating, and deleting client information. Through these APIs, users can interact with a wide range of client data, encompassing client IDs, secrets, account associations, ownership details, types, and lock status."}],"servers":[{"url":"https://client.api.korewireless.com","description":"PRODUCTION URL"}],"security":[{},{"Auth":[]}],"components":{"securitySchemes":{"Auth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"200GetClient":{"type":"object","properties":{"client":{"$ref":"#/components/schemas/Client"}}},"Client":{"type":"object","properties":{"client_id":{"type":"string","description":"Unique identifier for the client."},"account_id":{"type":"string","description":"Identifier of the account to which the client belongs."},"name":{"type":"string","description":"Name of the client."},"client_owner":{"type":"string","description":"Email address of the client owner. If not specified, defaults to the account owner's email."},"client_type":{"type":"string","enum":["admin","standard"],"description":"Type of the client, either 'admin' or 'standard'."},"locked":{"type":"boolean","description":"Indicates whether the client is locked. If true, the client is locked; if false, it is unlocked; if null, it has not been locked."},"date_created":{"type":"string","description":"Date and time when the client was created."}}},"Error":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"message":{"type":"string"},"code":{"type":"integer","format":"int32"},"info":{"type":"string"}}}}},"paths":{"/v1/clients/{client_id}":{"get":{"tags":["Clients"],"summary":"Get Client","description":"Get Specific Client Details","operationId":"getClient","parameters":[{"name":"client_id","in":"path","required":true,"description":"Client Identifier to obtain the details","schema":{"type":"string"}},{"name":"Authorization","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/200GetClient"}}}},"400":{"description":"Bad Request","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorised User","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The specified resource was not found","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server Error","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Bad gateway","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Service Unavailable","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Gateway Timeout error","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}},"Access-Control-Allow-Methods":{"schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"schema":{"type":"string"}},"Access-Control-Allow-Headers":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
