> For the complete documentation index, see [llms.txt](https://docs.powens.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powens.com/api-reference/api-setup/client-applications.md).

# Client applications

## Create a client application

<mark style="color:green;">`POST`</mark> `https://{domain}.biapi.pro/2.0/clients`

Request body: [#clientapprequest-object](#clientapprequest-object "mention")

{% tabs %}
{% tab title="201: Created Client application created" %}
Response body: [#clientapp-object](#clientapp-object "mention")
{% endtab %}
{% endtabs %}

## List client applications

<mark style="color:blue;">`GET`</mark> `https://{domain}.biapi.pro/2.0/clients`

{% tabs %}
{% tab title="200: OK List of client applications" %}
Response body: [#clientappslist-object](#clientappslist-object "mention")
{% endtab %}
{% endtabs %}

## Get a client application

<mark style="color:blue;">`GET`</mark> `https://{domain}.biapi.pro/2.0/clients/{clientAppId}`

Get a single client application by ID.

#### Path Parameters

| Name                                          | Type    | Description                   |
| --------------------------------------------- | ------- | ----------------------------- |
| clientAppId<mark style="color:red;">\*</mark> | Integer | ID of the client application. |

{% tabs %}
{% tab title="200: OK Client application" %}
Response body: [#clientapp-object](#clientapp-object "mention")
{% endtab %}
{% endtabs %}

## Update a client application

<mark style="color:orange;">`PUT`</mark> `https://{domain}.biapi.pro/2.0/clients/{clientAppId}`

Update a single client application by ID.

Request body: [#update-a-client-application-1](#update-a-client-application-1 "mention")

#### Path Parameters

| Name                                          | Type    | Description                   |
| --------------------------------------------- | ------- | ----------------------------- |
| clientAppId<mark style="color:red;">\*</mark> | Integer | ID of the client application. |

{% tabs %}
{% tab title="200: OK Client application updated" %}
Response body: [#clientapp-object](#clientapp-object "mention")
{% endtab %}
{% endtabs %}

## Delete a client application

<mark style="color:red;">`DELETE`</mark> `https://{domain}.biapi.pro/2.0/clients/{clientAppId}`

Delete a client application by ID.

#### Path Parameters

| Name                                          | Type    | Description                   |
| --------------------------------------------- | ------- | ----------------------------- |
| clientAppId<mark style="color:red;">\*</mark> | Integer | ID of the client application. |

{% tabs %}
{% tab title="204: No Content Client application deleted" %}

{% endtab %}
{% endtabs %}

## Update the logo of a client application

<mark style="color:green;">`POST`</mark> `https://{domain}.biapi.pro/2.0/clients/{clientAppId}/logo`

#### Path Parameters

| Name                                          | Type    | Description                   |
| --------------------------------------------- | ------- | ----------------------------- |
| clientAppId<mark style="color:red;">\*</mark> | Integer | ID of the client application. |

## Data model <a href="#create-a-client-application" id="create-a-client-application"></a>

### ***ClientAppRequest*****&#x20;object**

<table><thead><tr><th width="182">Property</th><th width="110">Type</th><th width="107">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>generate_keys</code></td><td>Boolean</td><td>No</td><td>If true, generate a RSA pair of keys so the client can be used to generate JWT user tokens. The default is false.</td></tr><tr><td><code>name</code></td><td>String</td><td>No</td><td>Name of the client app.</td></tr><tr><td><code>redirect_uris</code></td><td>String</td><td>No</td><td>List of allowed redirect URIs.</td></tr><tr><td><code>config</code></td><td>String</td><td>No</td><td>Custom config about the client.</td></tr></tbody></table>

### ***ClientAppsList*****&#x20;object**

<table><thead><tr><th width="202.33333333333331">Property</th><th width="233">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>clients</code></td><td>Array of <a href="#clientapp-object"><em>ClientApp</em></a> objects</td><td>The client applications.</td></tr></tbody></table>

### ***ClientApp*****&#x20;object**

<table><thead><tr><th width="185.33333333333331">Property</th><th width="162">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>Integer</td><td>ID of the client.</td></tr><tr><td><code>name</code></td><td>String</td><td>Name of the client application.</td></tr><tr><td><code>secret</code></td><td>String or null</td><td>The client secret is only exposed if you use a manage or configuration token.</td></tr><tr><td><code>public_key</code></td><td>String or null</td><td></td></tr><tr><td><code>private_key</code></td><td>String or null</td><td></td></tr><tr><td><code>redirect_uris</code></td><td>String</td><td></td></tr><tr><td><code>id_logo</code></td><td>Integer or null</td><td></td></tr><tr><td><code>config</code></td><td>String</td><td>Customizable config.</td></tr></tbody></table>

### ***ClientAppUpdateRequest*****&#x20;object** <a href="#update-a-client-application" id="update-a-client-application"></a>

<table><thead><tr><th width="185">Property</th><th width="101">Type</th><th width="102">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>generate_keys</code></td><td>Boolean</td><td>No</td><td>If true, generate a RSA pair of keys so the client can be used to generate JWT user tokens. The key has no effect if the client already has a set of keys. The default is false.</td></tr><tr><td><code>name</code></td><td>String</td><td>No</td><td>New name of the client app.</td></tr><tr><td><code>secret</code></td><td>String</td><td>No</td><td>Reset the secret of the client.</td></tr><tr><td><code>redirect_uris</code></td><td>String</td><td>No</td><td>New list of allowed redirect URIs.</td></tr><tr><td><code>primary_color</code></td><td>String</td><td>No</td><td>Hexadecimal code of the client primary color</td></tr><tr><td><code>config</code></td><td></td><td>No</td><td>Custom config about the client</td></tr><tr><td><code>update_config</code></td><td>Boolean</td><td>No</td><td>Merge the provided <code>config</code> with the existing one instead of replacing. The default is true.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.powens.com/api-reference/api-setup/client-applications.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
