> ## Documentation Index
> Fetch the complete documentation index at: https://widgetic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# widgetic api users

> 13 commands for the Users operations of the REST API, generated from its OpenAPI description.

`widgetic api users <command>` runs the Users operations of the REST API. It has 13 commands. Every command also takes [the flags every command takes](https://widgetic.com/docs/cli/commands/index.md).

## `widgetic api users add-personal-workspace-domain`

Allow a website to show your widgets

* Request: `POST /users/{id}/workspace/domains`
* Operation: `addPersonalWorkspaceDomain` (`widgetic api call addPersonalWorkspaceDomain` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the list belongs to. For your own, your own user id |
| `--domain <text>` | text | | Domain pattern to allow (supports wildcards like \*.example.com) |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api users add-personal-workspace-domain`.

## `widgetic api users confirm-user-adapter-connection`

Confirm an adapter address with the code that was emailed to it

* Request: `POST /users/{userId}/adapter-connections/{adapterId}/{credentialKey}/confirm`
* Operation: `confirmUserAdapterConnection` (`widgetic api call confirmUserAdapterConnection` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--user-id <uuid>` | uuid | yes | The account that keeps the address. For your own, your own user id |
| `--adapter-id <text>` | text | yes | The adapter the address is for |
| `--credential-key <text>` | text | yes | The credential's name within the adapter |
| `--code <text>` | text | | The digits of the code Widgetic emailed to the address, with nothing else. It works for 30 minutes and for five wrong tries; after that, save the address again and a new code is emailed |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api users confirm-user-adapter-connection`.

## `widgetic api users create-user-api-key`

Create an API key

* Request: `POST /users/{id}/keys`
* Operation: `createUserApiKey` (`widgetic api call createUserApiKey` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the key is for. For your own, your own user id |
| `--idempotency-key <text>` | text | | Names this one request, so a repeat of it is carried out once. The CLI makes a key when this is left out and sends the same one on every try; give your own (a UUID is ideal) to repeat the call by hand later. |
| `--name <text>` | text | | A name for the key, to tell it from the account's other keys |
| `--expires-at <date-time>` | date-time | | When the key stops working, as a date and time in the future with a zone. Omit it for a key that does not expire |
| `--preset <text>` | one of `read_only`, `content`, `full_access` | | A ready-made list of scopes. `read_only` looks at everything the account holds and changes nothing. `content` builds and manages widgets and compositions and runs the AI, and touches no billing, no people and no partners… |
| `--scopes <values...>` | one of `content:read`, `content:write`, `generate`, `partner:read`, `partner:write`, `billing:read`, `billing:write`, `account:read`, `account:write` | | What the key may do, when a preset is not enough. Naming a write scope includes its read scope, and a list that holds every scope is a key with full access. Send either `scopes` or `preset`, not both |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api users create-user-api-key`.

## `widgetic api users delete-personal-workspace-domain`

Stop allowing a website to show your widgets

* Request: `DELETE /users/{id}/workspace/domains/{domainId}`
* Operation: `deletePersonalWorkspaceDomain` (`widgetic api call deletePersonalWorkspaceDomain` runs it by that name)
* Works with any API key.
* It deletes something, so it asks first; without a terminal it needs `--yes`.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the list belongs to. For your own, your own user id |
| `--domain-id <uuid>` | uuid | yes | The `id` of the entry, as the list shows it |

The whole description and the schemas: `widgetic schema api users delete-personal-workspace-domain`.

## `widgetic api users delete-user-api-key`

Delete an API key

* Request: `DELETE /users/{id}/keys/{keyId}`
* Operation: `deleteUserApiKey` (`widgetic api call deleteUserApiKey` runs it by that name)
* Works with any API key.
* It deletes something, so it asks first; without a terminal it needs `--yes`.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the key belongs to |
| `--key-id <text>` | text | yes | The `keyId` of the key, as the list shows it |

The whole description and the schemas: `widgetic schema api users delete-user-api-key`.

## `widgetic api users get-personal-workspace-domains`

List the websites allowed to show your widgets

* Request: `GET /users/{id}/workspace/domains`
* Operation: `getPersonalWorkspaceDomains` (`widgetic api call getPersonalWorkspaceDomains` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the list belongs to. For your own, your own user id |

The whole description and the schemas: `widgetic schema api users get-personal-workspace-domains`.

## `widgetic api users get-user-adapter-connections`

See which adapter keys an account has connected

* Request: `GET /users/{userId}/adapter-connections`
* Operation: `getUserAdapterConnections` (`widgetic api call getUserAdapterConnections` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--user-id <uuid>` | uuid | yes | The account whose adapter keys to list. For your own, your own user id |

The whole description and the schemas: `widgetic schema api users get-user-adapter-connections`.

## `widgetic api users get-user-api-key-usage-logs`

Read what an API key was used for

* Request: `GET /users/{id}/api-keys/{keyId}/logs`
* Operation: `getUserApiKeyUsageLogs` (`widgetic api call getUserApiKeyUsageLogs` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the key belongs to |
| `--key-id <text>` | text | yes | The `keyId` of the key, as the list shows it |
| `--limit <int>` | integer | | How many calls to return, newest first (default: 500) |

The whole description and the schemas: `widgetic schema api users get-user-api-key-usage-logs`.

## `widgetic api users get-user-api-keys`

List the API keys of an account

* Request: `GET /users/{id}/keys`
* Operation: `getUserApiKeys` (`widgetic api call getUserApiKeys` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the keys belong to. For your own keys, your own user id |

The whole description and the schemas: `widgetic schema api users get-user-api-keys`.

## `widgetic api users remove-user-adapter-connection`

Remove an adapter key from an account

* Request: `DELETE /users/{userId}/adapter-connections/{adapterId}/{credentialKey}`
* Operation: `removeUserAdapterConnection` (`widgetic api call removeUserAdapterConnection` runs it by that name)
* Works with any API key.
* It deletes something, so it asks first; without a terminal it needs `--yes`.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--user-id <uuid>` | uuid | yes | The account that keeps the key. For your own, your own user id |
| `--adapter-id <text>` | text | yes | The adapter the key is for |
| `--credential-key <text>` | text | yes | The key's name within the adapter |

The whole description and the schemas: `widgetic schema api users remove-user-adapter-connection`.

## `widgetic api users set-user-adapter-connection`

Connect an adapter key to an account

* Request: `PUT /users/{userId}/adapter-connections/{adapterId}/{credentialKey}`
* Operation: `setUserAdapterConnection` (`widgetic api call setUserAdapterConnection` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--user-id <uuid>` | uuid | yes | The account that keeps the key. For your own, your own user id |
| `--adapter-id <text>` | text | yes | The adapter the key is for |
| `--credential-key <text>` | text | yes | The key's name within the adapter |
| `--credential <@file\|->` | a secret: `@path` or `-`, never the text itself | | The key exactly as its provider gave it: one line of text, at most 2048 characters. It is stored encrypted and is never returned or logged. A secret: give @path to read it from a file, or - to type it where it is not shown (or to read it from standard input). It is never typed as text, and --dry-run leaves it out. |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api users set-user-adapter-connection`.

## `widgetic api users update-personal-workspace-domain`

Change a website on your list

* Request: `PUT /users/{id}/workspace/domains/{domainId}`
* Operation: `updatePersonalWorkspaceDomain` (`widgetic api call updatePersonalWorkspaceDomain` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the list belongs to. For your own, your own user id |
| `--domain-id <uuid>` | uuid | yes | The `id` of the entry, as the list shows it |
| `--domain <text>` | text | | The website name to keep instead, such as `example.com`, or `*.example.com` for a website and all of its subdomains |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api users update-personal-workspace-domain`.

## `widgetic api users update-user-api-key`

Rename an API key, or switch it off or on

* Request: `PUT /users/{id}/keys/{keyId}`
* Operation: `updateUserApiKey` (`widgetic api call updateUserApiKey` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The account the key belongs to |
| `--key-id <text>` | text | yes | The `keyId` of the key, as the list shows it |
| `--name <text>` | text | | A new name. It cannot be one that another key of the account already has |
| `--is-active` | switch | | false switches the key off, true switches it on again. A key that is switched off stops working within a minute at the latest, and at once on the server that took the request |
| `--data <json\|@file\|->` | JSON, `@path` or `-` | | The whole request document as JSON, `@path` to a file that holds it, or `-` for standard input. The flags above override its keys. |

The whole description and the schemas: `widgetic schema api users update-user-api-key`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.