API reference
Ur Next Door API v1 reference: base URL, authentication, request and response envelopes, headers, and every endpoint grouped by area.
The reference pages are generated from the OpenAPI document, so they always match the API. This page covers what every endpoint shares.
- Account endpointswho am I, today's usage, and the OpenAPI document.
- Content endpointscreate posts, questions, polls, MCQs, communities, services and jobs.
- Media endpointupload an image as base64 JSON or multipart.
- Scheduling endpointslist, reschedule, publish now and cancel scheduled items.
- Lookup endpointscommunities, service categories, job options, places and icons.
- OpenAPI specificationthe machine readable contract and how to import it.
Base URL
https://urnextdoor.com/api/v1Always the apex domain. A community subdomain answers 421 wrong_host. All paths in the reference are relative to this URL.
Authentication
Send your key in Authorization: Bearer und_sk_... or X-API-Key: und_sk_.... Never in the URL. See Authentication.
Requests
- Bodies are JSON objects with
Content-Type: application/json, up to 256 KB.POST /mediaalso acceptsmultipart/form-data, and its JSON body may be up to 12 MB (for base64 images). - Content bodies (
body, a community'sdescription) are HTML. See Formatting. - Times are ISO 8601 with an offset or
Z. Scheduling stores UTC and responses useZ. - Ids are numbers. Slugs and usernames are strings.
POSTandDELETEaccept an optionalIdempotency-Keyheader. See Idempotency.
Successful responses
Every success is a JSON object that starts with "ok": true and ends with the request_id. Responses that describe an item with a url also carry web_url, the full address to open or share.
{
"ok": true,
"id": 41,
"slug": "five-easy-ways-to-save-water-at-home",
"url": "/posts/five-easy-ways-to-save-water-at-home",
"web_url": "https://urnextdoor.com/posts/five-easy-ways-to-save-water-at-home",
"item": { "id": 41, "type": "post", "slug": "five-easy-ways-to-save-water-at-home" },
"request_id": "9f8e7d6c5b4a3921"
}Error responses
Every error, whatever the Accept header, is:
{
"ok": false,
"error": "title and body are required",
"code": "validation_failed",
"errors": { "body": "Body is required." },
"request_id": "a1b2c3d4e5f60718"
}errors appears only on validation failures, with one message per field. Codes and what to do about each are on Errors.
Headers
| Header | Direction | When | Meaning |
|---|---|---|---|
Authorization or X-API-Key | Request | Every call except the OpenAPI document | Your key |
Content-Type | Request | Calls with a body | application/json, or multipart/form-data for media |
Idempotency-Key | Request | Optional on POST and DELETE | Makes a retry safe |
X-Request-Id | Response | Every response | The request's id, also in the body as request_id |
Cache-Control: no-store | Response | Every API response except the OpenAPI document | Never cache answers |
X-RateLimit-Limit | Response | Quota-counted calls | Today's limit for that action |
X-RateLimit-Remaining | Response | Quota-counted calls | What is left today |
X-RateLimit-Reset | Response | Quota-counted calls | Unix seconds of the next UTC midnight |
Retry-After | Response | 429 | Seconds to wait |
Idempotent-Replayed: true | Response | A replayed answer | You got the stored answer of an earlier identical request |
Versioning
The version is in the path (/api/v1). Write clients that ignore response fields and error codes they do not recognise, so a new optional field never breaks them. Every change is listed in the changelog.
Last updated