> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# changes.create()

> Create a change on top of an existing base change.

Create a new change, optionally applying initial file operations atomically. File content must be base64-encoded.

**Required scope: `write`**

```python theme={null}
import base64
from mesa_sdk import Author, FileDelete, FileUpsert

change = await mesa.changes.create(
    repo="app",
    base_change_id="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
    message="Add README",
    author=Author(name="Docs Bot", email="docs@example.com"),
    files=[
        FileUpsert(
            path="README.md",
            content=base64.b64encode(b"# App\n").decode(),
        ),
        FileDelete(path="old.txt"),
    ],
)
```

## Options

<ParamField path="repo" type="str" required>
  Repository name.
</ParamField>

<ParamField path="base_change_id" type="str" required>
  Change to create the new change on top of. Use Mesa's virtual root change ID for the first change in an empty repository.
</ParamField>

<ParamField path="org" type="str | None">
  Organization override.
</ParamField>

<ParamField path="message" type="str | None">
  Change description. Required when `files` is non-empty. When `files` is omitted, pass `None` to omit the field and create the change with no description, or pass `""` explicitly.
</ParamField>

<ParamField path="author" type="Author | None">
  Commit author identity. When omitted, the server fills an identity derived from the API key.
</ParamField>

<ParamField path="committer" type="Author | None">
  Committer identity. When omitted, the server falls back to `author`.
</ParamField>

<ParamField path="files" type="list[FileChange] | None">
  File operations to apply atomically. Entries are `FileUpsert` or `FileDelete`.
</ParamField>

## Response

<ResponseField name="id" type="str">
  Change ID.
</ResponseField>

<ResponseField name="current_commit_oid" type="str">
  Current commit OID for the change.
</ResponseField>

<ResponseField name="is_conflicted" type="bool">
  Whether the current commit still contains unresolved conflicts.
</ResponseField>

<ResponseField name="message" type="str">
  Current change description. Empty string means the change has no description.
</ResponseField>

<ResponseField name="author" type="CommitIdentity">
  Commit author identity.
</ResponseField>

<ResponseField name="committer" type="CommitIdentity">
  Committer identity.
</ResponseField>

<ResponseField name="parents" type="list[str]">
  Parent change IDs for this change.
</ResponseField>

<ResponseField name="created_at" type="datetime">
  Creation time.
</ResponseField>

<ResponseField name="updated_at" type="datetime">
  Last update time.
</ResponseField>

### CommitIdentity

<ResponseField name="name" type="str">
  Author or committer display name.
</ResponseField>

<ResponseField name="email" type="str">
  Author or committer email address.
</ResponseField>

<ResponseField name="date" type="datetime | None">
  Timestamp for this identity when provided.
</ResponseField>
