API Reference
The complete REST API surface for GoSendAPI Cloud. Authentication, request/response shapes, error codes — all auto-generated from the production NestJS service.
Coming up: this section will render an interactive OpenAPI spec via Scalar. Click on any endpoint to see request/response examples in cURL, Node.js, PHP and Python.
API base URL
https://cloud.gosendapi.com/v1Authentication
All endpoints require the X-API-Key header. See Authentication for details.
Endpoint groups
| Group | Endpoints | Purpose |
|---|---|---|
| Messages | POST /messages, GET /messages, GET /messages/{id} | Send and query WhatsApp messages |
| WABAs | GET /wabas, GET /wabas/{id}, GET /wabas/{id}/phone-numbers | List WhatsApp Business Accounts and their phones |
| Templates | GET /wabas/{id}/templates, POST /wabas/{id}/templates, POST /wabas/{id}/templates/sync, DELETE /wabas/{id}/templates/{id} | Manage approved Meta templates |
| Conversations | GET /conversations, GET /conversations/{id}, POST /conversations/{id}/close | List and manage 24h conversation windows |
| Webhooks | GET /webhooks, POST /webhooks, PATCH /webhooks/{id}, DELETE /webhooks/{id}, GET /webhooks/{id}/deliveries | Configure real-time event delivery |
| Account | GET /me | Current project info |
Pagination
List endpoints use page (default 1) and per_page (default 20, max 100) query parameters:
curl "https://cloud.gosendapi.com/v1/messages?page=2&per_page=50" \
-H "X-API-Key: gsk_live_..."Response includes total count in headers:
X-Total-Count: 1234
X-Page: 2
X-Per-Page: 50Error responses
All errors follow the same JSON shape:
{
"statusCode": 400,
"message": "Validation failed: 'to' must be E164 format",
"error": "Bad Request"
}Common codes:
| Code | Meaning |
|---|---|
400 | Validation failed — bad request shape |
401 | Invalid or missing API key |
403 | Authenticated but not allowed to access this resource |
404 | Resource not found |
409 | Conflict — e.g., duplicate idempotency key |
422 | Unprocessable entity — semantic validation failed |
429 | Rate limited — back off and retry |
500 | Internal server error |
502 / 503 | Upstream (Meta Cloud API) unavailable |
What’s next
Interactive Swagger/OpenAPI explorer powered by Scalar — arriving in Sprint 4 once we wire up @nestjs/swagger decorators in the API. For now, refer to the Quickstart for example payloads.