{"openapi":"3.1.0","info":{"title":"1Way public API","version":"1.0.0","license":{"name":"AGPL-3.0-or-later"},"description":"Bearer API keys (ow_live_…), created in Settings → Integrations. Errors follow RFC 9457. Rate limit: 600 requests/minute per key."},"servers":[{"url":"/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"responses":{"Problem":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"}}}}}}}},"paths":{"/calls":{"get":{"summary":"List calls (CDR), newest first","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":200}},{"name":"cursor","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","schema":{"type":"string","enum":["answered","missed","no_answer","abandoned","voicemail","busy","failed"]}}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"x-scope":"calls:read"}},"/calls/{id}/timeline":{"get":{"summary":"Append-only event timeline of one call","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Problem"}},"x-scope":"calls:read"}},"/contacts":{"get":{"summary":"List contacts","responses":{"200":{"description":"OK"}},"x-scope":"contacts:read"},"post":{"summary":"Create or update a lead (phone normalised to E.164)","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["phone"],"properties":{"phone":{"type":"string"},"name":{"type":"string"},"company":{"type":"string"},"email":{"type":"string"},"campaign":{"type":"string"}}}}}},"responses":{"200":{"description":"Existing contact updated"},"201":{"description":"Created"},"422":{"$ref":"#/components/responses/Problem"}},"x-scope":"contacts:write"}},"/contacts/lookup":{"get":{"summary":"Find a contact by phone (any format)","parameters":[{"name":"phone","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"$ref":"#/components/responses/Problem"}},"x-scope":"contacts:read"}}}}