Approvals
When a check answers ask, the user gets an approval link. These endpoints read their answer. Prefer the approval.approved and approval.declined webhooks in production.
Whether the user approved or declined
GET/v1/approvals/{id}Secret key · scope approvals:read
Parameters
| Name | In | Description |
|---|---|---|
id required | path | Approval idpattern ^apv_[\w-]{6,40}$ |
Returns
| Field | Type | Description |
|---|---|---|
object | "approval" | |
id | string | |
check | string | |
status | "pending" | "approved" | "declined" | "expired" | |
reasons | array of string |
Errors
Errors return {"error": {"code", "message", "field", "request_id"}} with a 4xx or 5xx status. See Errors.
curl https://thewavly.com/v1/approvals/chk_P1iENx01EDRJ \
-H "Authorization: Bearer $WAVLY_API_KEY"import { Wavly } from "@thewavly/sdk";
const wavly = new Wavly(process.env.WAVLY_API_KEY);
const result = await wavly.request("GET", "/v1/approvals/chk_P1iENx01EDRJ");from thewavly import Wavly
wavly = Wavly(os.environ["WAVLY_API_KEY"])
result = wavly.request("GET", "/v1/approvals/chk_P1iENx01EDRJ")Response
{
"id": "chk_P1iENx01EDRJ",
"check": "chk_P1iENx01EDRJ",
"status": "paid"
}