Developer Documentation

Chronosfy API — Python Quickstart

Install requests. Set CHRONOSFY_AUTH to a scoped key or JWT from POST /auth/login.
import os, json, requests
BASE = "https://chronosfy.com/api"
def create(path, body, key):
    response = requests.post(BASE + path, json=body, timeout=30, headers={
        "Authorization": os.environ["CHRONOSFY_AUTH"], "Idempotency-Key": key})
    response.raise_for_status()
    return response.json()
person = create('/crm/persons', json.loads('{"name":"Alice","email":"[email protected]","external_id":"customer-42","metadata":{"source":"integration"}}'), 'person:customer-42:v1')
action = create('/actions', json.loads('{"name":"Monthly reminder","type":"email","template":{"subject":"Reminder","body_html":"<p>Hello</p>"}}'), 'action:reminder:v1')
schedule = json.loads('{"name":"Monthly reminder","subject_type":"person","frequency_config":{"type":"monthly","day":31,"time":"09:00","timezone":"Europe/London"},"client_reference":"subscription-42"}')
schedule.update(action_id=action['id'], subject_id=person['id'])
recurrence = create('/recurrences', schedule, 'recurrence:subscription-42:v1')
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.