ข้อผิดพลาดของ API
โซลูชั่นสำหรับการรับรองความถูกต้อง การจำกัดอัตรา และข้อผิดพลาดในการร้องขอ
Bad Request
What It Means
The request body is missing a field or has a wrong value.
Common Causes
- channel, to or content missing when sending a message
- channel is not WHATSAPP, SMS or EMAIL
- The body is not valid JSON, or the Content-Type: application/json header is missing
How to Fix
- 1.Compare your request with the examples in the API reference
- 2.Send the body as JSON with the Content-Type: application/json header
Still having issues? Contact Support
Unauthorized
What It Means
BeeCastly could not find a valid API key on the request.
Common Causes
- The x-api-key header is missing ("Missing API key")
- The key is wrong or was deleted ("Invalid API key")
- The key has passed its expiry date ("API key expired")
- The key was sent as Authorization: Bearer instead of x-api-key
How to Fix
- 1.Send the key in the x-api-key header
- 2.Create a new key in Settings → API Keys if the old one was deleted or expired
Still having issues? Contact Support
Forbidden
What It Means
The key is valid but does not have the permission this request needs (code API_KEY_PERMISSION).
Common Causes
- A read-only key was used to send a message or create a contact
How to Fix
- 1.Use a key with the write permission for POST requests
Still having issues? Contact Support
Not Found
What It Means
The message you asked about does not exist in your account, or the URL is wrong.
Common Causes
- Wrong messageId in GET /v1/messages/:id
- A path that is not one of the four /v1 endpoints
How to Fix
- 1.Use the messageId returned when you sent the message
- 2.Check the URL starts with https://beecastly.com/api/v1
Still having issues? Contact Support
Conflict
What It Means
A contact with the same phone number or email already exists.
Common Causes
- POST /v1/contacts for someone who is already in your contacts
How to Fix
- 1.Read data in the response: it holds the existing contact, and "existed" is true
- 2.Treat this as success if you only wanted the contact to exist
Still having issues? Contact Support
Too Many Requests
What It Means
The key went over its requests-per-minute limit (code API_KEY_RATE_LIMITED).
Common Causes
- Sending many requests in a tight loop
How to Fix
- 1.Wait until the next minute, then try again
- 2.Spread requests out, and retry with a growing delay
- 3.Check the per-plan limits in the API reference
Still having issues? Contact Support
Internal Server Error
What It Means
Something went wrong on our side.
Common Causes
- A temporary problem with the service
- A field in the contact body that BeeCastly does not accept
How to Fix
- 1.Retry after a short wait
- 2.For POST /v1/contacts, send only the documented fields
- 3.Check the status page at beecastly.com/status
- 4.Contact support if it keeps happening
Still having issues? Contact Support