# Apply an entry to the site

`POST /hosting/sites/{id}/design-library/apply` · Rivier · hosting

Apply an entry to the site. Needs a person with manager rights and approve: true; an assistant gets the preview and a request for approval (202). The site pins the version used and the change can be undone.

- Scope: hosting:write
- Graphql: Mutation.hostingLibraryApplyApply
- Sdk: hosting.libraryApply.apply
- Cli: hosting library apply apply

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "entryId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]{2,60}$"
    },
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "mode": {
      "type": "string",
      "enum": [
        "light",
        "dark"
      ]
    },
    "parts": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "palette",
          "typePairing",
          "tokenSet"
        ]
      },
      "maxItems": 3
    },
    "pageId": {
      "type": "string",
      "format": "uuid"
    },
    "position": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "start",
            "end"
          ]
        },
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 200
        }
      ]
    },
    "briefKey": {
      "type": "string",
      "maxLength": 200
    },
    "approve": {
      "type": "boolean"
    }
  },
  "required": [
    "entryId"
  ],
  "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}/design-library/apply' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "entryId": "string"
}'
```
