Errors
Shape
Always log request_id. It is what lets us find your exact request when you contact support.
Codes
400 and 422 are different failures
400 means the request never got as far as validation: a required parameter is missing, a
timestamp will not parse, a limit is out of range. 422 means the request was well formed and
its contents were rejected, such as a comment rule with no reply and no DM.
One code for every bad key
A missing, wrong, revoked or expired key all answer 401 invalid_key. Telling an expired key
from an unknown one would confirm to whoever holds a leaked key that it was once real. Your key’s
expiry date is in the key table in the panel (Profile → Access keys & webhook). Rotate the key
before that date.
404, not 403, for someone else’s resources
If you request a resource that exists but belongs to another partner, you receive 404, not
403. A 403 would confirm the id exists, which is information you should not be able to probe
for.
details
Some errors carry a details object where a number helps you act:
It is never present on 401 or 404, where extra detail would confirm something you should
not learn.
Which errors are worth retrying
We never name an internal host or service in an error. If you need to know why something
upstream failed, send your request_id to your account manager.