Errors

Every Ur Next Door API error code, its HTTP status, what causes it and what to do, plus how to read validation errors and which requests are safe to retry.

View as Markdown

Every error answers JSON in the same shape, whatever the Accept header:

JSON
{
  "ok": false,
  "error": "title and body are required",
  "code": "validation_failed",
  "errors": { "body": "Body is required." },
  "request_id": "a1b2c3d4e5f60718"
}
FieldMeaning
okAlways false on an error.
errorA human readable message. Show it to people; do not parse it.
codeA stable machine code. Branch on this.
errorsOnly on validation failures: one message per field name.
request_idThe same as the X-Request-Id header. Quote it when you contact support.

Error codes

StatusCodeCauseWhat to do
400invalid_jsonThe body is not a JSON object (an array, a string, or broken JSON).Send a JSON object.
400invalid_idempotency_keyThe Idempotency-Key header is not 1 to 64 letters, digits or . _ : -.Use a UUID.
401missing_api_keyNo key header.Send Authorization: Bearer ... or X-API-Key.
401invalid_api_keyThe key is unknown, mistyped, revoked or expired, or the account is not active.Check the key or create a new one. Do not retry in a loop.
403insufficient_scopeThe key lacks the scope this endpoint needs.Create a key with that scope.
403forbiddenYou may not do this, for example you are not an editor of that community.Choose another community, or ask its admins.
404not_foundUnknown route or item, or it is not yours, or it is no longer scheduled.Check the path, type and id.
409conflictIt clashes with the current state: a community with that name exists, or the item is no longer scheduled.Change the name, or refresh your list.
409idempotency_in_progressA request with the same Idempotency-Key is still running.Wait a moment and retry with the same key.
413payload_too_largeThe body is over its limit, or the image is over 8 MB.Shrink it. See limits.
415unsupported_media_typeWrong Content-Type, or a file type that is not allowed.Send application/json (or multipart for media), and PNG, JPEG, GIF or WebP.
421wrong_hostYou called a community subdomain.Use https://urnextdoor.com/api/v1.
422validation_failedOne or more fields are missing or wrong.Fix the fields named in errors.
422idempotency_key_reusedThe same Idempotency-Key was sent with a different request.Use a new key for a new request.
429rate_limitedMore than 60 requests a minute from you, or too many failed key checks from your address.Wait Retry-After seconds.
429quota_exceededToday's quota for this action is used up.Wait for 00:00 UTC (see Retry-After).
500server_errorSomething went wrong on our side.Retry with the same Idempotency-Key. If it persists, contact support with the request_id.
503api_disabledThe API is switched off.Try again later.

Treat unknown codes by their HTTP status: new codes may be added over time.

Validation errors

A 422 validation_failed names each field that needs fixing:

JSON
{
  "ok": false,
  "error": "Choose a time at least 5 minutes from now.",
  "code": "validation_failed",
  "errors": { "scheduled_at": "Choose a time at least 5 minutes from now." },
  "request_id": "a1b2c3d4e5f60718"
}

Change only the named fields and send the request again. Agents should do the same, rather than rewriting the whole request.

Which errors to retry

Retry?Errors
Yes, with the same Idempotency-Key, after a short waitNetwork errors and timeouts, 500, 409 idempotency_in_progress
Yes, after Retry-After429 rate_limited
Not until the reset429 quota_exceeded
Only after fixing the request400, 413, 415, 422
Not without a human401, 403, 404, 409 conflict, 421, 503

A failed request never uses quota, so a corrected retry costs nothing extra.

Getting help

Write to support@urnextdoor.com with the request_id, the time, the endpoint and what you expected. Never include your API key: support never needs it. You can also see recent requests and their status codes in Settings > API keys.

Next steps

Last updated