{"openapi":"3.1.0","info":{"title":"Arraxis API","version":"1.0.0","description":"Create and read leads, move a lead's stage, add notes, and subscribe to events. JSON, snake_case, ISO 8601 UTC instants, RFC 9457 errors. Send the key as Authorization: Bearer <key>; make keys in Settings, Lead sources, Keys for other apps."},"servers":[{"url":"https://app.arraxis.site/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"arx_live_…"}},"schemas":{"ApiProblem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"enum":["invalid_request","unauthorized","forbidden","not_found","idempotency_conflict","idempotency_in_progress","conflict","stage_not_allowed","payload_too_large","unsupported_media_type","validation_failed","rate_limited","internal_error"]},"request_id":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The offending field, e.g. phone or custom.preferred_time"},"code":{"type":"string"},"message":{"type":"string"}},"required":["field","code","message"]}}},"required":["type","title","status","detail","code","request_id"],"description":"RFC 9457 problem details, content-type application/problem+json."},"ApiWhoami":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"}},"required":["id","name","slug","timezone","currency"]},"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"enum":["leads:read","leads:write","hooks:manage"]}}},"required":["id","name","prefix","scopes"]},"api_version":{"const":"v1"},"server_time":{"type":"string","format":"date-time"}},"required":["workspace","key","api_version","server_time"]},"ApiStage":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"position":{"type":"integer"},"is_open":{"type":"boolean"},"next":{"type":["array","null"],"items":{"type":"string"}},"requires":{"type":"object","properties":{"datetime":{"type":"boolean"},"value":{"type":"boolean"},"reason":{"type":"boolean"},"service":{"type":"boolean"}},"required":["datetime","value","reason","service"]}},"required":["key","name","kind","position","is_open","next","requires"]},"ApiSourceRef":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"}},"required":["id","key","name","kind"]},"ApiField":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"},"options":{"type":["array","null"],"items":{"type":"string"}}},"required":["key","label","type","required","options"]},"ApiLead":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"The lead's page in Arraxis."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"received_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"phone":{"type":["string","null"]},"phone_raw":{"type":["string","null"]},"email":{"type":["string","null"]},"city":{"type":["string","null"]},"gender":{"type":["string","null"]},"age":{"type":["string","null"]},"stage":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"}},"required":["key","name","kind"]},"source":{"oneOf":[{"$ref":"#/components/schemas/ApiSourceRef"},{"type":"null"}]},"owner":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"]},{"type":"null"}]},"service_interest":{"type":["string","null"]},"service":{"type":["string","null"]},"location":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true},"value":{"oneOf":[{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"required":["amount","currency"]},{"type":"null"}]},"booked_at":{"type":["string","null"],"format":"date-time"},"landed_at":{"type":["string","null"],"format":"date-time"},"won_at":{"type":["string","null"],"format":"date-time"},"lost_at":{"type":["string","null"],"format":"date-time"},"next_action_at":{"type":["string","null"],"format":"date-time"},"external_id":{"type":["string","null"]},"attribution":{"type":"object","additionalProperties":{"type":"string"}},"answers":{"type":"object","additionalProperties":{"type":"string"}},"ads":{"type":"object","properties":{"platform":{"type":["string","null"]},"campaign_id":{"type":["string","null"]},"campaign_name":{"type":["string","null"]},"adset_id":{"type":["string","null"]},"ad_id":{"type":["string","null"]},"form_id":{"type":["string","null"]}}},"duplicate_of":{"type":["string","null"]}},"required":["id","url","created_at","updated_at","received_at","name","phone","email","stage","source","owner","tags","custom","attribution","answers","ads"]},"ApiLeadRef":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"}},"required":["id","url"],"description":"What a key WITHOUT leads:read gets back from write calls, so a write-only key can never read leads through writes."},"ApiLeadCreate":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"phone":{"type":"string","description":"Any format; normalised to E.164 when it can be, kept as typed otherwise."},"email":{"type":"string"},"city":{"type":"string","maxLength":80},"gender":{"enum":["female","male","other"]},"age":{"type":"string"},"service":{"type":"string","description":"What the form said (free text).","maxLength":200},"location":{"type":"string","description":"Must equal a location of the workspace (case does not matter)."},"note":{"type":"string","maxLength":2000},"source":{"type":"string","description":"A key of GET /sources. Default: api."},"external_id":{"type":"string","description":"Your own id, unique per source. A repeat on the same source returns the same lead with outcome duplicate.","maxLength":200},"received_at":{"type":"string","format":"date-time","description":"Backdates the lead. More than 24 hours ago (or historical: true) skips automations and notifications."},"owner_email":{"type":"string","description":"An active team member."},"historical":{"type":"boolean"},"custom":{"type":"object","additionalProperties":true,"description":"Keys of GET /fields."},"attribution":{"type":"object","additionalProperties":{"type":"string"},"description":"utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_id, gclid, wbraid, gbraid, dclid, fbclid, fbc, fbp, msclkid, ttclid, page_url, landing_url, referrer. Google click ids must match ^[A-Za-z0-9_-]{1,256}$."}},"description":"At least one of phone or email."},"ApiLeadCreateResponse":{"type":"object","properties":{"outcome":{"enum":["created","merged","duplicate"]},"lead":{"oneOf":[{"$ref":"#/components/schemas/ApiLead"},{"$ref":"#/components/schemas/ApiLeadRef"}],"description":"The full ApiLead only for a key that also holds leads:read; otherwise ApiLeadRef."}},"required":["outcome","lead"]},"ApiStageChange":{"type":"object","properties":{"stage":{"type":"string","description":"A key of GET /stages."},"date":{"type":"string","description":"YYYY-MM-DD"},"time":{"type":"string","description":"HH:MM, workspace time zone"},"amount":{"type":"number"},"reason":{"type":"string"},"service":{"type":"string"},"location":{"type":"string"},"note":{"type":"string"},"host_email":{"type":"string"},"override":{"type":"boolean","description":"Forces a move the pipeline forbids."}},"required":["stage"]},"ApiNoteCreate":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["text"]},"ApiNote":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"text":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","lead_id","text","created_at"]},"ApiHook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Returned once, when the hook is created."}},"required":["id","url","events","enabled","created_at"]},"ApiHookCreate":{"type":"object","properties":{"url":{"type":"string","description":"https, a public host."},"events":{"type":"array","items":{"enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.note_added","lead.reinquiry","lead.merged","appointment.booked","appointment.rescheduled","appointment.cancelled","appointment.completed","appointment.no_show","appointment.confirmed","ping","*"]},"minItems":1},"name":{"type":"string"}},"required":["url","events"]},"ApiAppointment":{"type":"object","properties":{"id":{"type":"string"},"lead_id":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"status":{"type":"string"},"host":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}}},{"type":"null"}]},"service":{"type":["string","null"]},"location":{"type":["string","null"]}},"required":["id","lead_id","starts_at","ends_at","timezone","status"]},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"evt_<id>; the same for every endpoint and every retry."},"type":{"enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.note_added","lead.reinquiry","lead.merged","appointment.booked","appointment.rescheduled","appointment.cancelled","appointment.completed","appointment.no_show","appointment.confirmed","ping"]},"timestamp":{"type":"string","format":"date-time"},"workspace_id":{"type":"string"},"actor":{"type":"object","properties":{"kind":{"enum":["member","api_key","integration","contact","system","automation","import"]},"api_key_id":{"type":"string"}},"required":["kind"]},"data":{"type":"object","properties":{"lead":{"oneOf":[{"$ref":"#/components/schemas/ApiLead"},{"type":"null"}]},"appointment":{"oneOf":[{"$ref":"#/components/schemas/ApiAppointment"},{"type":"null"}]},"note":{"oneOf":[{"type":"object","properties":{"text":{"type":"string"}}},{"type":"null"}]},"change":{"oneOf":[{"type":"object","properties":{"from":{"type":["string","null"]},"to":{"type":["string","null"]},"amount":{"type":["number","null"]},"reason":{"type":["string","null"]},"fields":{"type":"array","items":{"type":"string"}}}},{"type":"null"}]}},"required":["lead"]}},"required":["id","type","timestamp","workspace_id","actor","data"]}},"parameters":{"Limit":{"name":"limit","in":"query","description":"How many rows, 1 to 100 (default 25).","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"Cursor":{"name":"cursor","in":"query","description":"The next_cursor of the previous page. Use it only with the same filters.","required":false,"schema":{"type":"string"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"1 to 200 visible characters. The same key with the same body replays the first answer (header Idempotency-Replayed: true) for 24 hours.","schema":{"type":"string"}}},"responses":{"invalid_request":{"description":"The request is not valid. The body is not JSON, is not an object, a query value is wrong, a cursor is wrong, or the key was sent in the address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"unauthorized":{"description":"Missing or invalid API key. The Authorization header is missing, the key is not valid, was switched off, has expired or is paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"forbidden":{"description":"This key cannot do that. The key lacks the permission for this call, or the workspace is not active.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"not_found":{"description":"Not found. The id does not exist, or belongs to another workspace (never 403: ids cannot be probed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"idempotency_conflict":{"description":"Idempotency-Key reused with a different request. The same Idempotency-Key was sent with a different method, path or body.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"idempotency_in_progress":{"description":"The first request with this Idempotency-Key is still running. Retry after the Retry-After seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"conflict":{"description":"Conflict. The lead changed at the same moment, a booked time was just taken, the source is paused, or a limit was reached.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"stage_not_allowed":{"description":"This stage move is not allowed. The pipeline forbids the move. Send override: true to force it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"payload_too_large":{"description":"Request body too large. The body is over 64 KB.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"unsupported_media_type":{"description":"Send JSON. A write was sent without Content-Type: application/json.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"validation_failed":{"description":"Some fields are not valid. One or more fields are wrong; errors[] lists each with the field name.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"rate_limited":{"description":"Too many requests. The per-key limit (120 requests a minute by default) or the bad-key limit was reached. Wait Retry-After seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}},"internal_error":{"description":"Something went wrong. An unexpected error. Quote request_id when you contact support.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ApiProblem"}}}}}},"paths":{"/whoami":{"get":{"operationId":"whoami","summary":"Who this key is","description":"Any valid key. Use it as the connection test.","x-arraxis-scope":"any","responses":{"200":{"description":"The workspace and the key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiWhoami"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/leads":{"get":{"operationId":"listLeads","summary":"List leads, newest first","x-arraxis-scope":"leads:read","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","description":"received_at (default) or updated_at; always newest first.","required":false,"schema":{"enum":["received_at","updated_at"]}},{"name":"stage","in":"query","description":"Comma list of stage keys (at most 20).","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","description":"Comma list of source keys (at most 20); meta also matches each Meta form.","required":false,"schema":{"type":"string"}},{"name":"owner_email","in":"query","description":"One member's email; none = unassigned.","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Name, email or phone contains (at most 100 characters).","required":false,"schema":{"type":"string"}},{"name":"phone","in":"query","description":"Exact phone, normalised with the workspace's region.","required":false,"schema":{"type":"string"}},{"name":"email","in":"query","description":"Exact email, any case.","required":false,"schema":{"type":"string"}},{"name":"received_since","in":"query","description":"ISO instant, inclusive.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"received_before","in":"query","description":"ISO instant, exclusive.","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"updated_since","in":"query","description":"ISO instant: the polling filter for Zapier and Make.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"A page of leads.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiLead"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more","next_cursor"]}}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/rate_limited"}}},"post":{"operationId":"createLead","summary":"Create a lead","description":"Goes through the same intake core as every other source: duplicates, attribution, assignment and notifications work the same. A lead with the same phone as an open lead becomes a re-enquiry (outcome merged).","x-arraxis-scope":"leads:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiLeadCreate"},"example":{"name":"Alex Morgan","phone":"+1 555 0100","email":"alex.morgan@example.com","service":"Consultation","location":"Downtown","source":"api","external_id":"typeform-8812","attribution":{"utm_source":"facebook"}}}}},"responses":{"200":{"description":"merged (a re-enquiry on the contact's open lead) or duplicate (the same external_id on the same source, or a replay).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiLeadCreateResponse"}}}},"201":{"description":"Created. Location: /api/v1/leads/{id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiLeadCreateResponse"},"example":{"outcome":"created","lead":{"id":"6f1c2d0e-8a41-4b7e-9c55-3e2f1a9b7c10","url":"https://app.arraxis.site/leads/6f1c2d0e-8a41-4b7e-9c55-3e2f1a9b7c10","created_at":"2026-09-30T09:12:44.120Z","updated_at":"2026-09-30T09:12:44.120Z","received_at":"2026-09-30T09:12:44.120Z","name":"Alex Morgan","phone":"+15550100","phone_raw":"+1 555 0100","email":"alex.morgan@example.com","city":null,"gender":null,"age":null,"stage":{"key":"new","name":"New","kind":"new"},"source":{"id":"a41f0b7c-0000-4000-8000-000000000001","key":"api","name":"API","kind":"api"},"owner":null,"service_interest":"Consultation","service":null,"location":"Downtown","tags":[],"custom":{"preferred_time":"Morning"},"value":null,"booked_at":null,"landed_at":null,"won_at":null,"lost_at":null,"next_action_at":"2026-09-30T09:12:44.120Z","external_id":"typeform-8812","attribution":{"utm_source":"facebook","utm_campaign":"autumn-offer"},"answers":{},"ads":{"platform":null,"campaign_id":null,"campaign_name":null,"adset_id":null,"ad_id":null,"form_id":null},"duplicate_of":null}}}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"409":{"$ref":"#/components/responses/idempotency_conflict"},"413":{"$ref":"#/components/responses/payload_too_large"},"415":{"$ref":"#/components/responses/unsupported_media_type"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/leads/{id}":{"get":{"operationId":"getLead","summary":"One lead","description":"A merged lead answers with its survivor and the header Arraxis-Merged-Into.","x-arraxis-scope":"leads:read","parameters":[{"name":"id","in":"path","description":"The lead's id.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The lead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiLead"},"example":{"id":"6f1c2d0e-8a41-4b7e-9c55-3e2f1a9b7c10","url":"https://app.arraxis.site/leads/6f1c2d0e-8a41-4b7e-9c55-3e2f1a9b7c10","created_at":"2026-09-30T09:12:44.120Z","updated_at":"2026-09-30T09:12:44.120Z","received_at":"2026-09-30T09:12:44.120Z","name":"Alex Morgan","phone":"+15550100","phone_raw":"+1 555 0100","email":"alex.morgan@example.com","city":null,"gender":null,"age":null,"stage":{"key":"new","name":"New","kind":"new"},"source":{"id":"a41f0b7c-0000-4000-8000-000000000001","key":"api","name":"API","kind":"api"},"owner":null,"service_interest":"Consultation","service":null,"location":"Downtown","tags":[],"custom":{"preferred_time":"Morning"},"value":null,"booked_at":null,"landed_at":null,"won_at":null,"lost_at":null,"next_action_at":"2026-09-30T09:12:44.120Z","external_id":"typeform-8812","attribution":{"utm_source":"facebook","utm_campaign":"autumn-offer"},"answers":{},"ads":{"platform":null,"campaign_id":null,"campaign_name":null,"adset_id":null,"ad_id":null,"form_id":null},"duplicate_of":null}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/leads/{id}/stage":{"post":{"operationId":"changeStage","summary":"Move a lead to a stage","description":"The stage's requires (see GET /stages) decide which of date, time, amount, reason and service are needed. Sending the current stage again is a no-op. A key without leads:read gets ApiLeadRef back.","x-arraxis-scope":"leads:write","parameters":[{"name":"id","in":"path","description":"The lead's id.","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiStageChange"},"example":{"stage":"booked","date":"2026-10-02","time":"11:00","service":"Consultation"}}}},"responses":{"200":{"description":"The lead after the move.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ApiLead"},{"$ref":"#/components/schemas/ApiLeadRef"}]}}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/stage_not_allowed"},"413":{"$ref":"#/components/responses/payload_too_large"},"415":{"$ref":"#/components/responses/unsupported_media_type"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/leads/{id}/notes":{"post":{"operationId":"addNote","summary":"Add a note to a lead","x-arraxis-scope":"leads:write","parameters":[{"name":"id","in":"path","description":"The lead's id.","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiNoteCreate"},"example":{"text":"Called back, will decide on Friday."}}}},"responses":{"201":{"description":"The note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiNote"}}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"413":{"$ref":"#/components/responses/payload_too_large"},"415":{"$ref":"#/components/responses/unsupported_media_type"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/stages":{"get":{"operationId":"listStages","summary":"The stages of the default pipeline, in order","x-arraxis-scope":"leads:read","responses":{"200":{"description":"Stages.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiStage"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more","next_cursor"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/sources":{"get":{"operationId":"listSources","summary":"The lead sources of the workspace","description":"Use a key as the source of POST /leads.","x-arraxis-scope":"leads:read","responses":{"200":{"description":"Sources.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiSourceRef"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more","next_cursor"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/fields":{"get":{"operationId":"listFields","summary":"The custom lead fields","description":"Keys of the custom object of POST /leads.","x-arraxis-scope":"leads:read","responses":{"200":{"description":"Fields.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiField"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more","next_cursor"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/hooks":{"get":{"operationId":"listHooks","summary":"The addresses this key registered for events","x-arraxis-scope":"hooks:manage","responses":{"200":{"description":"Hooks (no secrets).","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiHook"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more","next_cursor"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/rate_limited"}}},"post":{"operationId":"createHook","summary":"Register an address for events (REST hook subscribe)","description":"The signing secret is returned once.","x-arraxis-scope":"hooks:manage","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiHookCreate"},"example":{"url":"https://hooks.zapier.com/hooks/standard/123/abc/","events":["lead.created"]}}}},"responses":{"201":{"description":"Registered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiHook"}}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"409":{"$ref":"#/components/responses/conflict"},"413":{"$ref":"#/components/responses/payload_too_large"},"415":{"$ref":"#/components/responses/unsupported_media_type"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/hooks/{id}":{"delete":{"operationId":"deleteHook","summary":"Unregister an address (REST hook unsubscribe)","description":"Only hooks this key created; asking again answers 404.","x-arraxis-scope":"hooks:manage","parameters":[{"name":"id","in":"path","description":"The lead's id.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Unregistered."},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/hooks/sample":{"get":{"operationId":"sampleEvents","summary":"Example events for a type","description":"An array (not a list object) of up to 3 events of exactly the delivered shape, for an app's editor.","x-arraxis-scope":"hooks:manage or leads:read","parameters":[{"name":"event","in":"query","description":"An event type, e.g. lead.created.","required":true,"schema":{"enum":["lead.created","lead.updated","lead.stage_changed","lead.assigned","lead.note_added","lead.reinquiry","lead.merged","appointment.booked","appointment.rescheduled","appointment.cancelled","appointment.completed","appointment.no_show","appointment.confirmed","ping"]}}],"responses":{"200":{"description":"Example events.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}}}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/rate_limited"}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"This document","description":"No key needed.","security":[],"x-arraxis-scope":"none","responses":{"200":{"description":"OpenAPI 3.1 JSON."}}}}},"webhooks":{"lead.created":{"post":{"operationId":"event_lead_created","summary":"Arraxis sends lead.created","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"lead.created"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"lead.updated":{"post":{"operationId":"event_lead_updated","summary":"Arraxis sends lead.updated","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"lead.updated"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"lead.stage_changed":{"post":{"operationId":"event_lead_stage_changed","summary":"Arraxis sends lead.stage_changed","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"lead.stage_changed"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"lead.assigned":{"post":{"operationId":"event_lead_assigned","summary":"Arraxis sends lead.assigned","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"lead.assigned"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"lead.note_added":{"post":{"operationId":"event_lead_note_added","summary":"Arraxis sends lead.note_added","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"lead.note_added"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"lead.reinquiry":{"post":{"operationId":"event_lead_reinquiry","summary":"Arraxis sends lead.reinquiry","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"lead.reinquiry"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"lead.merged":{"post":{"operationId":"event_lead_merged","summary":"Arraxis sends lead.merged","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"lead.merged"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"appointment.booked":{"post":{"operationId":"event_appointment_booked","summary":"Arraxis sends appointment.booked","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"appointment.booked"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"appointment.rescheduled":{"post":{"operationId":"event_appointment_rescheduled","summary":"Arraxis sends appointment.rescheduled","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"appointment.rescheduled"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"appointment.cancelled":{"post":{"operationId":"event_appointment_cancelled","summary":"Arraxis sends appointment.cancelled","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"appointment.cancelled"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"appointment.completed":{"post":{"operationId":"event_appointment_completed","summary":"Arraxis sends appointment.completed","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"appointment.completed"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"appointment.no_show":{"post":{"operationId":"event_appointment_no_show","summary":"Arraxis sends appointment.no_show","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"appointment.no_show"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"appointment.confirmed":{"post":{"operationId":"event_appointment_confirmed","summary":"Arraxis sends appointment.confirmed","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"appointment.confirmed"}}}]}}}},"responses":{"200":{"description":"Received."}}}},"ping":{"post":{"operationId":"event_ping","summary":"Arraxis sends ping","description":"Signed per Standard Webhooks. Answer with any 2xx. 410 switches the address off.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","description":"msg_<delivery id>, stable across retries."}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string","description":"Unix seconds of this attempt."}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","description":"v1,<base64 HMAC-SHA256 of id.timestamp.body>; several space-separated while a secret is being replaced."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","properties":{"type":{"const":"ping"}}}]}}}},"responses":{"200":{"description":"Received."}}}}}}