Create a widget type
Creates a new widget type.
name must be unique across all widget types. Sending a name that already exists is rejected with a 400 validation error.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The body of a widget type create or full update request.
The unique name of the widget type.
The JSON schema that defines the structure of attributes for widgets of this type. Defaults to an empty object when omitted.
{}The widget type was created.
A widget type record.
The unique identifier of the widget type.
The unique name of the widget type.
The JSON schema that defines the structure of attributes for widgets of this type.
{}The request contains invalid or missing data.
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
POST /api/v1/remote/1/widget_types/ 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?

