{"openapi":"3.1.0","info":{"title":"Centralyn WhatsApp API","version":"1.0.0","description":"Send WhatsApp text, images and documents from an account's linked device. Authenticate every request with a personal API key. Text sends as JSON; files send as multipart/form-data."},"servers":[{"url":"https://wa.centralyn.com"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account"},{"name":"Messages"}],"paths":{"/api/v1/me":{"get":{"tags":["Account"],"summary":"The account behind the key","operationId":"getMe","responses":{"200":{"description":"The key owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyUser"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/OriginDenied"}}}},"/api/v1/usage":{"get":{"tags":["Account"],"summary":"The current month's call quota and usage","operationId":"getUsage","responses":{"200":{"description":"The month's call quota","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/OriginDenied"}}}},"/api/v1/send":{"post":{"tags":["Messages"],"summary":"Send a text, image or document","operationId":"sendMessage","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A client-generated key. A retry with the same key and body returns the first reply instead of sending again.","schema":{"type":"string","minLength":8,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTextInput"}},"multipart/form-data":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string","example":"+15551234567","description":"Recipient with country code."},"text":{"type":"string","maxLength":1024,"description":"Caption; may be empty for a file."},"file":{"type":"string","format":"binary","description":"JPG, PNG, WebP image up to 5 MB, or PDF, Office, text, CSV or ZIP document up to 10 MB."}}}}}},"responses":{"200":{"description":"WhatsApp accepted the message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/OriginDenied"},"409":{"description":"The device is not linked, is revoking, or another request with the same idempotency key is in flight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The attachment exceeds its size limit"},"422":{"description":"Invalid phone number, text, attachment or idempotency key"},"429":{"description":"The key cap, monthly quota, send rate or per-IP rate limit was reached"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"wak_...","description":"Send the key as `Authorization: Bearer wak_...` or `X-API-Key: wak_...`."}},"responses":{"Unauthorized":{"description":"Missing, malformed or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"OriginDenied":{"description":"The browser origin is not on the key's allowlist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"ApiKeyUser":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string"}}}}},"Usage":{"type":"object","properties":{"period":{"type":"string","description":"Current UTC month, YYYY-MM.","example":"2026-11"},"callsUsed":{"type":"integer","minimum":0},"callsLimit":{"type":"integer","minimum":1},"callsRemaining":{"type":"integer","minimum":0},"callsResetAt":{"type":"string","format":"date-time"}}},"SendTextInput":{"type":"object","required":["to","text"],"additionalProperties":false,"properties":{"to":{"type":"string","example":"+15551234567","description":"Recipient with country code."},"text":{"type":"string","minLength":1,"maxLength":4096}}},"SendResult":{"type":"object","properties":{"id":{"type":"string","description":"WhatsApp message id."},"to":{"type":"string","description":"Normalized recipient number."}}},"Error":{"type":"object","properties":{"statusCode":{"type":"integer"},"statusMessage":{"type":"string"},"message":{"type":"string"}}}}}}