Skip to main content
POST
/
attestations
/
{org}
/
{flow_name}
/
trail
/
{trail_name}
/
pull_request
Attest pull request
curl --request POST \
  --url https://app.kosli.com/api/v2/attestations/{org}/{flow_name}/trail/{trail_name}/pull_request \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'data_json={
  "attestation_name": "<string>",
  "git_provider": "github",
  "pull_requests": [
    {
      "url": "<string>",
      "state": "<string>",
      "merge_commit": "<string>",
      "approvers": [
        "<string>"
      ]
    }
  ],
  "origin_url": "<string>",
  "description": "<string>",
  "artifact_fingerprint": "<string>",
  "target_artifacts": [
    "<string>"
  ],
  "git_commit_info": {
    "sha1": "<string>",
    "message": "<string>",
    "author": "<string>",
    "author_username": "<string>",
    "branch": "<string>",
    "timestamp": 123,
    "url": "<string>",
    "parents": [
      "<string>"
    ]
  },
  "repo_info": {
    "name": "<string>",
    "url": "<string>",
    "id": "<string>",
    "description": "<string>",
    "provider": "github"
  },
  "external_urls": {},
  "annotations": {},
  "user_data": {}
}' \
  --form 'attachment_file=<string>'

Authorizations

Authorization
string
header
required

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

Path Parameters

flow_name
string
required
trail_name
string
required
org
string
required

Body

multipart/form-data
data_json
PullRequestAttestationPostInput · object
required

Attestation data in JSON format

Example:
{
  "attestation_name": "pr",
  "git_commit_info": {
    "author": "Jon Smith <jon@smith.com>",
    "branch": "main",
    "message": "adding glorious commit",
    "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6",
    "timestamp": 1750923680,
    "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6"
  },
  "git_provider": "github",
  "pull_requests": [
    {
      "approvers": [
        {
          "author": "Jon Doe",
          "state": "APPROVED",
          "timestamp": 1750923266
        }
      ],
      "author": "JonSmith",
      "commits": [
        {
          "author": "Jon Smith <jon@smith.com>",
          "author_username": "JonSmith",
          "branch": "glorious-branch",
          "message": "Add glorious feature",
          "sha": "f387a894992f7991489680696abf8b72bf7875f1",
          "timestamp": 1750851568,
          "url": "https://github.com/org/repo/commit/f387a894992f7991489680696abf8b72bf7875f1"
        },
        {
          "author": "Jon Smith <jon@smith.com>",
          "author_username": "JonSmith",
          "branch": "glorious-branch",
          "message": "Update glorious feature",
          "sha": "2d48854228633cca94f7f4a587b2172ebb01cf85",
          "timestamp": 1750922905
        }
      ],
      "created_at": 1750851601,
      "head_ref": "glorious-branch",
      "merge_commit": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6",
      "merged_at": 1750923680,
      "state": "MERGED",
      "title": "Add glorious commit",
      "url": "https://github.com/org/repo/pull/3497"
    }
  ],
  "user_data": {}
}
attachment_file
string | null

Optional attachment file (max size: 10MB)

Response

Creation Success

Last modified on April 9, 2026