# Create a page (/docs/api/cms/pages/createPage)

`POST https://api.tintage.com/v1/cms/projects/{projectId}/pages`

A draft in the site's language. With no `authorIds` a key's page has no byline. Needs `post:create`.

Parameters:
- `projectId` (path, required)

JSON request body:
- `title` (string)
- `body` (object or null): A Tiptap JSON document (`@tintage/document`).
- `featureImage` (object): `{ file: 'file_...', alt }`, or null.
- `slug` (string)
- `authorIds` (array): Author ids (`author_...`) in byline order.
- `publishedAt` (string): Editors: the publish date of a published post.
- `seo` (object)
- `og` (object)
- `twitter` (object)
- `canonicalUrl` (string or null)
- `noindex` (boolean)
- `parent` (string or null): The parent page's id (`post_...`), or null for the top level.
- `template` (string or null): The template's name from the theme's tintage.json, or null for the default.

```json
{
  "title": "string",
  "body": "string",
  "featureImage": "string",
  "slug": "string",
  "authorIds": [
    "string"
  ],
  "publishedAt": "string",
  "seo": {},
  "og": {},
  "twitter": {},
  "canonicalUrl": "string",
  "noindex": false,
  "parent": "string",
  "template": "string"
}
```

Responses:
- 201: The new page.

  ```json
  {
    "id": "string",
    "locale": "string",
    "alternates": [
      {
        "locale": "string",
        "slug": "string"
      }
    ],
    "slug": "string",
    "status": "draft",
    "title": "string",
    "body": "string",
    "featureImage": "string",
    "authors": [
      {
        "id": "string",
        "slug": "string",
        "name": "string",
        "bio": "string",
        "image": "string",
        "website": "string",
        "social": {
          "x": "string",
          "bluesky": "string",
          "mastodon": "string",
          "linkedin": "string",
          "instagram": "string",
          "github": "string",
          "youtube": "string"
        },
        "count": {
          "posts": 0
        }
      }
    ],
    "seo": {
      "title": "string",
      "description": "string"
    },
    "og": {
      "title": "string",
      "description": "string",
      "image": "string"
    },
    "twitter": {
      "card": "summary",
      "title": "string",
      "description": "string",
      "image": "string"
    },
    "canonicalUrl": "string",
    "noindex": false,
    "fields": {},
    "publishedAt": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "version": 0,
    "parent": "string",
    "template": "string"
  }
  ```
- 400: The request is malformed: `invalid_input`, `unknown_parameter`, `invalid_cursor` or `unsupported_api_version`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 401: Missing or invalid credential: `unauthorized`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 402: A plan limit: `plan_limit`, `spend_cap_reached` or `plan_inactive`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 403: The credential may not do this here: `forbidden`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 404: No such item, or one this credential cannot see: `not_found`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 409: `conflict` or `idempotency_in_progress`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 422: `limit_exceeded`, `query_not_supported`, `query_timeout` or `idempotency_key_reused`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 429: Too many requests: `rate_limited`, with `Retry-After`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
- 500: Something failed on our side: `internal_error`.

  ```json
  {
    "error": {
      "code": "invalid_input",
      "message": "string",
      "field": "string",
      "hint": "string",
      "issues": [
        {
          "field": "string",
          "message": "string",
          "hint": "string"
        }
      ]
    },
    "requestId": "string"
  }
  ```
