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

# API clients

{% hint style="info" %}
New API available on <https://alphauslabs.github.io/blueapidocs/#/Iam>.
{% endhint %}

The following endpoint is the base url for the APIs below.

```
https://service.alphaus.cloud/m/u/users/
```

## Create API client

Create a new API client under a specific user.

**Request**

```http
POST /client/:user HTTP1.1
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "test-apiclient-name",
}
```

`:user` is either root user or subuser.

Details for the POST `{body}`.

| Key    | Value                                 |
| ------ | ------------------------------------- |
| `name` | Required. The name of the API client. |

**Response**

```ruby
HTTP/1.1 200 OK

{
  "client_id": "ripple-abcdef123456",
  "client_secret": "critical",
  "grant_type": "client_credentials",
  "create_time": "2020-06-27T11:26:46.257375295Z",
  "user_id": "id0001",
  "username": "someusername",
  "name": "test-apiclient-name"
}
```

## List API clients

List all API clients under a specific user.

**Request**

```http
GET /clients/:user HTTP1.1
Authorization: Bearer {token}
```

`:user` is either root user or subuser.

**Response**

```ruby
HTTP/1.1 200 OK

[
  {
    "client_id": "ripple-abcdef123456",
    "client_secret": "",
    "grant_type": "client_credentials",
    "create_time": "2020-06-15T05:07:50.258779172Z",
    "user_id": "id001",
    "name": "test-apiclient-name"
  },
  ...
]
```

## Delete API client

Delete an existing API client under a specific user.

**Request**

```http
DELETE /client/:user/:clientid HTTP1.1
Authorization: Bearer {token}
```

`:user` is either root user or subuser. `:clientid` is the client id to delete.

**Response**

```ruby
HTTP/1.1 200 OK

{
  "status": "success"
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.alphaus.cloud/api-reference/api-clients.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
