openapi: 3.0.3
info: { title: WhatsApp Hub API, version: 1.0.0 }
servers: [{ url: /api }]
components:
  securitySchemes: { bearerAuth: { type: http, scheme: bearer } }
  schemas:
    MessageRequest: { type: object, required: [session_id, to], properties: { session_id: { type: integer }, to: { type: string }, body: { type: string } } }
security: [{ bearerAuth: [] }]
paths:
  /send-message: { post: { summary: Queue a text message, requestBody: { required: true, content: { application/json: { schema: { $ref: '#/components/schemas/MessageRequest' } } } }, responses: { '202': { description: Queued } } } }
  /contacts: { get: { summary: List contacts, responses: { '200': { description: OK } } }, post: { summary: Create contact, responses: { '201': { description: Created } } } }
  /messages: { get: { summary: List messages, responses: { '200': { description: OK } } } }
  /session: { get: { summary: List sessions, responses: { '200': { description: OK } } }, post: { summary: Start QR session, responses: { '201': { description: Created } } } }
