# Hosting preview share

`POST /hosting/sites/{id}/deployments/{dep}/share` · Rivier · hosting

A link to a preview on its own address, signed and expiring, kept out of search results.

- Scope: hosting:write
- Mcp: rivier_hosting_preview_share
- Graphql: Mutation.hostingPreviewShare
- Sdk: hosting.preview.share
- Cli: hosting preview share
- Events: hosting.preview.shared

## Parameters

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

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "ttlMinutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10080
    }
  },
  "additionalProperties": false
}
```

## Responses

- `201`: 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}/deployments/{dep}/share' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "ttlMinutes": 0
}'
```
