Reference

PUT /v1/ui

Set an app's page: field, response and errors.

Open as Markdown

With PUT /v1/ui, your tool tells Packlets which web page an app shows. This call only exists for packlets of the app type.

The guide for this: Build your own app.

PUT /v1/ui

HTTP
PUT https://api.packlets.app/v1/ui
Authorization: Bearer <PACKLETS_KEY>
Content-Type: application/json
FieldTypeRequiredMeaning
pagehttps address, up to 2,048 charactersyesThe page the app shows.
JSON
{ "page": "https://your-server.com/invoices" }

What a PUT does:

  • The app shows this page from now on. You set a different address with a new PUT.
  • The first successful PUT connects the packlet: the app shows "Connected!".
  • If the address changes to a different host or port, Packlets asks the next time you open it, before loading the page.

Once is enough. What the page shows is up to your server from then on.

Response

JSON
{ "ok": true, "page": "https://your-server.com/invoices" }

Errors

StatuserrorWhen
400invalid_bodypage is missing, isn't an https address or is too long. details names the field and the reason.
401missing_key, invalid_keyKey is missing or wrong.
409wrong_kindThe packlet is a channel, not an app.
429rate_limitedMore than 60 calls in a minute.

What you can do in each case is covered under Error codes.