# Name a revision of a post (/docs/api/cms/posts/updatePostRevision)

`PATCH https://api.tintage.com/v1/cms/projects/{projectId}/posts/{postId}/revisions/{revisionId}`

Sets the revision's `name` and `note`. Named revisions are never removed by retention. Needs edit rights on the post.

Parameters:
- `projectId` (path, required)
- `postId` (path, required)
- `revisionId` (path, required)
- `locale` (query): Language tag of the row to read (`fr`, `fr-CA`). Defaults to the site's language.

JSON request body:
- `name` (string or null, required): Up to 80 characters; null removes the name and note.
- `note` (string or null): Up to 500 characters.

```json
{
  "name": "string",
  "note": "string"
}
```

Responses:
- 200: The revision.

  ```json
  {
    "id": "string",
    "reason": "autosave",
    "createdAt": "string",
    "name": "string",
    "note": "string",
    "restoredFrom": "string",
    "contributors": [
      {
        "type": "user",
        "name": "string",
        "author": "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"
  }
  ```
- 412: `If-Match` named an old version: `precondition_failed` with `currentVersion`.

  ```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"
  }
  ```
