Editing endpoints

Edit your own posts, questions, polls, MCQs, answers, comments, services and jobs, add images to them, archive them, and mark questions resolved.

View as Markdown

All paths are relative to https://urnextdoor.com/api/v1. See API reference for the envelope and headers every endpoint shares.

EndpointWhat it doesScopeDaily quota
PUT /posts/{id}Edit your posteditedit
PUT /questions/{id}Edit your questioneditedit
PUT /polls/{id}Edit your polleditedit
PUT /mcqs/{id}Edit your MCQeditedit
POST /tagsCreate a tagcontenttag
PUT /answers/{id}Edit your answereditedit
PUT /comments/{id}Edit your commenteditedit
PUT /services/{id}Edit your serviceeditedit
PUT /jobs/{id}Edit your job posteditedit
PUT /archiveArchive or restore an itemeditedit
PUT /questions/{id}/resolvedMark your question resolvededitedit
PUT /answers/{id}/acceptedAccept an answer to your questioneditedit
POST /galleryAdd images to your itemeditedit

Edit your post

PUT https://urnextdoor.com/api/v1/posts/{id}

Change only the fields you send. Tags and the gallery you do not send are kept. Outside images are imported. Your own posts only.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updatePost

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/posts/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Five easy ways to save water at home (updated)"
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/posts/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    title: "Five easy ways to save water at home (updated)",
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/posts/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "title": "Five easy ways to save water at home (updated)",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'title' => 'Five easy ways to save water at home (updated)',
];

$ch = curl_init('https://urnextdoor.com/api/v1/posts/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, url, updated, item}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your question

PUT https://urnextdoor.com/api/v1/questions/{id}

Change only the fields you send. Tags and the gallery you do not send are kept. Your own questions only.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updateQuestion

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/questions/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "<p>We have a small balcony and full sun.</p>"
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/questions/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    body: "<p>We have a small balcony and full sun.</p>",
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/questions/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "body": "<p>We have a small balcony and full sun.</p>",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'body' => '<p>We have a small balcony and full sun.</p>',
];

$ch = curl_init('https://urnextdoor.com/api/v1/questions/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, url, updated, item}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your poll

PUT https://urnextdoor.com/api/v1/polls/{id}

Change the question, details, images or tags, or close it with is_closed. Options cannot change. Your own polls only.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updatePoll

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/polls/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "is_closed": true
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/polls/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    is_closed: true,
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/polls/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "is_closed": True,
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'is_closed' => true,
];

$ch = curl_init('https://urnextdoor.com/api/v1/polls/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, url, updated, item}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your MCQ

PUT https://urnextdoor.com/api/v1/mcqs/{id}

Change the question, explanation, images or tags. The correct option is locked once anyone answered. Your own MCQs only.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updateMcq

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/mcqs/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "<p>Water boils at 100 C at sea level.</p>"
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/mcqs/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    body: "<p>Water boils at 100 C at sea level.</p>",
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/mcqs/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "body": "<p>Water boils at 100 C at sea level.</p>",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'body' => '<p>Water boils at 100 C at sea level.</p>',
];

$ch = curl_init('https://urnextdoor.com/api/v1/mcqs/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, url, updated, item}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Create a tag

POST https://urnextdoor.com/api/v1/tags

Find or create a tag by name, with a description if it has none.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: content
  • Daily quota: counts as tag (see limits)
  • Idempotency-Key: supported (see Idempotency)
  • operationId: createTag

Request body

Send Content-Type: application/json.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/tags" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "composting",
  "description": "Turning kitchen waste into soil."
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/tags", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    name: "composting",
    description: "Turning kitchen waste into soil.",
  }),
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/tags",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "name": "composting",
        "description": "Turning kitchen waste into soil.",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'name' => 'composting',
    'description' => 'Turning kitchen waste into soil.',
];

$ch = curl_init('https://urnextdoor.com/api/v1/tags');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
201 CreatedThe tag.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your answer

PUT https://urnextdoor.com/api/v1/answers/{id}

Replace the text of your answer. Outside images in it are imported.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updateAnswer

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/answers/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "<p>Water early in the morning, before 9.</p>"
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/answers/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    body: "<p>Water early in the morning, before 9.</p>",
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/answers/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "body": "<p>Water early in the morning, before 9.</p>",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'body' => '<p>Water early in the morning, before 9.</p>',
];

$ch = curl_init('https://urnextdoor.com/api/v1/answers/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, updated, answer}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your comment

PUT https://urnextdoor.com/api/v1/comments/{id}

Replace the text of your comment or reply.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updateComment

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/comments/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "body": "Great tips, thank you!"
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/comments/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    body: "Great tips, thank you!",
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/comments/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "body": "Great tips, thank you!",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'body' => 'Great tips, thank you!',
];

$ch = curl_init('https://urnextdoor.com/api/v1/comments/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, updated, comment}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your service

PUT https://urnextdoor.com/api/v1/services/{id}

Change only what you send: title, summary, body, category, packages, location, status, images, tags. Tags you do not send are kept.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updateService

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/services/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "paused"
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/services/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    status: "paused",
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/services/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "status": "paused",
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'status' => 'paused',
];

$ch = curl_init('https://urnextdoor.com/api/v1/services/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, slug, url, updated, item}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Edit your job post

PUT https://urnextdoor.com/api/v1/jobs/{id}

Change only the fields you send; everything else is kept as it is. Fields as in createJob. Your own job posts only.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: updateJob

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/jobs/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "salary_min": 25000,
  "salary_max": 35000
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/jobs/41", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    salary_min: 25000,
    salary_max: 35000,
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/jobs/41",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "salary_min": 25000,
        "salary_max": 35000,
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'salary_min' => 25000,
    'salary_max' => 35000,
];

$ch = curl_init('https://urnextdoor.com/api/v1/jobs/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, slug, url, updated, item}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Archive or restore an item

PUT https://urnextdoor.com/api/v1/archive

Hide one of your items from everyone else (archived: true) or bring it back (false). Restoring touches only archived items, so it never publishes a draft.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: setArchived

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/archive" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "post",
  "id": 41,
  "archived": true
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/archive", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    type: "post",
    id: 41,
    archived: true,
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/archive",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "type": "post",
        "id": 41,
        "archived": True,
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'type' => 'post',
    'id' => 41,
    'archived' => true,
];

$ch = curl_init('https://urnextdoor.com/api/v1/archive');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{status, changed}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Mark your question resolved

PUT https://urnextdoor.com/api/v1/questions/{id}/resolved

Set whether your question is resolved. Sending the state it is already in changes nothing.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: setQuestionResolved

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/questions/41/resolved" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "resolved": true
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/questions/41/resolved", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    resolved: true,
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/questions/41/resolved",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "resolved": True,
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'resolved' => true,
];

$ch = curl_init('https://urnextdoor.com/api/v1/questions/41/resolved');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{is_resolved, changed, item}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Accept an answer to your question

PUT https://urnextdoor.com/api/v1/answers/{id}/accepted

Set whether an answer is the accepted one. Only the question's author can. Accepting it also marks the question resolved.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • operationId: setAnswerAccepted

Parameters

NameInRequiredDescription
idpathYesThe numeric id of the item.

Request body

Send Content-Type: application/json.

Example

cURL
curl -X PUT "https://urnextdoor.com/api/v1/answers/41/accepted" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accepted": true
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/answers/41/accepted", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    accepted: true,
  }),
});
console.log(res.status, await res.json());
Python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.put(
    "https://urnextdoor.com/api/v1/answers/41/accepted",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    json={
        "accepted": True,
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'accepted' => true,
];

$ch = curl_init('https://urnextdoor.com/api/v1/answers/41/accepted');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{accepted, changed, accepted_answer_id}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Add images to your item

POST https://urnextdoor.com/api/v1/gallery

Import images (links or ChatGPT files) as yours and add them to the gallery of your post, question, poll, MCQ or service. cover: true makes the first new one the cover. Needs media too.

  • Auth: your API key (Bearer or X-API-Key)
  • Scope: edit
  • Daily quota: counts as edit (see limits)
  • Idempotency-Key: supported (see Idempotency)
  • operationId: addGalleryImages

Request body

Send Content-Type: application/json.

Example

cURL
curl -X POST "https://urnextdoor.com/api/v1/gallery" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "type": "post",
  "id": 41,
  "image_urls": [
    "https://example.com/garden.jpg"
  ],
  "cover": true
}'
JavaScript
const res = await fetch("https://urnextdoor.com/api/v1/gallery", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    type: "post",
    id: 41,
    image_urls: ["https://example.com/garden.jpg"],
    cover: true,
  }),
});
console.log(res.status, await res.json());
Python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/gallery",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "type": "post",
        "id": 41,
        "image_urls": ["https://example.com/garden.jpg"],
        "cover": True,
    },
    timeout=30,
)
print(response.status_code, response.json())
PHP
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'type' => 'post',
    'id' => 41,
    'image_urls' => ['https://example.com/garden.jpg'],
    'cover' => true,
];

$ch = curl_init('https://urnextdoor.com/api/v1/gallery');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json',
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Responses

StatusMeaningCodes
200 OK{id, url, updated, item, imported_images}.
400 Bad RequestThe body is not a JSON object, or the Idempotency-Key header is malformed.invalid_json, invalid_idempotency_key
401 UnauthorizedNo key, or the key is unknown, malformed, revoked or expired, or the member is not active.missing_api_key, invalid_api_key
403 ForbiddenThe key lacks the scope, or the member may not do this.insufficient_scope, forbidden
404 Not FoundUnknown route or item, or the item is not yours.not_found
409 ConflictConflicts with the current state, or the same Idempotency-Key is still being processed.conflict, idempotency_in_progress
413 Payload Too LargeThe body is over the limit, or the image is over 8 MB.payload_too_large
415 Unsupported Media TypeWrong Content-Type, or a file type that is not allowed.unsupported_media_type
421 Misdirected RequestCalled on a community subdomain. Use https://urnextdoor.com.wrong_host
422 Unprocessable ContentField errors, or an Idempotency-Key reused with a different body.validation_failed, idempotency_key_reused
429 Too Many RequestsOver 60 requests a minute from this member (or too many failed key checks from one address), or today's quota for this action is used up.rate_limited, quota_exceeded
500 Internal Server ErrorOur fault. Safe to retry with the same Idempotency-Key.server_error
503 Service UnavailableThe API is switched off.api_disabled

Last updated