# Content entry import

`POST /cms/import` · Rivier · content

Import markdown, a Ghost export, WordPress posts, a Medium export (html files) or a Substack export (posts.csv and html files). Returns what was made, what was skipped and why, and a redirect from each old address to the new page.

- Scope: content:write
- Graphql: Mutation.contentEntryImport
- Sdk: content.entry.import
- Cli: content entry import

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "format": {
      "type": "string",
      "enum": [
        "markdown",
        "ghost",
        "wordpress",
        "substack",
        "medium"
      ]
    },
    "type": {
      "type": "string"
    },
    "data": {},
    "map": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "dryRun": {
      "type": "boolean"
    },
    "locale": {
      "type": "string",
      "maxLength": 20
    }
  },
  "required": [
    "format",
    "type"
  ],
  "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/cms/import' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "format": "markdown",
  "type": "string"
}'
```
