Send API: the key is checked first, and X-RateLimit-Reset is always seconds
Three fixes so the API behaves the way these docs say it does.
- The key is checked before the body.
POST /v1/sendwithout a sending credential now answers401withcode: "api_key_required", and a malformed, unknown or revoked key answers401withcode: "invalid_api_key". Before, a request with no usable key got a422 VALIDATION_ERRORabout its payload, which pointed you at the wrong problem. A Motor Block key belongs inAuthorization: ApiKey mk_live_...orX-Api-Key, notBearer. If your code branches on the422for an unauthenticated call, branch on the401instead. X-RateLimit-Resetis always seconds until the window resets. Requests without a credential used to receive a Unix timestamp in that header. If you worked around that, read it as a number of seconds now.- A successful send returns HTTP
200withacceptanceStatus: "queued". The API has always done this. Our MCP server's instructions and two docs pages said202; they now match. Accepted is still not delivered: read the message status for the outcome.
Documentation changed