For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update a widget type

Fully replaces a widget type. name is required; schema defaults to {} when omitted.

name must remain unique — providing a name already used by another widget type is rejected with 400.

put
/widget_types/{id}/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Path parameters
idintegerRequired

The unique identifier of the widget type.

Body

The body of a widget type create or full update request.

namestring · max: 255Required

The unique name of the widget type.

schemaobjectOptional

The JSON schema that defines the structure of attributes for widgets of this type. Defaults to an empty object when omitted.

Default: {}
Responses
200

The updated widget type.

application/json

A widget type record.

pkintegerRead-onlyOptional

The unique identifier of the widget type.

namestring · max: 255Optional

The unique name of the widget type.

schemaobjectOptional

The JSON schema that defines the structure of attributes for widgets of this type.

Default: {}
put/widget_types/{id}/
PUT /api/v1/remote/1/widget_types/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 115

{
  "name": "hero_banner",
  "schema": {
    "title": {
      "type": "text",
      "required": true
    },
    "image": {
      "type": "image",
      "required": false
    }
  }
}
{
  "pk": 1,
  "name": "hero_banner",
  "schema": {
    "title": {
      "type": "text",
      "required": true
    },
    "image": {
      "type": "image",
      "required": false
    }
  }
}

Last updated

Was this helpful?