Approvals
Some changes don’t happen straight away. They wait for a person in your team to approve them in Olamma.
When it happens
- Every write by a key whose access to that app is Ask first.
- Actions that can’t be undone, such as Delete view, whatever the key’s access.
What you get
Instead of the result, the call answers 202:
Response 202
{
"status": "awaiting_approval",
"approvalId": "ap_854cc3e506f4f852",
"expiresAt": "2026-12-08T09:30:00Z",
"decidedBy": "Project contributors and leads",
"preview": { "title": "Delete view", "summary": "Delete this view and revoke its public link. This cannot be undone." }
}approvalId | The request waiting in Olamma. |
decidedBy | Who can approve it. |
expiresAt | When it lapses if nobody decides, usually a week later. |
preview | What the approver sees. |
What happens next
The people who can decide are emailed and approve or decline it under Approvals in Olamma. Nothing changes until someone approves it. Don’t send the same change again while it waits: that would add a second request.
Check back
Keep the approvalId and ask with Get approval. Once it’s done, result holds what the endpoint would have returned straight away.
curl "https://api.olamma.sh/v1/w/your-workspace/approvals/ap_854cc3e506f4f852" \
-H "Authorization: Bearer $OLAMMA_KEY"const response = await fetch(`https://api.olamma.sh/v1/w/your-workspace/approvals/ap_854cc3e506f4f852`, {
headers: {
Authorization: `Bearer ${process.env.OLAMMA_KEY}`,
},
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.error.code}: ${data.error.message}`);import os
import requests
response = requests.get(
"https://api.olamma.sh/v1/w/your-workspace/approvals/ap_854cc3e506f4f852",
headers={"Authorization": f"Bearer {os.environ['OLAMMA_KEY']}"},
timeout=30,
)
data = response.json()
response.raise_for_status()pending | Still waiting for a person. Check again later; every few minutes is plenty. |
done | Approved and made. Read result. |
declined, expired, cancelled | Nothing changed. reason says why, when the approver gave one. |
stale | What it changes moved on since you proposed it. A person can refresh it in Olamma, or you can propose it again. |
failed, unknown | It was approved but didn’t go through, or might not have. Read error, and check the target before trying again. |
To see everything your key proposed that’s still waiting, use List approvals; add status=decided for the rest.