> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pocketsflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Resends and subject tests

> Resend a post to the people who did not open it, and send a post with an A/B subject test, from the API or an AI agent.

Both work on newsletter posts (`/newsletters/posts`). Product guide:
[Resends and subject tests](/selling/resend-and-subject-tests).

<Note>
  Growth plan and above. Scheduling a resend and starting a subject test
  answer `403` with `code: FEATURE_LOCKED` below it. Reading and cancelling
  stay open. Every email counts toward your monthly sends and goes through
  the same checks as `POST /newsletters/posts/{id}/send` (`402
      SEND_ALLOWANCE_EXCEEDED`, `429 DAILY_SEND_LIMIT`, …).
</Note>

## Endpoints

| Method | Endpoint | Operation ID | MCP tool |
| - | - | - | - |
| `GET` | `/newsletters/posts/{id}/resend` | `getPostResend` | `get_post_resend` |
| `POST` | `/newsletters/posts/{id}/resend` | `scheduleResendToNonOpeners` | `resend_to_non_openers` |
| `DELETE` | `/newsletters/posts/{id}/resend` | `cancelResendToNonOpeners` | `cancel_resend` |
| `GET` | `/newsletters/posts/{id}/subject-test` | `getSubjectTest` | `get_subject_test` |
| `POST` | `/newsletters/posts/{id}/subject-test` | `startSubjectTest` | `start_subject_test` |

## Resend to non-openers

```bash theme={"system"}
curl -X POST https://api.pocketsflow.com/newsletters/posts/POST_ID/resend \
  -H "Authorization: Bearer pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "subject": "In case you missed it: the spring drop", "delayHours": 48 }'
```

The resend is scheduled `delayHours` (1–168, default 48) after the original
send, and never sooner than 10 minutes from now. When it runs it goes to
everyone who received the post (or one of its subject-test arms), has not
opened it and is still subscribed. It is its own post (`resend.postId`).

`GET` answers `recipients`, `opened`, `openRate`, `nonOpeners` (who it would
go to right now), `eligible` with a `reason` when not (`NOT_SENT`,
`ALREADY_SCHEDULED`, `ALREADY_RESENT`, `NO_NON_OPENERS`, …) and `resend`
with its status and its own `sent` / `opened` / `openRate`.

## Subject tests

```bash theme={"system"}
curl -X POST https://api.pocketsflow.com/newsletters/posts/POST_ID/subject-test \
  -H "Authorization: Bearer pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "subjectB": "20% off the spring drop", "testPercent": 20, "waitHours": 4 }'
```

Call it on a draft instead of `/send`. Subject A (the post's subject) and B
go to two random halves of a `testPercent` slice (10–50, default 20) right
away; after `waitHours` (1–72, default 4) the subject with the higher unique
open rate wins (a tie keeps A), and the post is sent with it to everyone
else. The post stays `scheduled` until then. The audience needs at least 50
subscribers (`400 AUDIENCE_TOO_SMALL`).

`GET` answers `subjectTest` (settings, `status: testing | decided`,
`winner`, `results`), `arms.A` / `arms.B` with live unique opens, and
`rest`, the winner's send.

## Opens

Opens are unique per person: every campaign email carries a signed 1×1
tracking image and the first load counts. Image blocking and privacy proxies
make any open count approximate.

## SDK

```ts theme={"system"}
await pocketsflow.posts.resendToNonOpeners(postId, { subject: "Did you see this?" });
await pocketsflow.posts.startSubjectTest(postId, { subjectB: "Another subject" });
const test = await pocketsflow.posts.getSubjectTest(postId);
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.