> ## 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 compositions

> 39 commands for the Compositions operations of the REST API, generated from its OpenAPI description.

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

## `widgetic api compositions add-ai-answers-knowledge-document`

Add a document for a widget's AI to answer from

* Request: `POST /compositions/{id}/adapters/ai-answers/knowledge/documents`
* Operation: `addAiAnswersKnowledgeDocument` (`widgetic api call addAiAnswersKnowledgeDocument` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The widget (composition) to add the document to |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--title <text>` | text | | What the document is called, on one line. Visitors see it as the source of an answer. Line breaks and invisible characters are removed |
| `--text <text>` | text | | The text of the document, as plain text. It is cleaned (line endings are made the same, invisible characters and surplus blank lines are removed) and then counted: up to 100000 characters. |
| `--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 compositions add-ai-answers-knowledge-document`.

## `widgetic api compositions add-ai-answers-knowledge-file`

Add a text file or a picture of a document (a PDF once PDFs are read) for a widget's AI to answer from

* Request: `POST /compositions/{id}/adapters/ai-answers/knowledge/documents/file`
* Operation: `addAiAnswersKnowledgeFile` (`widgetic api call addAiAnswersKnowledgeFile` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The widget (composition) to add the document to |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--file <path>` | path of a file | yes | The file, which is a text file or a picture of a document (a PDF is not read yet). One file only |
| `--title <text>` | text | | What the document is called, on one line. Visitors see it as the source of an answer. Left out, the name of the file stands in for it |

The whole description and the schemas: `widgetic schema api compositions add-ai-answers-knowledge-file`.

## `widgetic api compositions check-composition-access`

Check Composition Access

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | Composition ID |

The whole description and the schemas: `widgetic schema api compositions check-composition-access`.

## `widgetic api compositions create-composition`

Create Composition

* Request: `POST /compositions`
* Operation: `createComposition` (`widgetic api call createComposition` runs it by that name)
* Also written: `widgetic api compositions create`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--name <text>` | text | | Name of the composition |
| `--widget-id <uuid>` | uuid | | ID of the widget this composition is based on |
| `--creator-id <uuid>` | uuid | | ID of the user creating the composition |
| `--status <text>` | text | | Initial status of the composition (default: draft) |
| `--project-id <uuid>` | uuid | | ID of the project this composition belongs to |
| `--body-managed-user-id <uuid>` | uuid | | Make the composition for one of your managed users, by Widgetic's id for the user. Send this or `managedUserExternalId`, not both. The managed user must be yours and active. |
| `--body-managed-user-external-id <text>` | text | | The same, by your own identifier for the user, the `externalId` you gave when you created the managed user (answers show it as `externalId`). Send this or `managedUserId`, 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 compositions create-composition`.

## `widgetic api compositions create-composition-content-item`

Add a content list item

* Request: `POST /compositions/{id}/content/{list}/items`
* Operation: `createCompositionContentItem` (`widgetic api call createCompositionContentItem` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | |
| `--list <text>` | text | yes | List name from the content schema (`contentItems`) or `items` |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--if-match <text>` | text | | Optional content version from ETag |
| `--position <int>` | integer | | |
| `--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 compositions create-composition-content-item`.

## `widgetic api compositions create-composition-database-record`

Create Record In Composition Database

* Request: `POST /compositions/{id}/database/{table}`
* Operation: `createCompositionDatabaseRecord` (`widgetic api call createCompositionDatabaseRecord` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--table <text>` | text | yes | Name of the database table |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--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 compositions create-composition-database-record`.

## `widgetic api compositions delete-composition`

Delete Composition

* Request: `DELETE /compositions/{id}`
* Operation: `deleteComposition` (`widgetic api call deleteComposition` runs it by that name)
* Also written: `widgetic api compositions delete`
* 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 ID of the composition to delete |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions delete-composition`.

## `widgetic api compositions delete-composition-content-item`

Delete a content list item

* Request: `DELETE /compositions/{id}/content/{list}/items/{itemId}`
* Operation: `deleteCompositionContentItem` (`widgetic api call deleteCompositionContentItem` 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 | |
| `--list <text>` | text | yes | |
| `--item-id <text>` | text | yes | |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--if-match <text>` | text | | |

The whole description and the schemas: `widgetic schema api compositions delete-composition-content-item`.

## `widgetic api compositions delete-composition-data-source`

Remove the composition data source binding

* Request: `DELETE /compositions/{id}/data-source`
* Operation: `deleteCompositionDataSource` (`widgetic api call deleteCompositionDataSource` 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 | |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions delete-composition-data-source`.

## `widgetic api compositions delete-composition-database-record`

Delete Record From Composition Database

* Request: `DELETE /compositions/{id}/database/{table}/{recordId}`
* Operation: `deleteCompositionDatabaseRecord` (`widgetic api call deleteCompositionDatabaseRecord` 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 | ID of the composition |
| `--table <text>` | text | yes | Name of the database table |
| `--record-id <text>` | text | yes | ID of the record to delete |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions delete-composition-database-record`.

## `widgetic api compositions delete-composition-entry-items`

Delete composition entry items by id or host context

* Request: `DELETE /compositions/{id}/entries/{table}/items`
* Operation: `deleteCompositionEntryItems` (`widgetic api call deleteCompositionEntryItems` 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 | |
| `--table <text>` | text | yes | |
| `--ids <text>` | text | | Comma-separated entry ids (1–100) |
| `--context <key=value>` | key=value (repeat the flag) | | Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters. Repeat it for more than one. |
| `--filter <key=value>` | key=value (repeat the flag) | | Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). Repeat it for more than one. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions delete-composition-entry-items`.

## `widgetic api compositions describe-composition-entries`

Describe What a Composition Keeps

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions describe-composition-entries`.

## `widgetic api compositions duplicate-composition`

Duplicate Composition

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition to duplicate |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--name <text>` | text | | Optional new name for the duplicate (defaults to "Copy of \[original name]") |
| `--include-database` | switch | | Whether the duplicate gets the tables the original declares (`databaseSchema`), empty and in a schema of their own (default false). (default: false) |
| `--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 compositions duplicate-composition`.

## `widgetic api compositions export-composition-entry-items`

Export composition entry items

* Request: `GET /compositions/{id}/entries/{table}/export`
* Operation: `exportCompositionEntryItems` (`widgetic api call exportCompositionEntryItems` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | |
| `--table <text>` | text | yes | |
| `--format <text>` | one of `csv`, `json` | | (default: csv) |
| `--order <text>` | one of `asc`, `desc` | | `desc` (the default) lists the newest entry first, `asc` the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same… (default: desc) |
| `--since <date-time>` | date-time | | Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. |
| `--until <date-time>` | date-time | | Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. |
| `--context <key=value>` | key=value (repeat the flag) | | Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters. Repeat it for more than one. |
| `--filter <key=value>` | key=value (repeat the flag) | | Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). Repeat it for more than one. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions export-composition-entry-items`.

## `widgetic api compositions get-ai-answers-knowledge`

See the documents a widget's AI answers from

* Request: `GET /compositions/{id}/adapters/ai-answers/knowledge`
* Operation: `getAiAnswersKnowledge` (`widgetic api call getAiAnswersKnowledge` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | The widget (composition) whose documents to list |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-ai-answers-knowledge`.

## `widgetic api compositions get-all-compositions`

Get All Compositions

* Request: `GET /compositions`
* Operation: `getAllCompositions` (`widgetic api call getAllCompositions` runs it by that name)
* Also written: `widgetic api compositions list`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--page <int>` | integer | | Page number for pagination (default: 1) |
| `--size <int>` | integer | | Number of items per page (default: 20) |
| `--sort <text>` | text | | The order of the list, as `<field>:<asc\|desc>`. The field is `createdAt`, `updatedAt`, `name` or `status` (the snake\_case spelling, such as `created_at`, is read too). `asc` or `desc` alone orders by `createdAt`. |
| `--widget-id <uuid>` | uuid | | Filter compositions by widget ID |
| `--workspace <text>` | one of `true`, `false` | | Filter by workspace |
| `--project-folder <uuid>` | uuid | | Only the compositions in this project (the project's id). |
| `--status <text>` | one of `draft`, `published`, `archived` | | Only the compositions in this status. Without it, every status is listed. |
| `--query-managed-user-id <uuid>` | uuid | | List only the compositions made for this managed user (Widgetic's id for the user). Send this or `managedUserExternalId`, not both. |
| `--query-managed-user-external-id <text>` | text | | List only the compositions made for the managed user you registered with this `externalId` (your own identifier for the user). Send this or `managedUserId`, not both. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-all-compositions`.

## `widgetic api compositions get-composition-by-id`

Get Composition

* Request: `GET /compositions/{id}`
* Operation: `getCompositionById` (`widgetic api call getCompositionById` runs it by that name)
* Also written: `widgetic api compositions get`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | Composition ID |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-by-id`.

## `widgetic api compositions get-composition-content`

Get Current Content

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-content`.

## `widgetic api compositions get-composition-content-schema`

Get Content Schema

* Request: `GET /compositions/{id}/schema/content`
* Operation: `getCompositionContentSchema` (`widgetic api call getCompositionContentSchema` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-content-schema`.

## `widgetic api compositions get-composition-data-source`

Read the composition data source binding

* Request: `GET /compositions/{id}/data-source`
* Operation: `getCompositionDataSource` (`widgetic api call getCompositionDataSource` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-data-source`.

## `widgetic api compositions get-composition-database-record`

Get Record From Composition Database

* Request: `GET /compositions/{id}/database/{table}/{recordId}`
* Operation: `getCompositionDatabaseRecord` (`widgetic api call getCompositionDatabaseRecord` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--table <text>` | text | yes | Name of the database table |
| `--record-id <text>` | text | yes | ID of the record to retrieve |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-database-record`.

## `widgetic api compositions get-composition-database-records`

Get All Records From Composition Database Table

* Request: `GET /compositions/{id}/database/{table}`
* Operation: `getCompositionDatabaseRecords` (`widgetic api call getCompositionDatabaseRecords` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--table <text>` | text | yes | Name of the database table |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-database-records`.

## `widgetic api compositions get-composition-design`

Get Composition Design

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-design`.

## `widgetic api compositions get-composition-design-schema`

Get Design Schema

* Request: `GET /compositions/{id}/schema/design`
* Operation: `getCompositionDesignSchema` (`widgetic api call getCompositionDesignSchema` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-design-schema`.

## `widgetic api compositions get-composition-embed-schema`

Get Embed Schema

* Request: `GET /compositions/{id}/schema/embed`
* Operation: `getCompositionEmbedSchema` (`widgetic api call getCompositionEmbedSchema` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-embed-schema`.

## `widgetic api compositions get-composition-embed-settings`

Get Composition Embed Settings

* Request: `GET /compositions/{id}/embed-settings`
* Operation: `getCompositionEmbedSettings` (`widgetic api call getCompositionEmbedSettings` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-embed-settings`.

## `widgetic api compositions get-composition-preview`

Get Composition Preview

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-preview`.

## `widgetic api compositions get-composition-versions`

Get Composition Versions

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

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | Composition ID |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions get-composition-versions`.

## `widgetic api compositions get-compositions-batch`

Get Compositions Batch

* Request: `POST /compositions/batch`
* Operation: `getCompositionsBatch` (`widgetic api call getCompositionsBatch` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--composition-ids <values...>` | list (repeat the flag) | | Array of composition IDs to retrieve |
| `--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 compositions get-compositions-batch`.

## `widgetic api compositions list-composition-entry-items`

List composition entry items with paging and filters

* Request: `GET /compositions/{id}/entries/{table}/items`
* Operation: `listCompositionEntryItems` (`widgetic api call listCompositionEntryItems` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | |
| `--table <text>` | text | yes | |
| `--limit <int>` | integer | | (default: 25) |
| `--order <text>` | one of `asc`, `desc` | | `desc` (the default) lists the newest entry first, `asc` the oldest. Entries are sorted by their time, then by their id (compared as text, byte by byte) in the same direction, so the order of two entries made at the same… (default: desc) |
| `--since <date-time>` | date-time | | Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. |
| `--until <date-time>` | date-time | | Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. |
| `--cursor <text>` | text | | |
| `--context <key=value>` | key=value (repeat the flag) | | Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters. Repeat it for more than one. |
| `--filter <key=value>` | key=value (repeat the flag) | | Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). Repeat it for more than one. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions list-composition-entry-items`.

## `widgetic api compositions patch-composition-content-item`

Update a content list item

* Request: `PATCH /compositions/{id}/content/{list}/items/{itemId}`
* Operation: `patchCompositionContentItem` (`widgetic api call patchCompositionContentItem` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | |
| `--list <text>` | text | yes | |
| `--item-id <text>` | text | yes | |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--if-match <text>` | text | | |
| `--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 compositions patch-composition-content-item`.

## `widgetic api compositions read-composition-entries`

Read the Entries of a Composition's Table

* Request: `GET /compositions/{id}/entries/{table}`
* Operation: `readCompositionEntries` (`widgetic api call readCompositionEntries` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--table <text>` | text | yes | The table to read, exactly as `describeCompositionEntries` lists it |
| `--group-by <text>` | text | | A column of the table to count entries per value of |
| `--rows <int>` | integer | | How many of the newest entries to return (0 returns counts and tallies only) (default: 0) |
| `--aggregate <text>` | text | | The functions to compute, comma-separated, from `count`, `avg`, `min`, `max` and `sum` (for example `count,avg`). Adds `aggregates` to the answer. Any other name answers 400 `ENTRY_AGGREGATE_INVALID`. |
| `--column <text>` | text | | The numeric column `avg`, `min`, `max` and `sum` are computed over. Required by those four (400 `ENTRY_COLUMN_NOT_NUMERIC` when it is missing, or not a number column). Only with `aggregate`. |
| `--since <date-time>` | date-time | | Only entries made at this time or later: `since` is INCLUSIVE (an entry made at exactly `since` is returned). A date and time with an offset, such as `2026-10-01T00:00:00Z`; anything else answers 400 `INVALID_SINCE`. |
| `--until <date-time>` | date-time | | Only entries made before this time: `until` is EXCLUSIVE (an entry made at exactly `until` is NOT returned), so `since=A&until=B` followed by `since=B&until=C` counts every entry once. |
| `--context <key=value>` | key=value (repeat the flag) | | Host context filters as `context[key]=value` (max 5 keys, counting dotted `context.key` too). Use `column.<name>=value` for columns whose names collide with reserved parameters. Repeat it for more than one. |
| `--filter <key=value>` | key=value (repeat the flag) | | Column filters as `filter[columnName]=value` (same meaning as bare `columnName=value` or `column.columnName=value`; max 10 column filters counting all spellings). Repeat it for more than one. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions read-composition-entries`.

## `widgetic api compositions remove-ai-answers-knowledge-document`

Remove a document from a widget's knowledge base

* Request: `DELETE /compositions/{id}/adapters/ai-answers/knowledge/documents/{documentId}`
* Operation: `removeAiAnswersKnowledgeDocument` (`widgetic api call removeAiAnswersKnowledgeDocument` 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 widget (composition) the document is in |
| `--document-id <uuid>` | uuid | yes | The document to remove |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |

The whole description and the schemas: `widgetic schema api compositions remove-ai-answers-knowledge-document`.

## `widgetic api compositions set-composition-data-source`

Bind a public JSON data source for embed refresh

* Request: `PUT /compositions/{id}/data-source`
* Operation: `setCompositionDataSource` (`widgetic api call setCompositionDataSource` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--url <text>` | text | | |
| `--refresh-seconds <int>` | integer | | |
| `--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 compositions set-composition-data-source`.

## `widgetic api compositions set-dynamic-content`

Set Dynamic Content

* Request: `PUT /compositions/{id}/content`
* Operation: `setDynamicContent` (`widgetic api call setDynamicContent` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--if-match <text>` | text | | Optional content version from ETag (`"3"`, `3`, or `*`) |
| `--validate` | switch | | Whether to validate content against widget schema (default: true) --no-validate turns it off. |
| `--partial` | switch | | Whether to merge with existing content (true) or replace entirely (false) (default: false) |
| `--version <text>` | text | | Optional version identifier for the content |
| `--source <text>` | text | | Source of the update for tracking purposes |
| `--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 compositions set-dynamic-content`.

## `widgetic api compositions update-composition`

Update Composition

* Request: `PUT /compositions/{id}`
* Operation: `updateComposition` (`widgetic api call updateComposition` runs it by that name)
* Also written: `widgetic api compositions update`
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | Composition 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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--if-match <text>` | text | | Optional content version from `contentVersion` or an `ETag` (`"3"`, `3`, or `*`). Read only when the body has `content`. |
| `--name <text>` | text | | Updated name of the composition |
| `--widget-id <uuid>` | uuid | | Updated widget ID |
| `--status <text>` | text | | Updated status |
| `--project-id <uuid>` | uuid | | Updated project ID |
| `--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 compositions update-composition`.

## `widgetic api compositions update-composition-database-record`

Update Record In Composition Database

* Request: `PUT /compositions/{id}/database/{table}/{recordId}`
* Operation: `updateCompositionDatabaseRecord` (`widgetic api call updateCompositionDatabaseRecord` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--table <text>` | text | yes | Name of the database table |
| `--record-id <text>` | text | yes | ID of the record to update |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--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 compositions update-composition-database-record`.

## `widgetic api compositions update-composition-status`

Update Composition Status

* Request: `PUT /compositions/{id}/status`
* Operation: `updateCompositionStatus` (`widgetic api call updateCompositionStatus` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | Composition 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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--status <text>` | one of `draft`, `published`, `archived` | | New status to set |
| `--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 compositions update-composition-status`.

## `widgetic api compositions validate-composition-content`

Validate Content

* Request: `POST /compositions/{id}/content/validate`
* Operation: `validateCompositionContent` (`widgetic api call validateCompositionContent` runs it by that name)
* Works with any API key.

| Flag | Takes | Required | What it does |
| - | - | - | - |
| `--id <uuid>` | uuid | yes | ID of the composition |
| `--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. |
| `--managed-user-id <uuid>` | uuid | | The id Widgetic gave the managed user (`POST /managed-users`). Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--managed-user-external-id <text>` | text | | Your own id for the managed user (its `externalId`), when you do not keep Widgetic's. Makes this call for one of your managed users, so that a mistake in your own code cannot reach another customer's work. |
| `--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 compositions validate-composition-content`.


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