# Set a unique key once per new action; persist it and reuse it for every retry.
: "${REFLECTIONS_KEY:?Set REFLECTIONS_KEY before running this example}"
: "${REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY:?Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example}"
curl --fail-with-body --max-time 30 -X POST 'https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel' \
-H "Authorization: Bearer $REFLECTIONS_KEY" \
-H "Reflections-Version: 2026-10-15" \
-H "Idempotency-Key: $REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY"import { env, exit } from "node:process";
// Set a unique key once per new action; persist it and reuse it for every retry.
const apiKey = env.REFLECTIONS_KEY;
if (!apiKey) throw new Error("Set REFLECTIONS_KEY before running this example");
const idempotencyKey = env.REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY;
if (!idempotencyKey) throw new Error("Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example");
const response = await fetch("https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Reflections-Version": "2026-10-15",
"Idempotency-Key": idempotencyKey,
},
signal: AbortSignal.timeout(30_000),
});
const responseBody = await response.text();
if (!response.ok) {
console.error(`HTTP ${response.status}: ${responseBody}`);
exit(1);
}
console.log(responseBody);
import os
from urllib.error import HTTPError
from urllib.request import Request, urlopen
# Set a unique key once per new action; persist it and reuse it for every retry.
apiKey = os.environ["REFLECTIONS_KEY"]
if not apiKey:
raise ValueError("Set REFLECTIONS_KEY before running this example")
idempotencyKey = os.environ["REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY"]
if not idempotencyKey:
raise ValueError("Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example")
headers = {
"Authorization": f"Bearer {apiKey}",
"Reflections-Version": "2026-10-15",
"Idempotency-Key": idempotencyKey,
}
request = Request("https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel",
method="POST", headers=headers)
try:
with urlopen(request, timeout=30) as response:
print(response.read().decode("utf-8"))
except HTTPError as error:
error_body = error.read().decode("utf-8")
raise RuntimeError(f"HTTP {error.code}: {error_body}") from error
package main
import (
"fmt"
"io"
"net/http"
"os"
"time"
)
func main() {
// Set a unique key once per new action; persist it and reuse it for every retry.
apiKey := os.Getenv("REFLECTIONS_KEY")
if apiKey == "" {
panic("Set REFLECTIONS_KEY before running this example")
}
idempotencyKey := os.Getenv("REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY")
if idempotencyKey == "" {
panic("Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example")
}
request, err := http.NewRequest("POST", "https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel", nil)
if err != nil {
panic(err)
}
request.Header.Set("Authorization", "Bearer " + apiKey)
request.Header.Set("Reflections-Version", "2026-10-15")
request.Header.Set("Idempotency-Key", idempotencyKey)
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
responseBody, err := io.ReadAll(response.Body)
if err != nil {
panic(err)
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
panic(fmt.Sprintf("HTTP %d: %s", response.StatusCode, responseBody))
}
fmt.Print(string(responseBody))
}
{
"id": "chk_x3n8earfjvqsnts9ryqtzet3a4",
"object": "check",
"livemode": true,
"status": "cancelled",
"decision": "escalate",
"talent": [
{
"talent": "tal_9t0wxyhk5zba2q8v1m3n7p4r6s",
"name": "Maya Okafor",
"matched_by": "name",
"confidence": "high",
"decision": "escalate",
"facets": [
"fct_5zba2q8v1m3n7p4r6s9t0wxyhk"
],
"license": "lic_k5zba2q8v1m3n7p4r6s9t0wxyh",
"license_revision": "lrv_p4r6s9t0wxyhk5zba2q8v1m3n7",
"terms_digest": "sha256:39f18c8bef02b5226b9feaa92e526ed30b81b91650d8a10b503281b169f44431",
"escalation": "esc_0m3es8rwstwndrxyxkv3z856zr"
}
],
"use": {
"modality": "image",
"kind": "depiction",
"purpose": "advertising",
"commercial": true,
"channels": [
"social"
],
"territories": [
"US"
]
},
"reasons": [
{
"code": "unverifiable_request",
"stage": "check",
"talent": "tal_9t0wxyhk5zba2q8v1m3n7p4r6s",
"term": "license:lic_k5zba2q8v1m3n7p4r6s9t0wxyh/terms.requiredAttributes",
"sentence": "Keep Maya Okafor the same person: face, skin tone and build unchanged."
}
],
"obligations": [],
"authorization": null,
"escalation": {
"id": "esc_0m3es8rwstwndrxyxkv3z856zr",
"reason": "unverifiable",
"reviewer": "talent",
"status": "cancelled",
"expires_at": "2026-10-26T16:05:00Z",
"resolved_at": "2026-10-20T10:30:00Z",
"note": null
},
"remedy": null,
"request_digest": "sha256:3ae7c80e6bc98eda19b2727e30df26d51342e7a60bacf27c63f25636136c2ae3",
"licensee": "acct_2q8v1m3n7p4r6s9t0wxyhk5zba",
"platform": "acct_7p4r6s9t0wxyhk5zba2q8v1m3n",
"session": null,
"receipt": null,
"metadata": {},
"created_at": "2026-10-19T16:05:00Z"
}{
"type": "https://docs.reflections.ai/errors/invalid_api_key",
"title": "The API key is not valid",
"status": 401,
"code": "invalid_api_key",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/account_not_connected",
"title": "The licensee has not connected your platform",
"status": 403,
"code": "account_not_connected",
"detail": "acct_2q8v1m3n7p4r6s9t0wxyhk5zba has no active connection with your account.",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/resource_not_found",
"title": "No such object",
"status": 404,
"code": "resource_not_found",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/idempotency_key_in_use",
"title": "A request with this key is still running",
"status": 409,
"code": "idempotency_key_in_use",
"detail": "Retry with the same key after a short wait.",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/idempotency_key_reused",
"title": "This key was used for a different request",
"status": 422,
"code": "idempotency_key_reused",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/rate_limited",
"title": "Too many requests",
"status": 429,
"code": "rate_limited",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "invalid_request",
"request_id": "<string>",
"detail": "<string>",
"param": "<string>",
"doc_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "invalid_request",
"request_id": "<string>",
"detail": "<string>",
"param": "<string>",
"doc_url": "<string>"
}Cancel a check
Test mode available. Live mode unavailable. Uses fictional sandbox data only. See Sandbox for the supported forms and limits.
Cancels an escalated check you no longer need, such as when your user leaves. The reviewer
is told, and the check’s status becomes cancelled. Allowed checks can be cancelled to
void their authorization early.
Restricted keys need checks:write.
# Set a unique key once per new action; persist it and reuse it for every retry.
: "${REFLECTIONS_KEY:?Set REFLECTIONS_KEY before running this example}"
: "${REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY:?Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example}"
curl --fail-with-body --max-time 30 -X POST 'https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel' \
-H "Authorization: Bearer $REFLECTIONS_KEY" \
-H "Reflections-Version: 2026-10-15" \
-H "Idempotency-Key: $REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY"import { env, exit } from "node:process";
// Set a unique key once per new action; persist it and reuse it for every retry.
const apiKey = env.REFLECTIONS_KEY;
if (!apiKey) throw new Error("Set REFLECTIONS_KEY before running this example");
const idempotencyKey = env.REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY;
if (!idempotencyKey) throw new Error("Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example");
const response = await fetch("https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Reflections-Version": "2026-10-15",
"Idempotency-Key": idempotencyKey,
},
signal: AbortSignal.timeout(30_000),
});
const responseBody = await response.text();
if (!response.ok) {
console.error(`HTTP ${response.status}: ${responseBody}`);
exit(1);
}
console.log(responseBody);
import os
from urllib.error import HTTPError
from urllib.request import Request, urlopen
# Set a unique key once per new action; persist it and reuse it for every retry.
apiKey = os.environ["REFLECTIONS_KEY"]
if not apiKey:
raise ValueError("Set REFLECTIONS_KEY before running this example")
idempotencyKey = os.environ["REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY"]
if not idempotencyKey:
raise ValueError("Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example")
headers = {
"Authorization": f"Bearer {apiKey}",
"Reflections-Version": "2026-10-15",
"Idempotency-Key": idempotencyKey,
}
request = Request("https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel",
method="POST", headers=headers)
try:
with urlopen(request, timeout=30) as response:
print(response.read().decode("utf-8"))
except HTTPError as error:
error_body = error.read().decode("utf-8")
raise RuntimeError(f"HTTP {error.code}: {error_body}") from error
package main
import (
"fmt"
"io"
"net/http"
"os"
"time"
)
func main() {
// Set a unique key once per new action; persist it and reuse it for every retry.
apiKey := os.Getenv("REFLECTIONS_KEY")
if apiKey == "" {
panic("Set REFLECTIONS_KEY before running this example")
}
idempotencyKey := os.Getenv("REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY")
if idempotencyKey == "" {
panic("Set REFLECTIONS_CANCEL_CHECK_IDEMPOTENCY_KEY before running this example")
}
request, err := http.NewRequest("POST", "https://app.reflections.ai/v1/checks/chk_3pg20xkepkscyp0qbpc4yq7ad2/cancel", nil)
if err != nil {
panic(err)
}
request.Header.Set("Authorization", "Bearer " + apiKey)
request.Header.Set("Reflections-Version", "2026-10-15")
request.Header.Set("Idempotency-Key", idempotencyKey)
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
responseBody, err := io.ReadAll(response.Body)
if err != nil {
panic(err)
}
if response.StatusCode < 200 || response.StatusCode >= 300 {
panic(fmt.Sprintf("HTTP %d: %s", response.StatusCode, responseBody))
}
fmt.Print(string(responseBody))
}
{
"id": "chk_x3n8earfjvqsnts9ryqtzet3a4",
"object": "check",
"livemode": true,
"status": "cancelled",
"decision": "escalate",
"talent": [
{
"talent": "tal_9t0wxyhk5zba2q8v1m3n7p4r6s",
"name": "Maya Okafor",
"matched_by": "name",
"confidence": "high",
"decision": "escalate",
"facets": [
"fct_5zba2q8v1m3n7p4r6s9t0wxyhk"
],
"license": "lic_k5zba2q8v1m3n7p4r6s9t0wxyh",
"license_revision": "lrv_p4r6s9t0wxyhk5zba2q8v1m3n7",
"terms_digest": "sha256:39f18c8bef02b5226b9feaa92e526ed30b81b91650d8a10b503281b169f44431",
"escalation": "esc_0m3es8rwstwndrxyxkv3z856zr"
}
],
"use": {
"modality": "image",
"kind": "depiction",
"purpose": "advertising",
"commercial": true,
"channels": [
"social"
],
"territories": [
"US"
]
},
"reasons": [
{
"code": "unverifiable_request",
"stage": "check",
"talent": "tal_9t0wxyhk5zba2q8v1m3n7p4r6s",
"term": "license:lic_k5zba2q8v1m3n7p4r6s9t0wxyh/terms.requiredAttributes",
"sentence": "Keep Maya Okafor the same person: face, skin tone and build unchanged."
}
],
"obligations": [],
"authorization": null,
"escalation": {
"id": "esc_0m3es8rwstwndrxyxkv3z856zr",
"reason": "unverifiable",
"reviewer": "talent",
"status": "cancelled",
"expires_at": "2026-10-26T16:05:00Z",
"resolved_at": "2026-10-20T10:30:00Z",
"note": null
},
"remedy": null,
"request_digest": "sha256:3ae7c80e6bc98eda19b2727e30df26d51342e7a60bacf27c63f25636136c2ae3",
"licensee": "acct_2q8v1m3n7p4r6s9t0wxyhk5zba",
"platform": "acct_7p4r6s9t0wxyhk5zba2q8v1m3n",
"session": null,
"receipt": null,
"metadata": {},
"created_at": "2026-10-19T16:05:00Z"
}{
"type": "https://docs.reflections.ai/errors/invalid_api_key",
"title": "The API key is not valid",
"status": 401,
"code": "invalid_api_key",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/account_not_connected",
"title": "The licensee has not connected your platform",
"status": 403,
"code": "account_not_connected",
"detail": "acct_2q8v1m3n7p4r6s9t0wxyhk5zba has no active connection with your account.",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/resource_not_found",
"title": "No such object",
"status": 404,
"code": "resource_not_found",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/idempotency_key_in_use",
"title": "A request with this key is still running",
"status": 409,
"code": "idempotency_key_in_use",
"detail": "Retry with the same key after a short wait.",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/idempotency_key_reused",
"title": "This key was used for a different request",
"status": 422,
"code": "idempotency_key_reused",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "https://docs.reflections.ai/errors/rate_limited",
"title": "Too many requests",
"status": 429,
"code": "rate_limited",
"request_id": "req_8f2k4m6p8r0t2v4x6z8b0d2f4h"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "invalid_request",
"request_id": "<string>",
"detail": "<string>",
"param": "<string>",
"doc_url": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "invalid_request",
"request_id": "<string>",
"detail": "<string>",
"param": "<string>",
"doc_url": "<string>"
}Authorizations
Your secret key, rk_test_… or rk_live_…, sent as Authorization: Bearer <key>. Keep it
on your server. Restricted keys carry only the scopes you give them.
Headers
The dated API version. Defaults to the version your account is pinned to.
"2026-10-15"
Act for a connected licensee. The value is the licensee's account ID. Requires an active connection between that account and yours.
^acct_[0-9a-hjkmnp-tv-z]{26}$A unique key for this operation, up to 255 characters. In test mode, POST keys are scoped to your account and mode and bind the endpoint and body for 24 hours. A different endpoint or body with the same key is refused.
Initial live check and generation creation require a nonempty key. Each operation has a
separate account-scoped namespace; retain the same API key, body and idempotency key for
retries within 24 hours of creation. A pending check returns 202 with status: "checking".
Completed checks replay their sealed response; successful generation POSTs replay the
original accepted 202, so use GET for current state. Live verification is a read-only
query that returns a fresh verification ID on each call, without exact response caching.
The broader delegated-account contract also scopes keys to Reflections-Account;
delegated requests and the other planned live POST operations remain unsupported.
255Path Parameters
The check's ID.
^chk_[0-9a-hjkmnp-tv-z]{26}$Response
The cancelled check.
The check's ID, chk_ followed by 26 characters.
^chk_[0-9a-hjkmnp-tv-z]{26}$Always check.
"check"true in live mode, false in test mode.
Where the check is now. An allow can later become consumed, expired or
cancelled; an escalate ends allowed, denied or cancelled.
checking, allowed, denied, escalated, consumed, expired, cancelled allow, deny or escalate. An escalated check's decision becomes allow or deny
when a person decides or the escalation expires. Null while status is checking.
allow, deny, escalate Each protected talent the request invokes, with that talent's own decision and license. Empty when none is found.
Show child attributes
Show child attributes
The use the check decided, as you sent it.
Show child attributes
Show child attributes
Why the use was denied or escalated. Empty on allow.
Show child attributes
Show child attributes
What you must do to proceed. Empty unless decision is allow.
Show child attributes
Show child attributes
Digest of the inputs, use and execution this check decided. Without reuse, the authorization covers only this request; with reuse, it also covers later generations of the same use, talent, execution and end user.
^sha256:[0-9a-f]{64}$When the check was created.
Proof of the allow. Pass token to the tool or provider that generates. Null unless
decision is allow.
Show child attributes
Show child attributes
The escalation, when the check is escalated or was decided by a person. When several
talent are escalated, each has their own, named in talent[].escalation. While the
check is open, this field shows the open one that expires first, so its expires_at is
when the check becomes deny. Once decided, it shows the one that decided: the first
deny or expiry, or the last allow. The others still open are then cancelled.
Show child attributes
Show child attributes
What would change a deny. Null for other decisions, and when no change can help, as
with talent_prohibits.
Show child attributes
Show child attributes
The account that holds the license: the licensee named in Reflections-Account, or your
own account under a platform license.
^acct_[0-9a-hjkmnp-tv-z]{26}$The account that ran the check.
^acct_[0-9a-hjkmnp-tv-z]{26}$The session this check started, for a check run by POST /v1/sessions. Null otherwise.
^ses_[0-9a-hjkmnp-tv-z]{26}$The receipt that records the decision. Null until an escalated check is decided.
^rcpt_[0-9a-hjkmnp-tv-z]{26}$Your metadata from the request.
Show child attributes
Show child attributes