# Manage scheduled content

> List your scheduled Ur Next Door items, move them to a new time, publish them now, or cancel them, with the schedule scope of the API.

Source: https://docs.urnextdoor.com/guides/manage-scheduled/

Once something is scheduled (see [Schedule content](https://docs.urnextdoor.com/guides/schedule-content.md)), these four endpoints manage it until it goes live. They need a key with the `schedule` scope and do not count against daily quotas.

| Task | Request |
| --- | --- |
| List what is pending | `GET /api/v1/scheduled` |
| Move to a new time | `POST /api/v1/scheduled/{type}/{id}/reschedule` |
| Publish right now | `POST /api/v1/scheduled/{type}/{id}/publish` |
| Cancel (delete) | `DELETE /api/v1/scheduled/{type}/{id}` |

`{type}` is `post`, `question`, `poll`, `mcq`, `service`, `job` (or `job_post`) or `community`. `{id}` is the `id` from the create response, or from the list. For a scheduled community it is the scheduled-creation id.

You can only manage your own items, and only while they are still scheduled. Anything else answers `404 not_found` (unknown, not yours, or no longer scheduled) or `409 conflict` (it went live, or was cancelled, while you were changing it).

## List scheduled items

Your pending items, soonest first, across every type:

**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"
}
```

Jobs are listed with the type `job_post`. A scheduled community has an empty `slug` and a `null` `url` and `edit_url` until it is created.

## Reschedule an item

Send a new `scheduled_at` (UTC, 5 minutes to 180 days ahead). The response is the updated item.

**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"
}
```

## Publish an item now

No body needed. The response gives the live `url` and `web_url`. For a scheduled community, this creates it now and also returns the new community's `id` and `slug`.

**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"
}
```

## Cancel an item

Cancelling **deletes** the scheduled item. It cannot be undone, and the quota used when it was scheduled is not given back.

**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"
}
```

> **Agents should ask first:**
>
> Tell your AI agent to confirm with you before it cancels anything. The [system prompt](https://docs.urnextdoor.com/ai/system-prompt.md) already does.

## Retries

Send an `Idempotency-Key` with reschedule, publish and cancel too. If a cancel times out and you retry with the same key, you get the first answer back instead of a `404`.

## Next steps

- [Schedule content](https://docs.urnextdoor.com/guides/schedule-content.md).
- [Errors](https://docs.urnextdoor.com/errors.md).
- [Prompt recipes](https://docs.urnextdoor.com/ai/prompt-recipes.md) for reviewing your schedule with an agent.
