Guides 7 min read

Email API returned 202: how to check message delivery

Understand queued, accepted and delivered in Mailcore Email API, check a message by ID and handle timeouts without accidentally sending duplicate emails.

An orange envelope at an intermediate checkpoint between an acceptance receipt and an empty receiving tray
Contents

HTTP 202 means the request was accepted for processing. It does not confirm email delivery. Save the message ID returned by the API, check its status and correlate the result with a delivery event. Even delivered does not prove that the message reached the inbox or was read.

Consider a specific incident: an online shop sends an order confirmation and receives a successful API response, but the customer cannot find the email. The developer needs to locate the stage that needs attention without creating a duplicate through an unnecessary retry.

Four different acknowledgements along the way

The journey starts in your application and ends in the recipient's mail system. Several separate acknowledgements can occur:

  1. The API accepted the job. The request passed the necessary checks and entered the queue. For an asynchronous request, 202 Accepted describes acceptance rather than completed processing.
  2. The provider accepted the send. In Mailcore, accepted means the provider acknowledged the handoff. The recipient might not have received anything yet.
  3. A delivery event arrived. delivered means the provider reported delivery to the receiving mail system. Folder placement, forwarding and mailbox rules are separate concerns.
  4. The person saw the message. None of these statuses establishes that. The message might be in spam, another tab or a corporate quarantine.

Mailbox synchronisation is another part of the journey. If the message appears in webmail but not on a phone, investigating IMAP and SMTP is more useful than sending the order confirmation again.

Which Mailcore statuses to check

These names refer to the Mailcore Email API contract. Similar names in another service can have different meanings.

StatusWhat you knowNext action
queuedThe job is in the queueSave the ID and monitor it; do not create another send
sendingA handoff attempt is in progressWait for the result or investigate the delay
acceptedThe provider acknowledged acceptanceAwait a delivery event; do not assume inbox placement
delayedA delivery-delay event was receivedInspect the reason and subsequent events
deliveredThe provider reported deliveryCheck the recipient address, folders and filters
bouncedA bounce was receivedInvestigate the reason; do not keep sending to an invalid address
complainedA complaint was receivedStop unwanted sends and review recipient consent
rejected / failedThe send was rejected or failedResolve the reported cause first
ambiguousThe provider may have accepted the message, but the attempt's outcome is uncertainCheck events and contact support with the ID; do not resend blindly
simulatedA test simulation ranTest the integration; no real email is expected

This is a set of possible states, not a required sequence. Your handler must not require every intermediate status to appear.

Request the status without sending again

After POST /api/email/v1/emails, save the response's id alongside your order or event ID. Use GET /api/email/v1/emails/{id} with your server-side API key to look it up:

curl --silent --show-error --fail-with-body \
  --connect-timeout 10 --max-time 30 \
  "https://mailcore.uz/api/email/v1/emails/${MAILCORE_EMAIL_ID}" \
  -H "Authorization: Bearer ${MAILCORE_API_KEY}"

This command only retrieves an existing message. Inspect the HTTP response code, id, status, detail, createdAt and updatedAt, plus providerMessageId when available. detail can be empty, so do not assume it always explains a delay. Use the time zone included in the returned timestamps.

The key, project, mode and stream must match the original send. A 404 alone does not prove that the message never existed: check the ID and access context first. The complete request and webhook contract is in the Email API documentation.

Connecting order emails? Mailcore Email API supports queues, statuses and webhooks. Start connecting Email API to set up your sender domain and server integration. Employee mailboxes for everyday correspondence are a separate service.

Timeouts: when a retry creates a second email

A missing client response does not mean the server rejected the request. Your application could time out after the job has already entered the queue. Another request with a new idempotency key can then create another email.

Prepare the safe workflow before the first attempt:

  1. Create a stable key for the business event, such as order-1042-confirm-v1, and persist it with the immutable request payload.
  2. Send the key in Idempotency-Key. After an uncertain HTTP response, retry the identical request with the identical key within the service's idempotency retention period.
  3. Do not change the recipient or content under that key. A message with a different purpose is a separate event and a separate sending decision.
  4. If you already have an id, inspect that message. An ambiguous result is not a reason to create a new send.

This prevents duplicate job creation within the API's documented rules. Idempotency is not a universal guarantee of exactly one email across every external stage. Check the current retention period and limitations in the documentation before implementation.

Delivered, but the recipient cannot find it

First verify the exact address. A typo, old customer address or alias can explain the incident without a transport failure. Ask the recipient to check spam, tabs, rules and corporate quarantine. With mail-administrator access, search logs using timestamps and identifiers, not just the subject.

Next check the sender domain: SPF, DKIM and DMARC alignment. Follow the SPF, DKIM and DMARC guide. Successful authentication does not guarantee inbox placement: reputation, content and recipient reactions also affect filtering. See why emails land in spam for further causes.

Do not change working MX records to diagnose an outbound API email. MX records determine how a domain receives mail; changes belong in an agreed setup plan rather than a generic delivery workaround.

What to record and give support

Maintain a link from internal event ID to idempotency key, Mailcore id, last known status and check time. Webhooks can update state without constant polling; validate their signature and handle duplicate notifications without repeating the business action. Follow the documented verification rules and payload format.

For support, prepare the message ID, timestamp with time zone, status, a safe error description and which recipient folders were checked. Share the recipient address through an agreed protected channel only when needed for investigation. Do not send API keys, password-reset links or full confidential message bodies.

Verify the integration with one controlled scenario: create an event, persist its key, send to your own test mailbox, obtain the ID, query the status, receive the event and inspect the actual email. Separately simulate a timeout and confirm that the application retains the original key. Test mode checks API handling but does not replace a real delivery test.

Sources

Share

Set up sending with Email API

Prepare your sender domain and notification workflow. Start setup and test the integration with addresses you control.

Set up Email API