# update_original

Source: https://heyeveryone.ai/docs/mcp/update_original

> Write a content item's original draft: the idea in its best form (text plus ordered media), which every channel post is adapted from. Pass `text` and/or `media` (replaces the list). Each change is a new version (get_history). Pass the `version` you read as `expectedVersion` so you never overwrite a newer edit: a mismatch fails with `version_conflict` and nothing is saved. Channel versions that follow the original (`followsOriginal`, see follow_original) take the edit as a new version, but only while a draft or ready and only if it still passes their channel's rules; otherwise they stay as they were and `followIssue` says why. `following` lists them after the edit. Customized versions never change: update them with update_post.

Write a content item's original draft: the idea in its best form (text plus ordered media), which every channel post is adapted from. Pass `text` and/or `media` (replaces the list). Each change is a new version (get_history). Pass the `version` you read as `expectedVersion` so you never overwrite a newer edit: a mismatch fails with `version_conflict` and nothing is saved. Channel versions that follow the original (`followsOriginal`, see follow_original) take the edit as a new version, but only while a draft or ready and only if it still passes their channel's rules; otherwise they stay as they were and `followIssue` says why. `following` lists them after the edit. Customized versions never change: update them with update_post.

## Access and cost

- Kind: mutation
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: false

## Input schema

```json
{
  "properties": {
    "workspaceId": {
      "format": "uuid",
      "type": "string"
    },
    "pieceId": {
      "format": "uuid",
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "media": {
      "items": {
        "properties": {
          "mediaAssetId": {
            "format": "uuid",
            "type": "string"
          },
          "altText": {
            "maxLength": 2000,
            "type": "string"
          }
        },
        "required": [
          "mediaAssetId"
        ],
        "type": "object"
      },
      "maxItems": 35,
      "type": "array"
    },
    "expectedVersion": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "workspaceId",
    "pieceId"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "additionalProperties": false,
  "properties": {
    "master": {
      "additionalProperties": false,
      "properties": {
        "pieceId": {
          "format": "uuid",
          "type": "string"
        },
        "workspaceId": {
          "format": "uuid",
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "media": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "mediaAssetId": {
                "format": "uuid",
                "type": "string"
              },
              "altText": {
                "maxLength": 2000,
                "type": "string"
              }
            },
            "required": [
              "mediaAssetId"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "version": {
          "minimum": 1,
          "type": "integer"
        },
        "updatedByAccountId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "updatedByAgentClientId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "pieceId",
        "workspaceId",
        "text",
        "media",
        "version",
        "updatedByAccountId",
        "updatedByAgentClientId",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    },
    "changed": {
      "type": "boolean"
    },
    "following": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "workspaceId": {
            "format": "uuid",
            "type": "string"
          },
          "pieceId": {
            "format": "uuid",
            "type": "string"
          },
          "channelAccountId": {
            "format": "uuid",
            "type": "string"
          },
          "format": {
            "pattern": "^[a-z][a-z0-9_]*$",
            "type": "string"
          },
          "segments": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "text": {
                  "type": "string"
                },
                "media": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "mediaAssetId": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "altText": {
                        "maxLength": 2000,
                        "type": "string"
                      }
                    },
                    "required": [
                      "mediaAssetId"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "text",
                "media"
              ],
              "type": "object"
            },
            "minItems": 1,
            "type": "array"
          },
          "settings": {
            "type": "object"
          },
          "state": {
            "enum": [
              "draft",
              "ready",
              "awaiting_confirmation",
              "scheduled",
              "publishing",
              "published",
              "failed_retrying",
              "needs_attention",
              "failed",
              "manual",
              "removed"
            ],
            "type": "string"
          },
          "scheduledAt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduleSource": {
            "anyOf": [
              {
                "enum": [
                  "manual",
                  "queue",
                  "recurrence",
                  "evergreen"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isSkipped": {
            "type": "boolean"
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          },
          "followsOriginal": {
            "type": "boolean"
          },
          "followIssue": {
            "type": [
              "string",
              "null"
            ]
          },
          "requestedByAgentClientId": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmedByAccountId": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmedAt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastError": {
            "anyOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "fix": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "publishedAt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "permalink": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdByAccountId": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdByAgentClientId": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "pieceId",
          "channelAccountId",
          "format",
          "segments",
          "settings",
          "state",
          "scheduledAt",
          "scheduleSource",
          "isSkipped",
          "version",
          "followsOriginal",
          "followIssue",
          "requestedByAgentClientId",
          "confirmedByAccountId",
          "confirmedAt",
          "lastError",
          "publishedAt",
          "permalink",
          "createdByAccountId",
          "createdByAgentClientId",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "url": {
      "description": "The content page in heyeveryone. Give it to the person so they can open the draft.",
      "type": "string"
    }
  },
  "required": [
    "master",
    "changed",
    "following",
    "url"
  ],
  "type": "object"
}
```

## Errors

```json
[
  "version_conflict"
]
```

## Annotations

```json
{
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false,
  "readOnlyHint": false,
  "title": "Update the original draft"
}
```
