# Reschedule Email

`PATCH https://api.inboxjot.com/v1/emails/{email_id}`

Moves a scheduled email to a new time. Only an email with the `scheduled` status can change. Needs a Full key. Send an optional `Idempotency-Key` header to retry safely. See Idempotency.

## Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `email_id` | string | Yes | The email id, such as `eml_06d2mfk8r4tq9xv2bnc7s`. |

## Body Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `scheduled_at` | string | Yes | ISO 8601 time with an offset, in the future and up to 30 days ahead. |

## Response

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | No | The email id. |
| `scheduled_at` | string \| null | No | The new send time. |

## Request

cURL:

```bash
curl -X PATCH https://api.inboxjot.com/v1/emails/eml_06d2mfk8r4tq9xv2bnc7s \
  -H "Authorization: Bearer $INBOXJOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scheduled_at": "2026-10-20T09:00:00Z"
  }'
```

Node.js:

```javascript
import { Inboxjot } from 'inboxjot';

const inboxjot = new Inboxjot();

await inboxjot.emails.update('eml_06d2mfk8r4tq9xv2bnc7s', {
  scheduled_at: '2026-10-20T09:00:00Z',
});
```

Rust:

```rust
use inboxjot::{Inboxjot, UpdateEmail};

let client = Inboxjot::from_env()?;

client
    .emails()
    .update("eml_06d2mfk8r4tq9xv2bnc7s", &UpdateEmail {
        scheduled_at: "2026-10-20T09:00:00Z".into(),
    })
    .await?;
```

Go:

```go
client := inboxjot.NewClient("")

at, _ := time.Parse(time.RFC3339, "2026-10-20T09:00:00Z")

email, err := client.Emails.Update(ctx, "eml_06d2mfk8r4tq9xv2bnc7s", inboxjot.UpdateEmailParams{
	ScheduledAt: at,
})
```

Python:

```python
from inboxjot import Inboxjot

inboxjot = Inboxjot()

inboxjot.emails.update(
    "eml_06d2mfk8r4tq9xv2bnc7s", {"scheduled_at": "2026-10-20T09:00:00Z"}
)
```

## Responses

| Status | Description |
| --- | --- |
| 200 | Moved the email to the new time. |
| 400 | A field is missing or invalid, or the Idempotency-Key header is not valid. |
| 401 | The API key is missing, revoked or expired. |
| 403 | The key is a Sending key, or the request comes from outside its IP allowlist. |
| 404 | The email does not exist in this workspace. |
| 409 | The email is not scheduled, or a request with the same Idempotency-Key is still running. |
| 413 | The body is larger than 2 MB. |
| 415 | The Content-Type header is not application/json. |
| 422 | The Idempotency-Key was already used with a different request. |
| 429 | Too many requests for this key. Wait for the seconds in the Retry-After header. |
| 500 | Something failed on our side. Retry later. |

200:

```json
{
  "id": "eml_06d2mfk8r4tq9xv2bnc7s",
  "scheduled_at": "2026-10-20T09:00:00.000Z"
}
```

400:

```json
{
  "name": "validation_error",
  "status": 400,
  "message": "The request body is not valid JSON",
  "errors": [
    {
      "message": "The request body is not valid JSON",
      "location": "body"
    }
  ],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

401:

```json
{
  "name": "unauthorized",
  "status": 401,
  "message": "Unauthorized",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

403:

```json
{
  "name": "forbidden",
  "status": 403,
  "message": "This key cannot be used from 203.0.113.7",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

404:

```json
{
  "name": "not_found",
  "status": 404,
  "message": "Email not found",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

409:

```json
{
  "name": "conflict",
  "status": 409,
  "message": "Only a scheduled email can change",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

413:

```json
{
  "name": "payload_too_large",
  "status": 413,
  "message": "The request body is too large",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

415:

```json
{
  "name": "unsupported_media_type",
  "status": 415,
  "message": "The Content-Type must be application/json",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

422:

```json
{
  "name": "invalid_idempotent_request",
  "status": 422,
  "message": "This idempotency key was already used with a different request",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

429:

```json
{
  "name": "rate_limit_exceeded",
  "status": 429,
  "message": "Too many attempts. Try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

500:

```json
{
  "name": "unknown_error",
  "status": 500,
  "message": "Something went wrong. Please try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```
