Welcome to Indent!
Indent makes it easy to add approvals wherever you need them, use a POST request to kick off an approval request and another to approve them.
End-to-End Example
Get Your API Keys→app/api/indent/route.ts
const spaceName = "";
const accessToken = "";
const petition = {
petitioners: [{
kind: "user",
displayName: "Example User",
email: "user@example.com"
}],
resources: [{
kind: "group",
id: "example-group-123",
displayName: "Example Group 123"
}],
reason: "sampleReason",
};
const response = await fetch(
`https://platform.marble.indent.services/v1/spaces/${spaceName}/petitions`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${accessToken}`
},
body: JSON.stringify({ petition })
}
)
Response200
// Click above to run the request