Skip to main content
PATCH
/
{org}
/
{repo}
/
changes
/
{change_id}
Patch change
curl --request PATCH \
  --url https://api.mesa.dev/v1/{org}/{repo}/changes/{change_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "files": [
    {
      "path": "<string>",
      "content": "<string>",
      "encoding": "base64",
      "action": "<string>",
      "mode": "100644"
    }
  ],
  "base_commit_oid": "<string>",
  "resolutions": [
    {
      "path": "<string>",
      "content": "<string>",
      "take": "target",
      "encoding": "base64"
    }
  ]
}
'
{
  "id": "<string>",
  "current_commit_oid": "<string>",
  "is_conflicted": true,
  "message": "<string>",
  "author": {
    "name": "<string>",
    "email": "jsmith@example.com",
    "date": "2023-11-07T05:31:56Z"
  },
  "committer": {
    "name": "<string>",
    "email": "jsmith@example.com",
    "date": "2023-11-07T05:31:56Z"
  },
  "parents": [
    "<string>"
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

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.

Required scope: write

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

org
string
required

Organization slug

Minimum string length: 1
repo
string
required

Repository name

Minimum string length: 1
change_id
string
required
Pattern: ^[zyxwvutsrqponmlk]{32}$

Body

application/json
message
string
Minimum string length: 1
author
object
committer
object
files
object[]
Minimum array length: 1
base_commit_oid
string
Pattern: ^[0-9a-f]{40}$
resolutions
object[]

Conflict resolutions to apply to a conflicted change. When present, the change advances to a new commit: fully resolved paths collapse into the target-term tree and the change becomes clean when no conflicts remain. files and resolutions are mutually exclusive — a conflicted change must be resolved via resolutions before regular file writes land.

A single caller-supplied resolution. Whole-file variants carry content OR take (not both); per-hunk variants carry hunks. Whole-file replaces the merged content at path. Per-hunk requires all hunks for the path to be resolved.

Response

Change updated

id
string
required
Pattern: ^[zyxwvutsrqponmlk]{32}$
current_commit_oid
string
required
Pattern: ^[0-9a-f]{40}$
is_conflicted
boolean
required

True when the change current commit still contains unresolved conflicts

message
string
required
author
object
required
committer
object
required
parents
string[]
required
created_at
string<date-time>
required
updated_at
string<date-time>
required