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

# SDKs

> The Widgetic libraries for TypeScript, Python, Go, Java, C#, Ruby, PHP and Bash, what each one needs, and which tool to pick for the job

Widgetic publishes a library for the API in eight languages. Each one is generated from the same [OpenAPI description](https://raw.githubusercontent.com/widgetic/docs/main/openapi/widgetic-api-public.json) as the [API reference](https://docs.widgetic.com/api-reference/introduction.md), so every public endpoint is a method with the same name and the same arguments in every language, and an answer has the same shape.

> [!WARNING]
>
> A library holds your API key, so use it on a server, in a script or in a build, and never in a web page or in an app you give to others. To show a widget on a page you need no key: use the [embed script](https://docs.widgetic.com/docs/api/embedding.md).

## The libraries

| Language | Package | Registry | Latest | Needs |
| :- | :- | :- | :- | :- |
| TypeScript | [`@widgetic/api-sdk-ts`](https://www.npmjs.com/package/@widgetic/api-sdk-ts) | npm | `3.1.1` | Node.js 18 or later |
| Python | [`api-sdk-py`](https://pypi.org/project/api-sdk-py/) | PyPI | `1.11.151` | Python 3.7 or later |
| Go | [`github.com/widgetic/api-sdk-go`](https://pkg.go.dev/github.com/widgetic/api-sdk-go) | Go modules | `1.11.151` | Go 1.18 or later |
| Java | [`com.widgetic:api-sdk-java`](https://central.sonatype.com/artifact/com.widgetic/api-sdk-java) | Maven Central | `1.11.151` | Java 8 or later |
| C# | [`Widgetic.ApiSdk.Cs`](https://www.nuget.org/packages/Widgetic.ApiSdk.Cs) | NuGet | `1.11.151` | .NET 8 or later |
| Ruby | [`api-sdk-rb`](https://rubygems.org/gems/api-sdk-rb) | RubyGems | `1.11.151` | Ruby 2.7 or later |
| PHP | [`widgetic/api-sdk-php`](https://packagist.org/packages/widgetic/api-sdk-php) | Packagist | `1.11.151` | PHP ^7.4 or ^8.0 |
| Bash | [`widgetic/api-sdk-bash`](https://github.com/widgetic/api-sdk-bash) | GitHub | `1.11.151` | Bash 4.3 or later, and curl |

To install one and make a first call, go to [Get started](https://docs.widgetic.com/docs/sdks/getting-started.md).

## Updating a library

Lock the version your project uses, so an update is something you do and not something that happens: a lock file (`package-lock.json`, `go.sum`, `Gemfile.lock`, `composer.lock`), `==` in a pip requirements file, or an exact `<version>` in Maven. A new release follows the API: it can add calls, and it can change the arguments of one, so read the [changelog](https://docs.widgetic.com/docs/reference/changelog.md) before you update.

## When a version is too old

The API refuses a call from a version of the TypeScript library, or of the [CLI](https://docs.widgetic.com/docs/cli/getting-started.md), that it no longer supports, with `426 Upgrade Required`. These clients say which version they are in a header, and the API compares it with the oldest one it still serves. The answer is the usual [error envelope](https://docs.widgetic.com/api-reference/errors.md#client-version-errors-426): `code` is `UPGRADE_REQUIRED`, and `details` holds `sdk`, `currentVersion`, `minimumVersion` and `upgradeCommand`. Update the package, and send the call again.

The API does not make this check for the other languages, or for a call you send yourself.

## Pick the right tool

| You want to | Use |
| :- | :- |
| Call the API from your own server, in your own language | A library from this page |
| Call the API from a shell script, a terminal or a CI job | The [CLI](https://docs.widgetic.com/docs/cli/getting-started.md), or the Bash library |
| Let an AI agent build and publish widgets | The [MCP server](https://docs.widgetic.com/docs/agents/overview.md) |
| Show a published widget on a page | The [embed script](https://docs.widgetic.com/docs/api/embedding.md) |
| Put Widgetic's editors in your own product | The [UI SDK](https://docs.widgetic.com/docs/partners/ui-components) |
| Be told when something happens | [Webhooks and events](https://docs.widgetic.com/docs/webhooks/overview.md) |
| Call the API from a language we do not publish for | Plain HTTPS: every endpoint in the [API reference](https://docs.widgetic.com/api-reference/introduction.md) has a cURL sample, and the [OpenAPI description](https://raw.githubusercontent.com/widgetic/docs/main/openapi/widgetic-api-public.json) feeds a generator of your own |

## Other packages

| Package | What it is for | Latest | Needs |
| :- | :- | :- | :- |
| [`@widgetic/embed-sdk`](https://www.npmjs.com/package/@widgetic/embed-sdk) | [Shows published widgets on a page, from a project that bundles its own JavaScript](https://docs.widgetic.com/docs/api/embedding.md#use-the-npm-package) | `2.1.10` | — |
| [`@widgetic/ui-sdk`](https://www.npmjs.com/package/@widgetic/ui-sdk) | [Puts Widgetic's editors in your own page](https://docs.widgetic.com/docs/partners/ui-components) | `0.1.21` | — |
| [`@widgetic/cli`](https://www.npmjs.com/package/@widgetic/cli) | [The `widgetic` command line](https://docs.widgetic.com/docs/cli/getting-started) | `0.1.17` | Node.js 22.12.0 or later |

## Next steps

> [card] [Get started](https://docs.widgetic.com/docs/sdks/getting-started.md)
>
> Install a library, set your key and make a first call

> [card] [Requests and errors](https://docs.widgetic.com/docs/sdks/requests-and-errors.md)
>
> Paging, safe retries, and what to catch in each language

> [card] [API classes](https://docs.widgetic.com/docs/sdks/api-classes.md)
>
> Which class holds which calls, and how a call is named

> [card] [API reference](https://docs.widgetic.com/api-reference/introduction.md)
>
> Every endpoint, with samples in cURL, seven languages and the CLI

A library is missing a call, or does something this page does not say? Write to [the support team](https://docs.widgetic.com/docs/introduction.md#need-help) with the name and the version of the library.


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