WAHooks
API Reference

API Overview

WAHooks REST API reference

Base URL: https://api.wahooks.com/api

Authentication

All endpoints (except health check) require authentication via the Authorization header:

Authorization: Bearer wh_your_api_token

Both API tokens (wh_...) and Supabase JWTs are accepted. See API Tokens for details.

Response format

All responses are JSON. Successful responses return the resource directly. Errors return:

{
  "message": "Connection not found",
  "error": "Not Found",
  "statusCode": 404
}

Status codes

CodeMeaning
200Success
201Created (POST requests)
401Invalid or missing authentication
403Forbidden (resource belongs to another user)
404Resource not found
503Service unavailable (worker still booting)

Rate limiting

The API uses rate limiting to prevent abuse. If you exceed the rate limit, you'll receive a 429 response.

Connections

MethodEndpointDescription
GET/connectionsList all connections
POST/connectionsCreate a new connection
POST/connections/get-or-createGet a scannable connection (reuses idle or creates new)
GET/connections/:idGet connection details
PATCH/connections/:idUpdate connection (e.g. rename)
DELETE/connections/:idDelete a connection
POST/connections/:id/restartRestart a connection
GET/connections/:id/qrGet QR code for linking
GET/connections/:id/chatsGet recent chats
GET/connections/:id/meGet WhatsApp profile info

Messaging

MethodEndpointDescription
POST/connections/:id/sendSend a text message
POST/connections/:id/send-imageSend an image (URL or base64)
POST/connections/:id/send-documentSend a document/file
POST/connections/:id/send-videoSend a video
POST/connections/:id/send-audioSend audio/voice
POST/connections/:id/send-locationSend a location pin
POST/connections/:id/send-contactSend a contact card

Webhooks

MethodEndpointDescription
GET/connections/:cid/webhooksList webhooks for a connection
POST/connections/:cid/webhooksCreate a webhook
PUT/webhooks/:idUpdate a webhook
DELETE/webhooks/:idDelete a webhook
GET/webhooks/:id/logsGet delivery logs
POST/webhooks/:id/testSend a test event

API Tokens

MethodEndpointDescription
GET/tokensList active tokens
POST/tokensCreate a new token
DELETE/tokens/:idRevoke a token

Other

MethodEndpointDescription
GET/Health check (no auth required)
GET/billing/statusSubscription and slot status
POST/billing/checkoutCreate Stripe checkout session
POST/billing/portalOpen Stripe customer portal

On this page