{
  "slug": "sdk/curl",
  "title": "cURL examples",
  "description": "Send Cuitty events from any shell with a single curl invocation.",
  "url": "https://cuitty.com/docs/sdk/curl",
  "markdown_url": "https://cuitty.com/docs/sdk/curl.md",
  "json_url": "https://cuitty.com/docs/sdk/curl.json",
  "frontmatter": {
    "title": "cURL examples",
    "description": "Send Cuitty events from any shell with a single curl invocation.",
    "order": 6,
    "section": "SDK",
    "updatedAt": "2026-04-27"
  },
  "headings": [
    {
      "depth": 1,
      "slug": "curl-examples",
      "text": "cURL examples"
    },
    {
      "depth": 2,
      "slug": "send-an-audit-event",
      "text": "Send an audit event"
    },
    {
      "depth": 2,
      "slug": "health-check",
      "text": "Health check"
    },
    {
      "depth": 2,
      "slug": "idempotent-retries",
      "text": "Idempotent retries"
    }
  ],
  "body_markdown": "# cURL examples\n\nFor one-off scripts, CI hooks, and shell-only environments, the wire protocol is reachable from a plain `curl`.\n\n## Send an audit event\n\n```bash\nBODY='{\n  \"events\": [{\n    \"type\": \"audit\",\n    \"ts\": \"2026-04-27T12:34:56Z\",\n    \"data\": {\n      \"actor\": \"alice@example.com\",\n      \"action\": \"secret.rotate\",\n      \"resource\": \"stripe.live_key\"\n    }\n  }]\n}'\n\nSIG=$(printf '%s' \"$BODY\" \\\n  | openssl dgst -sha256 -hmac \"$CUITTY_WEBHOOK_SECRET\" -hex \\\n  | awk '{print $2}')\n\ncurl -X POST https://app.cuitty.com/api/ingest \\\n  -H \"Authorization: Bearer $CUITTY_API_KEY\" \\\n  -H \"X-Cuitty-Signature: $SIG\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"$BODY\"\n```\n\n## Health check\n\n```bash\ncurl https://app.cuitty.com/api/health\n```\n\n## Idempotent retries\n\nAdd an `X-Cuitty-Idempotency-Key` header (any UUID). The portal deduplicates retries with the same key for 24 hours.\n\n```bash\ncurl -X POST https://app.cuitty.com/api/ingest \\\n  -H \"X-Cuitty-Idempotency-Key: $(uuidgen)\" \\\n  ...\n```",
  "links_out": []
}