Widgets
Create widget
Create a new widget. The response includes the generated `id` and
Create widget
cURL
curl -X POST "https://api.example.com/v3/widgets" \
-H "Authorization: Bearer your-api-token" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"My first widget","colour":"blue","quantity":12}' 201 application/json
{
"id": "wdg_abc123",
"name": "My first widget",
"colour": "blue",
"quantity": 12,
"created_at": "2026-05-11T09:30:00Z",
"updated_at": "2026-05-11T09:30:00Z"
} Create a new widget. The response includes the generated id and
the timestamps the server stamped on the record.
Headers
- Authorization string required header
Bearer your-api-token - Accept string required header
application/json - Content-Type string required header
application/json
Body parameters
- name string required body
Human-readable name for the widget.
- colour string body
One of the supported widget colours.
- quantity integer body
Number of units. Defaults to 1.
Response codes
HTTP status- 201
Widget created.
- 400
Bad Request — missing required fields.
- 401
Unauthorized — invalid or missing API token.
- 422
Validation Error — invalid parameters.
- 429
Too many requests — rate limited.