Skip to content

Create a widget

POST
/widgets
curl --request POST \
--url https://api.example.com/v1/widgets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "My first widget", "description": "example" }'

Creates a new widget on the authenticated account.

Media type application/json
object
name
required
string
Example
My first widget
description
string

The newly created widget.

Media type application/json
object
id
required
string
name
required
string
description
string
nullable
created_at
required
string format: date-time
Example
{
"id": "wdg_01H8Z9XJ7M3K4P5Q6R7S8T9V0W",
"name": "My first widget",
"description": "Optional human-readable description."
}

The request was malformed.

Media type application/json
object
code
required
string
message
required
string
request_id
string
Example
{
"code": "invalid_request",
"message": "The `name` field is required.",
"request_id": "req_01H8Z9XJ7M3K4P5Q6R7S8T9V0W"
}

Authentication failed or was not provided.

Media type application/json
object
code
required
string
message
required
string
request_id
string
Example
{
"code": "invalid_request",
"message": "The `name` field is required.",
"request_id": "req_01H8Z9XJ7M3K4P5Q6R7S8T9V0W"
}

Maintained by EkLine