Skip to main content
POST
/
api
/
repos
/
{repo_name}
/
notes
curl --request POST \ --url https://api.{cluster}.code.storage/api/repos/{repo_name}/notes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "action": "append", "author": { "email": "review@example.com", "name": "Review Bot" }, "note": "Deployment complete.", "sha": "b003fc78805954584e1ee364a4ad39d7c79e819a" } '
{
  "base_commit": "0c8b5bb9d550d58fcfd651a4fdce8024ef7f1492",
  "new_ref_sha": "3a1d9f7d6b6d482c970554e2a6ef980ecf4f1d55",
  "result": {
    "status": "ok",
    "success": true
  },
  "sha": "b003fc78805954584e1ee364a4ad39d7c79e819a",
  "target_ref": "refs/notes/commits"
}

Documentation Index

Fetch the complete documentation index at: https://code.storage/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Path Parameters

repo_name
string
required

Repository name. Names that contain / or any other character that is not safe in a URL path segment must be URL encoded so the value occupies a single path segment. For example pierre/example is sent as pierre%2Fexample. Plain names such as example can be sent as-is. The server URL-decodes the value before resolving the repository.

Body

application/json

Create, replace, or append a Git note for the supplied SHA. When action is omitted the server behaves as though add was supplied.

Notes write request describing the commit, the action (add, append, or remove), the note content, and optional concurrency guard.

sha
string
required

Git object SHA to attach the note to.

Example:

"b003fc78805954584e1ee364a4ad39d7c79e819a"

action
string
default:add

add replaces any existing note. append adds new text to the existing note body.

author
object

Author object with name and email for the notes commit.

expected_ref_sha
string

Optional compare-and-swap guard for the notes ref.

note
string

Plain-text note content. Required for add and append.

Response

Note update applied to the notes ref.

Result of a notes write operation, including the resulting notes ref state.

new_ref_sha
string
required

New notes ref SHA after the operation.

Example:

"3a1d9f7d6b6d482c970554e2a6ef980ecf4f1d55"

result
object
required

Operation result with success, status, and optional message.

sha
string
required

The commit SHA the note is attached to.

Example:

"b003fc78805954584e1ee364a4ad39d7c79e819a"

target_ref
string
required

The notes reference (refs/notes/commits).

Example:

"refs/notes/commits"

base_commit
string

Previous notes ref commit SHA.

Example:

"0c8b5bb9d550d58fcfd651a4fdce8024ef7f1492"