# Send an old address to a new one so links and search standing carry over

`POST /cms/redirects` · Rivier · content

Send an old address to a new one so links and search standing carry over. A redirect never points at another one; chains are followed on write.

- Scope: content:write
- Mcp: rivier_cms_redirect
- Graphql: Mutation.contentRedirectSet
- Sdk: content.redirect.set
- Cli: content redirect set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "to": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "status": {
      "type": "number",
      "enum": [
        301,
        302,
        307,
        308,
        410
      ],
      "default": 301
    },
    "site": {
      "type": "string",
      "maxLength": 80,
      "default": ""
    }
  },
  "required": [
    "from",
    "to"
  ],
  "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/cms/redirects' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "string",
  "to": "string"
}'
```
