Create a widget
- Scope
- example:widgets:add Admin-issued keys only.
- Idempotency
- Requires an
Idempotency-Keyheader. Reusing the key within 24 hours returns the original response instead of creating a second record.
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
| namerequired | string | 1 to 120 characters |
| quantity | integer | at least 0 · default 0 |
Request body of addWidget
- namerequired
- Type
- string
- Description
- 1 to 120 characters
- quantity
- Type
- integer
- Description
- at least 0 · default 0
Response 200Widget created
| Field | Type | Description |
|---|---|---|
| datarequired | Widget | |
| idrequired | string, uuid | |
| namerequired | string | 1 to 120 characters |
| quantityrequired | integer | at least 0 |
| createdAtrequired | string, date-time |
Response of addWidget
- datarequired
- Type
- Widget
- Description
- idrequired
- Type
- string, uuid
- Description
- namerequired
- Type
- string
- Description
- 1 to 120 characters
- quantityrequired
- Type
- integer
- Description
- at least 0
- createdAtrequired
- Type
- string, date-time
- Description
Example
curl -X POST https://api.rsx.group/example/v1/widgets/add \
-H "Authorization: Bearer rsx_live_..." \
-H "Idempotency-Key: 5b8f2d1a-0c7e-4b1f-9a6d-3e2f1c0b9a8d" \
-H "Content-Type: application/json" \
-d '{
"name": "Acrylic Panel",
"quantity": 12
}'{
"data": {
"id": "0198f2b1-6c2a-7c9e-9d3a-1e2f3a4b5c6d",
"name": "Acrylic Panel",
"quantity": 12,
"createdAt": "2026-07-12T14:30:00Z"
}
}