{"openapi":"3.0.3","info":{"title":"Pulse Public API","version":"1.0.0","description":"Programmatic access to Pulse — conversations, messages, tickets, usage and knowledge ingestion. Authenticate with a scoped API key as a Bearer token. Retry POSTs safely with an `Idempotency-Key` header."},"servers":[{"url":"https://pulse.fruitfulbough.uk/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A Pulse API key: `pk_live_…`"}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"A unique key so a retried POST is not processed twice."}}},"x-scopes":{"conversations:read":"Read conversations & message history","conversations:write":"Send messages into conversations","tickets:read":"Read support tickets","knowledge:write":"Ingest knowledge-base documents","usage:read":"Read usage & billing counters"},"paths":{"/me":{"get":{"summary":"The authenticated tenant and its plan","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/usage":{"get":{"summary":"Usage counters for the current period","x-required-scope":"usage:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"insufficient scope"}}}},"/messages":{"post":{"summary":"Send a customer message into the AI","x-required-scope":"conversations:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contact","text"],"properties":{"contact":{"type":"string"},"text":{"type":"string"}}}}}},"responses":{"200":{"description":"AI reply + conversation id","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"insufficient scope"}}}},"/conversations":{"get":{"summary":"List conversations","x-required-scope":"conversations:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"insufficient scope"}}}},"/conversations/{id}/messages":{"get":{"summary":"Message history for a conversation","x-required-scope":"conversations:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"unknown conversation"}}}},"/tickets":{"get":{"summary":"List support tickets","x-required-scope":"tickets:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"insufficient scope"}}}},"/knowledge":{"post":{"summary":"Ingest a knowledge-base document","x-required-scope":"knowledge:write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["source","content"],"properties":{"source":{"type":"string"},"content":{"type":"string"},"docId":{"type":"string"}}}}}},"responses":{"200":{"description":"chunks ingested","content":{"application/json":{"schema":{"type":"object"}}}},"402":{"description":"plan quota reached"}}}}}}