pickups.run
Trigger immediate POP3 pickup.
Manually triggers an immediate POP3 mail fetch out of band without changing the regular schedule.
openemail.pickups.run(
mailboxId: string,
pickupId: string,
options?: CallOptions,
): ApiPromise<PickupRunResult>It calls POST /mailboxes/{mailboxId}/pickups/{pickupId}/run: Trigger immediate POP3 pickup in the API reference.
Example
const pickupRunResult = await openemail.pickups.run(mailboxId, pickupId)Arguments
| Argument | Type | Description |
|---|---|---|
mailboxId | string | Mailbox ULID identifier. The path's {mailboxId}. |
pickupId | string | Pickup source identifier. The path's {pickupId}. |
Options
It takes no options of its own. Every call also takes signal, timeout, retry and headers, which say how that one call is sent (call options).
Answer
Awaited, it is the API's JSON, PickupRunResult. It is an ApiPromise: .withResponse() gives the same with the Response it came in, for its headers.
Errors
| Status | What it means |
|---|---|
400 | source_is_self — this source would fetch from the mailbox it delivers into, so the scheduler will not dispatch it |
401 | unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a WWW-Authenticate: Bearer challenge |
404 | Not found or not accessible |
409 | disabled — pickup source must be enabled before running |
429 | run_cooldown — the source was dispatched (by schedule or by hand) less than a minute ago; retryAfter and the Retry-After header say how many seconds to wait. A run already in flight absorbs the trigger, so this bounds the run AFTER the run |
503 | temporary_failure: the platform's storage could not answer just now; retry after the Retry-After window. Any operation can answer this. A write that got it may have been applied, so retry it with the same idempotency key where it takes one, or read the state back first (see Transient failures in the API description) |
A failed call rejects with a RequestError: its status, and its code, the API's error. Decide on the code: one status covers several.
Types
It names these types of the API, each on a page of its own: PickupRunResult.