Skip to content

Approve a request as an endorsement

PUT
/api/v1/approvals/{id}/approve
curl --request PUT \
--url https://api.pkgplease.com/api/v1/approvals/example/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "temporary": true, "justification": "example" }'

Writes or widens an entry in the org's org-endorsements pack through the same guarded write path used by POST .../packs/{slug}/entries, with the request's justification as the entry's reason — the next agent reads the decision instead of hitting an unexplained exception. If temporary is true, the approval itself expires in 24h. Approving never inserts a second, overlapping entry for a package the org already endorses: an existing entry's range is widened instead.

id
required
string
Media typeapplication/json
object
temporary
boolean
justification

Becomes the endorsement entry's reason.

string
Examplegenerated
{
"temporary": true,
"justification": "example"
}

Approved

Approval not found

Media typeapplication/json
object
error
required
string
Examplegenerated
{
"error": "example"
}