# Operations and Email Tracking

## What is an Operation?

An Operation represents a single API request to the `v1/Emails` endpoint. When you submit a send request, the Email API validates the input and returns an HTTP `202 Accepted` response that includes an `operationId` and `operationLocation`. To monitor the status and progress of the Operation, use these values.

As Twilio Email processes the Operation, it generates an Email resource for each recipient in the `to` array. Each Email progresses through its own set of statuses as it moves from submission to delivery.

## Retrieve an Operation

To retrieve its status and delivery statistics, make a `GET` request with the Operation ID.

```bash
curl -X GET 'https://comms.twilio.com/v1/Emails/Operations/{operationId}' \
-H 'Content-Type: application/json' \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json {title="Sample response"}
{
    "id": "comms_operation_01h2xcejqtf2nbrexx3vqjhp41",
    "status": "COMPLETED",
    "stats": {
        "total": 2,
        "queued": 0,
        "sent": 0,
        "scheduled": 0,
        "delivered": 2,
        "opened": 0,
        "undelivered": 0,
        "failed": 0,
        "canceled": 0
    },
    "createdAt": "2026-04-05T06:20:00Z",
    "updatedAt": "2026-04-05T06:20:05Z"
}
```

See the [Email Operation API reference](/docs/email/api/reference/email-operation-resource).

## Operation status values

Each Operation progresses through the following statuses:

| Status       | Description                                       |
| ------------ | ------------------------------------------------- |
| `SCHEDULED`  | The operation is scheduled for future processing. |
| `PROCESSING` | The operation is currently being processed.       |
| `COMPLETED`  | All emails in the operation have been processed.  |
| `CANCELED`   | The operation was canceled.                       |

## Retrieve the Emails created by an Operation

To retrieve all Email resources that an Operation created, use the List Emails endpoint with the `operationId` query parameter.

```bash
curl -X GET 'https://comms.twilio.com/v1/Emails?operationId={operationId}' \
-H 'Content-Type: application/json' \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json {title="Sample response"}
{
    "data": [
        {
            "id": "comms_email_01h2xcejqtf2nbrexx3vqjhp41",
            "from": {
                "address": "support@example.com",
                "name": "Support Team"
            },
            "to": {
                "address": "john.doe@example.com",
                "name": "John Doe"
            },
            "content": {
                "subject": "Your subject line",
                "html": "<p>Your message content.</p>",
                "text": "Your message content."
            },
            "status": "DELIVERED",
            "tags": {},
            "operationId": "comms_operation_01h2xcejqtf2nbrexx3vqjhp41",
            "createdAt": "2026-04-05T06:20:00Z",
            "updatedAt": "2026-04-05T06:20:05Z"
        }
    ],
    "pagination": {
        "nextPageToken": null,
        "pageSize": 50
    }
}
```

To learn more about this resource, see the [List Emails API reference](/docs/email/api/reference/mail-send-resource).

## Email status values

Each individual email progresses through a series of statuses as it moves from submission to delivery:

| Status        | Description                                                         |
| ------------- | ------------------------------------------------------------------- |
| `SCHEDULED`   | The email is scheduled for future delivery.                         |
| `QUEUED`      | The email is queued for sending.                                    |
| `SENT`        | The email was sent to the recipient's mail server.                  |
| `DELIVERED`   | The recipient's mail server confirmed delivery.                     |
| `UNDELIVERED` | The email was sent by Twilio but wasn't delivered to the recipient. |
| `OPENED`      | The recipient opened the email.                                     |
| `FAILED`      | The email failed during processing.                                 |
| `CANCELED`    | The email was canceled through an API request.                      |
| `INBOUND`     | The email was received by Twilio from an external source.           |

## Track emails with tags

You can add custom metadata tags to your emails for filtering and tracking. When listing emails, filter by tags using the query string format: `?tags=key1:value1;key2:value2;`.

```bash
curl -X GET 'https://comms.twilio.com/v1/Emails?tags=campaign:monthlyNewsletter;' \
-H 'Content-Type: application/json' \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

To learn more about tag constraints, see [Tags](/docs/email/api/overview#tags).

## Next steps

See the [Personalization guide](/docs/email/api/personalization) to learn how to personalize emails for each recipient.
