> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clawb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrating /v1/check

Your relying service should call `/v1/check` immediately before sensitive operations.

## Auth

<CodeGroup>
  ```http HTTP theme={null}
  X-Clawb-Api-Key: ck_live_...
  ```
</CodeGroup>

For `action: "send_email"`, include `email` object fields so policy constraints can evaluate recipients and attachments.

<CodeGroup>
  ```bash curl theme={null}
  curl -sS -X POST "https://api.clawb.ai/api/v1/check" \
    -H "Content-Type: application/json" \
    -H "X-Clawb-Api-Key: ck_live_replace_me" \
    -d '{
      "agent_id": "agt_replace_me",
      "policy_id": "pol_default",
      "action": "refund",
      "context": {
        "amount": 49.0,
        "currency": "USD",
        "reason": "late_delivery"
      }
    }'
  ```

  ```python Python SDK theme={null}
  from clawb_agent_sdk import ClawbClient, WorkspaceControlPlane

  client = ClawbClient(base_url="https://api.clawb.ai/api")
  provider = WorkspaceControlPlane(client=client, api_key="ck_live_...")

  decision = provider.check(
      agent_id="agt_01...",
      policy_id="pol_default",
      action="refund",
      context={"amount": 49.0, "currency": "USD"},
  )

  if decision["decision"] == "allow":
      # Execute the business action.
      pass
  elif decision["decision"] == "challenge":
      # Route to approval workflow.
      pass
  else:
      # Deny safely.
      pass
  ```
</CodeGroup>

## Response

<CodeGroup>
  ```json JSON theme={null}
  {
    "decision": "allow",
    "confidence": 0.9,
    "reasons": ["agent_key_attested"]
  }
  ```
</CodeGroup>

When challenged:

<CodeGroup>
  ```json JSON theme={null}
  {
    "decision": "challenge",
    "challenge": {"type": "attest", "url": "..."}
  }
  ```
</CodeGroup>

## Related docs

* [Workspace integration flow](/integration/workspace-flow)
* [Enterprise policy sync API](/api-reference/policies-sync)
* [Identity credential APIs](/api-reference/identity-credentials)
