Developer Documentation

Chronosfy API — curl Quickstart

Requires curl; set AUTH to "ApiKey ..." or "Bearer ..." from POST /auth/login.
BASE='https://chronosfy.com/api'
curl --fail-with-body "$BASE/crm/persons" -H "Authorization: $AUTH" -H 'Content-Type: application/json' -H 'Idempotency-Key: person:customer-42:v1' -d '{"name":"Alice","email":"[email protected]","external_id":"customer-42","metadata":{"source":"integration"}}'
curl --fail-with-body "$BASE/actions" -H "Authorization: $AUTH" -H 'Content-Type: application/json' -H 'Idempotency-Key: action:reminder:v1' -d '{"name":"Monthly reminder","type":"email","template":{"subject":"Reminder","body_html":"<p>Hello</p>"}}'
# Use the returned IDs as PERSON_ID and ACTION_ID, then create the recurrence:
curl --fail-with-body "$BASE/recurrences" -H "Authorization: $AUTH" -H 'Content-Type: application/json' -H 'Idempotency-Key: recurrence:subscription-42:v1' -d '{"name":"Monthly reminder","subject_type":"person","frequency_config":{"type":"monthly","day":31,"time":"09:00","timezone":"Europe/London"},"client_reference":"subscription-42","action_id":"ACTION_ID","subject_id":"PERSON_ID"}'
Use a scoped API key or a JWT from POST /auth/login. Keep one stable key per logical request, including after a timeout or process restart. Changing the payload with the same key returns 409. Create keys are optional for persons/actions/recurrences, required for payment links. MCP uses request_key. external_id is unique among active persons in a tenant; client_reference is a non-unique business reference. For one-off purchases, recurring enrollment or standalone card storage, see /docs/quickstart/checkout for the hosted URL and embedded SDK. For a direct Stripe Elements setup, configure a verified PSP and use /payment/setup-intent with Stripe.js. Checkout can save a card with save_payment_method; first_run_at sets the earliest automatic recurrence. See /docs/quickstart/renewals for the complete HTTP/MCP flow, permissions and recovery. A 502/unknown outcome must reuse the original key, never create another payment identity.