{"openapi":"3.0.3","info":{"title":"Techfleek Engage API","version":"1.0.0","description":"Send WhatsApp messages and read delivery status from your own systems. Authenticate with an API key created in Settings → Developers."},"servers":[{"url":"https://api.168-144-71-93.sslip.io"}],"security":[{"bearer":[]}],"paths":{"/v1/messages":{"post":{"summary":"Send a message","operationId":"sendMessage","description":"Send exactly one of `text` (only inside the 24-hour customer-service window) or `template`. The message is queued; watch `message.status` webhooks or poll GET /v1/messages/{id}.","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":64},"description":"Same key twice returns the first message. Equivalent to `client_ref`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}}},"responses":{"200":{"description":"Replay of an earlier request with the same client_ref / Idempotency-Key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"202":{"description":"Accepted and queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/messages/batch":{"post":{"summary":"Send up to 100 messages","operationId":"sendBatch","description":"Each message is judged on its own. The response is 200 even when some are rejected; check each result.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/SendRequest"}}}}}}},"responses":{"200":{"description":"Per-message results","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"integer"},"rejected":{"type":"integer"},"results":{"type":"array","items":{"type":"object"}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/messages/{id}":{"get":{"summary":"Get a message and its status","operationId":"getMessage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"by","in":"query","schema":{"type":"string","enum":["client_ref"]},"description":"Look up by your own client_ref instead of our id."}],"responses":{"200":{"description":"The message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/channels":{"get":{"summary":"List your WhatsApp numbers","operationId":"listChannels","responses":{"200":{"description":"Numbers this key can use","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"}}}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates":{"get":{"summary":"List approved templates","operationId":"listTemplates","responses":{"200":{"description":"Approved templates this key can send","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"language":{"type":"string"},"category":{"type":"string"},"variables":{"type":"integer"},"body":{"type":"string"},"numbers":{"type":"array","items":{"type":"string"}}}}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key, e.g. tfe_live_…  (X-API-Key header also accepted)"}},"schemas":{"SendRequest":{"type":"object","required":["to"],"properties":{"from":{"type":"string","description":"Channel id or number. Optional if the key is tied to one number or you have one."},"to":{"type":"string","example":"919811022113","description":"Full number with country code."},"name":{"type":"string","maxLength":100,"description":"Used when the contact is new."},"text":{"type":"string","maxLength":4096},"template":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"language":{"type":"string","default":"en_US"},"variables":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}}}},"opted_in":{"type":"boolean","description":"Assert you hold this contact's consent. Needed for marketing templates to contacts not yet opted in. Recorded against the key."},"client_ref":{"type":"string","maxLength":64,"description":"Your own id. Reusing it returns the first message instead of sending twice."}}},"Message":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","sent","delivered","read","failed"]},"type":{"type":"string"},"to":{"type":"string"},"from":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"}}},"client_ref":{"type":"string","nullable":true},"error":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"idempotent_replay":{"type":"boolean"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retry_after_ms":{"type":"integer"}}}}}}}}