# Hosting site page widget

`POST /hosting/sites/{id}/pages/{page}/widgets` · Rivier · hosting

Place a widget block (form, newsletter, reviews, ratings, booking, buy button, cookie consent, language switcher, chat) on a page. The answer says whether the widget is live yet.

- Scope: hosting:write
- Mcp: rivier_site_widget_place
- Graphql: Mutation.hostingSitePageWidget
- Sdk: hosting.sitePage.widget
- Cli: hosting site page widget

## Parameters

- `id` (path, required), string
- `page` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "base": {
      "type": "integer",
      "minimum": 0
    },
    "widget": {
      "type": "string",
      "minLength": 2,
      "maxLength": 40
    },
    "parent": {
      "type": [
        "string",
        "null"
      ]
    },
    "slot": {
      "type": "string",
      "maxLength": 24
    },
    "index": {
      "type": "integer",
      "minimum": 0
    },
    "id": {
      "type": "string",
      "maxLength": 40
    },
    "props": {
      "type": "object",
      "additionalProperties": {}
    },
    "bindings": {
      "type": "object",
      "additionalProperties": {}
    },
    "note": {
      "type": "string",
      "maxLength": 300
    }
  },
  "required": [
    "base",
    "widget"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/hosting/sites/{id}/pages/{page}/widgets' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "base": 0,
  "widget": "string"
}'
```
