stack/docs-mintlify/api/admin/emails/update-outbox.mdx
Madison 13fccd32b6
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
DB migration compat / Check if migrations changed (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Build and Run / docker (push) Has been cancelled
Runs E2E API Tests (Local Emulator) / E2E Tests (Local Emulator, Node ${{ matrix.node-version }}) (22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (mock, 22.x) (push) Has been cancelled
Runs E2E API Tests / E2E Tests (Node ${{ matrix.node-version }}, Freestyle ${{ matrix.freestyle-mode }}) (prod, 22.x) (push) Has been cancelled
Runs E2E API Tests with custom port prefix / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Dev Environment Test With Custom Base Port / restart-dev-and-test-with-custom-base-port (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests with custom base port / setup-tests-with-custom-base-port (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
Add docs-mintlify to root
2026-04-01 14:58:41 -05:00

104 lines
2.5 KiB
Plaintext

---
title: "Update Email Outbox Entry"
description: "Updates an email outbox entry. Only emails in editable states (paused, preparing, rendering, render-error, scheduled, queued, server-error) can be modified."
api: "PATCH /api/v1/emails/outbox/{id}"
---
## Request
<ParamField header="x-stack-secret-server-key" type="string" required>
The secret server key for authentication.
</ParamField>
<ParamField header="x-stack-admin-access-token" type="string">
The admin access token.
</ParamField>
<ParamField header="x-stack-project-id" type="string" required>
The project ID.
</ParamField>
<ParamField path="id" type="string" required>
The identifier of the email outbox entry to update.
</ParamField>
<ParamField body="status" type="string">
The new status for the email. Used for pausing, resuming, or canceling emails.
</ParamField>
<ParamField body="subject" type="string">
Updated email subject line.
</ParamField>
<ParamField body="body" type="string">
Updated email body content.
</ParamField>
Only emails in the following states can be modified:
- `paused`
- `preparing`
- `rendering`
- `render-error`
- `scheduled`
- `queued`
- `server-error`
## Response
<ResponseField name="id" type="string">
The unique identifier of the outbox email.
</ResponseField>
<ResponseField name="status" type="string">
The current status of the email.
</ResponseField>
<ResponseField name="simple_status" type="string">
A simplified status representation.
</ResponseField>
<ResponseField name="subject" type="string">
The email subject line.
</ResponseField>
<ResponseField name="recipient" type="string">
The email recipient.
</ResponseField>
<ResponseField name="body" type="string">
The email body content.
</ResponseField>
<ResponseField name="created_at" type="string">
ISO 8601 timestamp of when the email was created.
</ResponseField>
<ResponseField name="updated_at" type="string">
ISO 8601 timestamp of when the email was last updated.
</ResponseField>
<CodeGroup>
```bash cURL
curl -X PATCH 'https://api.stack-auth.com/api/v1/emails/outbox/email_1234567890' \
-H 'Content-Type: application/json' \
-H 'x-stack-secret-server-key: YOUR_SECRET_SERVER_KEY' \
-H 'x-stack-project-id: YOUR_PROJECT_ID' \
-d '{
"status": "paused"
}'
```
```json 200 Response
{
"id": "email_1234567890",
"status": "paused",
"simple_status": "paused",
"subject": "Verify your email",
"recipient": "user@example.com",
"body": "<html>...</html>",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-02T00:00:00Z"
}
```
</CodeGroup>