# publications_edit

Edit a versioned draft.

REST · `POST /api/v1/operations/publications_edit` · MCP · `publications_edit`

Required scope · `publish`. Send Idempotency-Key in REST or requestKey in MCP. Replace example IDs and times before running.

## Example request body

~~~json
{
  "id": "RECORD_ID",
  "version": 1,
  "caption": "Atlas"
}
~~~

REST returns the output below directly. In MCP read structuredContent.result. Check the current installation at /api/v1/openapi.json.

For 401 check credential validity. For 403 inspect the role, scopes and selected accounts. For 409 reread the record before retrying.

## JSON Schema · Input

~~~json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "version": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "caption": {
      "type": "string",
      "maxLength": 12000
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "visibility": {
      "type": "string",
      "enum": [
        "public",
        "unlisted",
        "private"
      ]
    },
    "coverMs": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "madeForKids": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "version",
    "caption"
  ],
  "additionalProperties": false
}
~~~

## JSON Schema · Output

~~~json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "version": {
      "type": "number"
    },
    "payload": {
      "type": "object",
      "properties": {
        "caption": {
          "type": "string"
        }
      },
      "required": [
        "caption"
      ],
      "additionalProperties": {}
    }
  },
  "required": [
    "id",
    "version",
    "payload"
  ],
  "additionalProperties": {}
}
~~~
