Skip to content

Create Widget

POST
/api/widgets

Create a new embeddable widget with auto-generated API key

Authorizations

ApiKeyAuth

API key for authentication. Get your API key from the dashboard.

TypeAPI Key (header: X-Api-Key)

Request Body

application/json
JSON
{
"data": {
"type": "widgets",
"attributes": {
"name": "string",
"widgetType": "string",
"mode": "string",
"staticConfig": {
"dateTime": "string",
"latitude": 0,
"longitude": 0,
"timezone": "string",
"placeName": "string",
"person2": {
"dateTime": "string",
"latitude": 0,
"longitude": 0,
"timezone": "string",
"placeName": "string"
},
"transitDateTime": "string"
},
"customization": {
"colors": {
"primary": "string",
"secondary": "string",
"background": "string",
"surface": "string",
"text": "string",
"textSecondary": "string",
"border": "string",
"error": "string",
"success": "string"
},
"fonts": {
"family": "string",
"sizeBase": 0,
"sizeScale": 0
},
"chartSettings": {
"additionalProperties": "string"
},
"labels": {
"additionalProperties": "string"
},
"language": "string",
"branding": {
"showPoweredBy": true,
"logoUrl": "string",
"companyName": "string"
},
"customCss": "string",
"widgetOptions": {
"showAspects": true,
"showPoints": true,
"showHouses": true,
"chartSize": 0,
"theme": "string"
}
},
"allowedDomains": [
"string"
],
"enabled": true
}
}
}

Responses

Created widget with API key

application/vnd.api+json
JSON
[
]

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

AstroAPI Documentation