email_audience_apply
# email_audience_apply
Assign a recipient segment or decide-later (recipientType LATER) to one email in the Email app (pApp F00003). A scheduled email needs CHANGE_SCHEDULED_EMAIL. Write; does not send. A lost receipt stays pending and is never resent; task_resume only observes, and prepared work needs the identical apply. Called without confirmToken it previews and returns a confirmToken; repeating the same input with it executes once.
## Inputs
| Field | Required here | Contract |
| --- | --- | --- |
| `target` | Yes | one of: `SEGMENT`, `LATER` (by `recipientType`) |
| `target.emailId` | Yes | When `target.recipientType` is `SEGMENT`: string; pattern `^[A-Za-z0-9_-]{1,200}$`; Exact email identifier returned by email_drafts_get. |
| `target.segmentId` | Yes | When `target.recipientType` is `SEGMENT`: string; pattern `^[A-Za-z0-9_-]{1,200}$` |
| `target.emailId` | Yes | When `target.recipientType` is `LATER`: string; pattern `^[A-Za-z0-9_-]{1,200}$`; Exact email identifier returned by email_drafts_get. |
| `change` | Yes | object |
| `change.action` | Yes | `assign` |
| `change.confirmation` | No | `CHANGE_SCHEDULED_EMAIL` |
| `confirmToken` | No | string; pattern `^ct[a-f\d]{32}$`; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute. |