BuddyPad API

Errors

Every error has the same shape:

{
  "error": {
    "code": "not_found",
    "message": "not found",
    "request_id": "6f1c2a0e-5f0b-4c8a-9a51-0d6f3c1e7b42"
  }
}

Build on code. The message is for people and can change. If you write to us about a failed call, send the request_id.

StatusCodeWhat it meansWhat to do
400invalidThe request is wrong: a bad field, a value the app wouldn't accept, or a key reused for a different request.Read the message, fix the request.
401unauthorizedNo token, or one that's malformed, unknown, revoked or expired. They all look the same on purpose.Make a new token in the app.
403forbidden_scopeThe token doesn't have this call's permission.Make a token with that permission ticked.
404not_foundIt doesn't exist, or it isn't yours to see. These are the same answer on purpose.Check the id.
409conflictThe app's rules said no (the nudge limit, one open check-in per goal), or two writes collided.For a collision, retry with the same Idempotency-Key.
410cursor_expiredEvents after your cursor have aged out of the 30-day feed.Read the current state, then continue from ?after=head.
429rate_limitedOver the limit. See Rate limits.Wait for Retry-After seconds.
500, 503internalSomething failed on our side.Retry with the same Idempotency-Key.

Retrying safely

Send a UUID as Idempotency-Key on every write. A retry with the same key never acts twice. Every write's response echoes the key it used. If you don't send one, the API makes one up, and that call can't be retried safely.