Sakhaa Center

Capture API request examples

Capture one synthetic person with cURL, JavaScript, or Python.

For
Integration developers
Owner
Integration engineering
Outcome
Capture one synthetic person exactly once with the supported language or command.
Last verified
2026-08-30
Next review
2026-11-28
Status
supported

The examples send the same supported request. Use synthetic data first. Replace placeholders only in a server-side environment.

cURL example

  • Use a new idempotency key for a new logical person capture.
curl -X POST 'https://crm.sakhaa.ai/api/v1/capture/person' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'X-API-Secret: YOUR_API_SECRET' \
  -H 'Idempotency-Key: example-person-001' \
  -d '{"name":"API Test Person","email":"api-test@example.invalid"}'

JavaScript example

  • Keep both credentials in server-side environment variables or a managed secret store.
const response = await fetch('https://crm.sakhaa.ai/api/v1/capture/person', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': process.env.SAKHAA_CAPTURE_KEY,
    'X-API-Secret': process.env.SAKHAA_CAPTURE_SECRET,
    'Idempotency-Key': 'example-person-001',
  },
  body: JSON.stringify({
    name: 'API Test Person',
    email: 'api-test@example.invalid',
  }),
});

if (!response.ok) throw new Error(`Capture failed: ${response.status}`);
const result = await response.json();

Python example

  • Set a bounded timeout and handle each documented error status.
import os
import requests

response = requests.post(
    'https://crm.sakhaa.ai/api/v1/capture/person',
    headers={
        'X-API-Key': os.environ['SAKHAA_CAPTURE_KEY'],
        'X-API-Secret': os.environ['SAKHAA_CAPTURE_SECRET'],
        'Idempotency-Key': 'example-person-001',
    },
    json={
        'name': 'API Test Person',
        'email': 'api-test@example.invalid',
    },
    timeout=15,
)
response.raise_for_status()
result = response.json()

On this page