# Move a version of the text on

`POST /lodging/text/{kind}/{id}` · Rivier · bookings

Move a version of the text on: send it for review, ask for changes, approve, publish now, schedule for a time, or restore an earlier version as a new draft. Approving and publishing are a person's.

- Scope: bookings:write
- Sdk: bookings.text.act
- Cli: bookings text act

## Parameters

- `kind` (path, required), string
- `id` (path, required), string
- `locale` (query, required), string

## Request body

`application/json`

```json
{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "const": "submit"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "action",
        "version"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "const": "request_changes"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "reason": {
          "type": "string",
          "maxLength": 300,
          "default": ""
        }
      },
      "required": [
        "action",
        "version"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "const": "approve"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "action",
        "version"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "const": "publish"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "action",
        "version"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "const": "schedule"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        },
        "at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "action",
        "version",
        "at"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "const": "restore"
        },
        "version": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "action",
        "version"
      ],
      "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/lodging/text/{kind}/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "action": "submit",
  "version": 0
}'
```
