Approve and allowlist a package
PUT
/api/v1/approvals/{id}/approve
const url = 'https://api.pkgplease.com/api/v1/approvals/example/approve';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"temporary":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 }'Atomically approves the request and inserts an allowlist entry. If temporary is true, the allowlist entry expires in 24h.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
temporary
boolean
Examplegenerated
{ "temporary": true}Responses
Section titled “Responses”Approved
Approval not found
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}