# Scheduling endpoints

> List your scheduled items, move them to a new time, publish them now, or cancel them before they go live.

Source: https://docs.urnextdoor.com/reference/scheduling/

All paths are relative to `https://urnextdoor.com/api/v1`. See [API reference](https://docs.urnextdoor.com/reference.md) for the envelope and headers every endpoint shares.

| Endpoint | What it does | Scope | Daily quota |
| --- | --- | --- | --- |
| [`GET /scheduled`](https://docs.urnextdoor.com/reference/scheduling/#listScheduled) | List scheduled items | `schedule` | not counted |
| [`POST /scheduled/{type}/{id}/reschedule`](https://docs.urnextdoor.com/reference/scheduling/#rescheduleItem) | Reschedule an item | `schedule` | not counted |
| [`POST /scheduled/{type}/{id}/publish`](https://docs.urnextdoor.com/reference/scheduling/#publishScheduledNow) | Publish a scheduled item now | `schedule` | not counted |
| [`DELETE /scheduled/{type}/{id}`](https://docs.urnextdoor.com/reference/scheduling/#cancelScheduled) | Cancel a scheduled item | `schedule` | not counted |

## List scheduled items {#listScheduled}

`GET https://urnextdoor.com/api/v1/scheduled`

Returns your pending scheduled items of every type, soonest first. Not quota-counted.

- **Auth:** your API key (Bearer or X-API-Key)
- **Scope:** `schedule`
- **Daily quota:** not counted
- **operationId:** `listScheduled`

### Example

**cURL**

```bash
curl "https://urnextdoor.com/api/v1/scheduled" \
  -H "Authorization: Bearer $UND_API_KEY"
```

**JavaScript**

```js
const res = await fetch("https://urnextdoor.com/api/v1/scheduled", {
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
  },
});
console.log(res.status, await res.json());
```

**Python**

```python
import os

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.get(
    "https://urnextdoor.com/api/v1/scheduled",
    headers={
        "Authorization": f"Bearer {api_key}",
    },
    timeout=30,
)
print(response.status_code, response.json())
```

**PHP**

```php
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/scheduled');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;
```

Sample response: `200 OK`

```json
{
  "ok": true,
  "items": [
    {
      "type": "post",
      "id": 41,
      "title": "Five easy ways to save water at home",
      "slug": "five-easy-ways-to-save-water-at-home",
      "url": "/posts/five-easy-ways-to-save-water-at-home",
      "edit_url": "/posts/five-easy-ways-to-save-water-at-home/edit",
      "scheduled_at": "2026-10-20T09:30:00Z",
      "created_at": "2026-10-15T09:00:00Z"
    },
    {
      "type": "community",
      "id": 5,
      "title": "Morning Runners Pune",
      "slug": null,
      "url": null,
      "edit_url": null,
      "scheduled_at": "2026-10-21T04:00:00Z",
      "created_at": "2026-10-15T09:05:00Z"
    }
  ],
  "request_id": "9f8e7d6c5b4a3921"
}
```

### Responses

| Status | Meaning | Codes |
| --- | --- | --- |
| `200 OK` | Your pending items. |   |
| `401 Unauthorized` | No key, or the key is unknown, malformed, revoked or expired, or the member is not active. | `missing_api_key`, `invalid_api_key` |
| `403 Forbidden` | The key lacks the scope, or the member may not do this. | `insufficient_scope`, `forbidden` |
| `404 Not Found` | Unknown route or item, or the item is not yours. | `not_found` |
| `421 Misdirected Request` | Called on a community subdomain. Use https://urnextdoor.com. | `wrong_host` |
| `429 Too Many Requests` | Over 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 Error` | Our fault. Safe to retry with the same Idempotency-Key. | `server_error` |
| `503 Service Unavailable` | The API is switched off. | `api_disabled` |

## Reschedule an item {#rescheduleItem}

`POST https://urnextdoor.com/api/v1/scheduled/{type}/{id}/reschedule`

Moves a scheduled item to a new time (5 minutes to 180 days ahead, UTC). Answers the updated item. 409 if it is no longer scheduled. Not quota-counted.

- **Auth:** your API key (Bearer or X-API-Key)
- **Scope:** `schedule`
- **Daily quota:** not counted
- **Idempotency-Key:** supported (see [Idempotency](https://docs.urnextdoor.com/idempotency.md))
- **operationId:** `rescheduleItem`

### Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `type` | path | Yes | The item type. One of: `post`, `question`, `poll`, `mcq`, `service`, `job`, `job_post`, `community`. |
| `id` | path | Yes | The item id (for a community, the scheduled-creation id). |

### Request body

Send `Content-Type: application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `scheduled_at` | string (date-time) | Yes | Publish later instead of now. ISO 8601 with an offset or Z, at least 5 minutes and at most 180 days ahead. Stored in UTC. |

### Example

**cURL**

```bash
curl -X POST "https://urnextdoor.com/api/v1/scheduled/post/41/reschedule" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "scheduled_at": "2026-10-22T06:00:00Z"
}'
```

**JavaScript**

```js
const res = await fetch("https://urnextdoor.com/api/v1/scheduled/post/41/reschedule", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    scheduled_at: "2026-10-22T06:00:00Z",
  }),
});
console.log(res.status, await res.json());
```

**Python**

```python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/scheduled/post/41/reschedule",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "scheduled_at": "2026-10-22T06:00:00Z",
    },
    timeout=30,
)
print(response.status_code, response.json())
```

**PHP**

```php
<?php
$apiKey = getenv('UND_API_KEY');

$payload = [
    'scheduled_at' => '2026-10-22T06:00:00Z',
];

$ch = curl_init('https://urnextdoor.com/api/v1/scheduled/post/41/reschedule');
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;
```

Sample response: `200 OK`

```json
{
  "ok": true,
  "item": {
    "type": "post",
    "id": 41,
    "title": "Five easy ways to save water at home",
    "slug": "five-easy-ways-to-save-water-at-home",
    "url": "/posts/five-easy-ways-to-save-water-at-home",
    "edit_url": "/posts/five-easy-ways-to-save-water-at-home/edit",
    "scheduled_at": "2026-10-22T06:00:00Z",
    "created_at": "2026-10-15T09:00:00Z"
  },
  "request_id": "9f8e7d6c5b4a3921"
}
```

### Responses

| Status | Meaning | Codes |
| --- | --- | --- |
| `200 OK` | The updated item. |   |
| `400 Bad Request` | The body is not a JSON object, or the Idempotency-Key header is malformed. | `invalid_json`, `invalid_idempotency_key` |
| `401 Unauthorized` | No key, or the key is unknown, malformed, revoked or expired, or the member is not active. | `missing_api_key`, `invalid_api_key` |
| `403 Forbidden` | The key lacks the scope, or the member may not do this. | `insufficient_scope`, `forbidden` |
| `404 Not Found` | Unknown route or item, or the item is not yours. | `not_found` |
| `409 Conflict` | Conflicts with the current state, or the same Idempotency-Key is still being processed. | `conflict`, `idempotency_in_progress` |
| `413 Payload Too Large` | The body is over the limit, or the image is over 8 MB. | `payload_too_large` |
| `415 Unsupported Media Type` | Wrong Content-Type, or a file type that is not allowed. | `unsupported_media_type` |
| `421 Misdirected Request` | Called on a community subdomain. Use https://urnextdoor.com. | `wrong_host` |
| `422 Unprocessable Content` | Field errors, or an Idempotency-Key reused with a different body. | `validation_failed`, `idempotency_key_reused` |
| `429 Too Many Requests` | Over 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 Error` | Our fault. Safe to retry with the same Idempotency-Key. | `server_error` |
| `503 Service Unavailable` | The API is switched off. | `api_disabled` |

## Publish a scheduled item now {#publishScheduledNow}

`POST https://urnextdoor.com/api/v1/scheduled/{type}/{id}/publish`

Publishes a scheduled item immediately instead of waiting. No body needed. 409 if it is no longer scheduled. Not quota-counted.

- **Auth:** your API key (Bearer or X-API-Key)
- **Scope:** `schedule`
- **Daily quota:** not counted
- **Idempotency-Key:** supported (see [Idempotency](https://docs.urnextdoor.com/idempotency.md))
- **operationId:** `publishScheduledNow`

### Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `type` | path | Yes | The item type. One of: `post`, `question`, `poll`, `mcq`, `service`, `job`, `job_post`, `community`. |
| `id` | path | Yes | The item id (for a community, the scheduled-creation id). |

### Example

**cURL**

```bash
curl -X POST "https://urnextdoor.com/api/v1/scheduled/post/41/publish" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

**JavaScript**

```js
const res = await fetch("https://urnextdoor.com/api/v1/scheduled/post/41/publish", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
```

**Python**

```python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.post(
    "https://urnextdoor.com/api/v1/scheduled/post/41/publish",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
print(response.status_code, response.json())
```

**PHP**

```php
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/scheduled/post/41/publish');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;
```

Sample response: `200 OK`

```json
{
  "ok": true,
  "status": "published",
  "url": "/posts/five-easy-ways-to-save-water-at-home",
  "web_url": "https://urnextdoor.com/posts/five-easy-ways-to-save-water-at-home",
  "request_id": "9f8e7d6c5b4a3921"
}
```

### Responses

| Status | Meaning | Codes |
| --- | --- | --- |
| `200 OK` | Published. |   |
| `400 Bad Request` | The body is not a JSON object, or the Idempotency-Key header is malformed. | `invalid_json`, `invalid_idempotency_key` |
| `401 Unauthorized` | No key, or the key is unknown, malformed, revoked or expired, or the member is not active. | `missing_api_key`, `invalid_api_key` |
| `403 Forbidden` | The key lacks the scope, or the member may not do this. | `insufficient_scope`, `forbidden` |
| `404 Not Found` | Unknown route or item, or the item is not yours. | `not_found` |
| `409 Conflict` | Conflicts with the current state, or the same Idempotency-Key is still being processed. | `conflict`, `idempotency_in_progress` |
| `413 Payload Too Large` | The body is over the limit, or the image is over 8 MB. | `payload_too_large` |
| `415 Unsupported Media Type` | Wrong Content-Type, or a file type that is not allowed. | `unsupported_media_type` |
| `421 Misdirected Request` | Called on a community subdomain. Use https://urnextdoor.com. | `wrong_host` |
| `422 Unprocessable Content` | Field errors, or an Idempotency-Key reused with a different body. | `validation_failed`, `idempotency_key_reused` |
| `429 Too Many Requests` | Over 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 Error` | Our fault. Safe to retry with the same Idempotency-Key. | `server_error` |
| `503 Service Unavailable` | The API is switched off. | `api_disabled` |

## Cancel a scheduled item {#cancelScheduled}

`DELETE https://urnextdoor.com/api/v1/scheduled/{type}/{id}`

Cancels a scheduled item by deleting it, so it never goes live. This cannot be undone. Not quota-counted.

- **Auth:** your API key (Bearer or X-API-Key)
- **Scope:** `schedule`
- **Daily quota:** not counted
- **Idempotency-Key:** supported (see [Idempotency](https://docs.urnextdoor.com/idempotency.md))
- **operationId:** `cancelScheduled`

### Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `type` | path | Yes | The item type. One of: `post`, `question`, `poll`, `mcq`, `service`, `job`, `job_post`, `community`. |
| `id` | path | Yes | The item id (for a community, the scheduled-creation id). |

### Example

**cURL**

```bash
curl -X DELETE "https://urnextdoor.com/api/v1/scheduled/post/41" \
  -H "Authorization: Bearer $UND_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

**JavaScript**

```js
const res = await fetch("https://urnextdoor.com/api/v1/scheduled/post/41", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.UND_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
```

**Python**

```python
import os
import uuid

import requests

api_key = os.environ["UND_API_KEY"]

response = requests.delete(
    "https://urnextdoor.com/api/v1/scheduled/post/41",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
print(response.status_code, response.json())
```

**PHP**

```php
<?php
$apiKey = getenv('UND_API_KEY');

$ch = curl_init('https://urnextdoor.com/api/v1/scheduled/post/41');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . $apiKey,
        'Idempotency-Key: ' . bin2hex(random_bytes(16)),
    ],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;
```

Sample response: `200 OK`

```json
{
  "ok": true,
  "deleted": true,
  "request_id": "9f8e7d6c5b4a3921"
}
```

### Responses

| Status | Meaning | Codes |
| --- | --- | --- |
| `200 OK` | Cancelled. |   |
| `400 Bad Request` | The body is not a JSON object, or the Idempotency-Key header is malformed. | `invalid_json`, `invalid_idempotency_key` |
| `401 Unauthorized` | No key, or the key is unknown, malformed, revoked or expired, or the member is not active. | `missing_api_key`, `invalid_api_key` |
| `403 Forbidden` | The key lacks the scope, or the member may not do this. | `insufficient_scope`, `forbidden` |
| `404 Not Found` | Unknown route or item, or the item is not yours. | `not_found` |
| `409 Conflict` | Conflicts with the current state, or the same Idempotency-Key is still being processed. | `conflict`, `idempotency_in_progress` |
| `413 Payload Too Large` | The body is over the limit, or the image is over 8 MB. | `payload_too_large` |
| `415 Unsupported Media Type` | Wrong Content-Type, or a file type that is not allowed. | `unsupported_media_type` |
| `421 Misdirected Request` | Called on a community subdomain. Use https://urnextdoor.com. | `wrong_host` |
| `422 Unprocessable Content` | Field errors, or an Idempotency-Key reused with a different body. | `validation_failed`, `idempotency_key_reused` |
| `429 Too Many Requests` | Over 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 Error` | Our fault. Safe to retry with the same Idempotency-Key. | `server_error` |
| `503 Service Unavailable` | The API is switched off. | `api_disabled` |
