## Retrieve sequence performance

`sequence.retrieve_performance(strid)  -> SequenceRetrievePerformanceResponse`

**get** `/v1/sequences/{id}/performance`

Retrieves a sequence’s lifetime engagement, totalled by step type and broken down per step, with the live enrollments currently on each step. Test runs are not counted. A sequence that has never been published reports zero counts and no steps.

**[Required scope](/using-the-api/scopes/):** `sequences:read`

**[Rate limit category](/using-the-api/rate-limits/):** Read

### Parameters

- `id: str`

  Unique identifier of the sequence.

### Returns

- `class SequenceRetrievePerformanceResponse: …`

  - `by_step_type: ByStepType`

    Lifetime totals for each step type, across all of its steps.

    - `email: ByStepTypeEmail`

      Email steps.

      - `bounced: int`

        Sent emails that bounced.

      - `bounce_rate: Optional[float]`

        Bounced divided by sent; null if none sent.

      - `current_enrollments: int`

        Enrollments currently on steps of this type, paused ones included.

      - `delivered: int`

        Sent minus bounced, never below zero.

      - `opened: int`

        Sent emails that were opened.

      - `open_rate: Optional[float]`

        Opened divided by delivered; null if none delivered.

      - `replied: int`

        Sent messages that received a reply.

      - `reply_rate: Optional[float]`

        Replied divided by delivered; null if none delivered.

      - `sent: int`

        Messages sent.

    - `linkedin_invite: ByStepTypeLinkedinInvite`

      LinkedIn connection request steps.

      - `acceptance_rate: Optional[float]`

        Accepted divided by sent; null if none sent.

      - `accepted: int`

        Connection requests that were accepted.

      - `current_enrollments: int`

        Enrollments currently on steps of this type, paused ones included.

      - `replied: int`

        Sent messages that received a reply.

      - `reply_rate: Optional[float]`

        Replied divided by sent; null if none sent.

      - `sent: int`

        Messages sent.

    - `linkedin_message: ByStepTypeLinkedinMessage`

      LinkedIn message steps.

      - `current_enrollments: int`

        Enrollments currently on steps of this type, paused ones included.

      - `read: int`

        Sent messages that were read.

      - `read_rate: Optional[float]`

        Read divided by sent; null if none sent.

      - `replied: int`

        Sent messages that received a reply.

      - `reply_rate: Optional[float]`

        Replied divided by sent; null if none sent.

      - `sent: int`

        Messages sent.

    - `wait: ByStepTypeWait`

      Wait steps.

      - `current_enrollments: int`

        Enrollments currently on steps of this type, paused ones included.

    - `wait_for_connection: ByStepTypeWaitForConnection`

      Wait-for-connection steps.

      - `current_enrollments: int`

        Enrollments currently on steps of this type, paused ones included.

  - `per_step: List[PerStep]`

    Per-step statistics in published sequence order, including steps with no activity. Steps no longer in the published definition are included if they have sent messages.

    - `class PerStepEmailStep: …`

      - `bounced: int`

        Sent emails that bounced.

      - `bounce_rate: Optional[float]`

        Bounced divided by sent; null if none sent.

      - `current_enrollments: int`

        Enrollments currently on this step, paused ones included.

      - `delivered: int`

        Sent minus bounced, never below zero.

      - `opened: int`

        Sent emails that were opened.

      - `open_rate: Optional[float]`

        Opened divided by delivered; null if none delivered.

      - `replied: int`

        Sent messages that received a reply.

      - `reply_rate: Optional[float]`

        Replied divided by delivered; null if none delivered.

      - `sent: int`

        Messages sent.

      - `sequence_step_id: str`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequence_step_type: Literal["EMAIL"]`

        - `"EMAIL"`

    - `class PerStepLinkedInMessageStep: …`

      - `current_enrollments: int`

        Enrollments currently on this step, paused ones included.

      - `read: int`

        Sent messages that were read.

      - `read_rate: Optional[float]`

        Read divided by sent; null if none sent.

      - `replied: int`

        Sent messages that received a reply.

      - `reply_rate: Optional[float]`

        Replied divided by sent; null if none sent.

      - `sent: int`

        Messages sent.

      - `sequence_step_id: str`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequence_step_type: Literal["LINKEDIN_MESSAGE"]`

        - `"LINKEDIN_MESSAGE"`

    - `class PerStepLinkedInInviteStep: …`

      - `acceptance_rate: Optional[float]`

        Accepted divided by sent; null if none sent.

      - `accepted: int`

        Connection requests that were accepted.

      - `current_enrollments: int`

        Enrollments currently on this step, paused ones included.

      - `replied: int`

        Sent messages that received a reply.

      - `reply_rate: Optional[float]`

        Replied divided by sent; null if none sent.

      - `sent: int`

        Messages sent.

      - `sequence_step_id: str`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequence_step_type: Literal["LINKEDIN_INVITE"]`

        - `"LINKEDIN_INVITE"`

    - `class PerStepWaitStep: …`

      - `current_enrollments: int`

        Enrollments currently on this step, paused ones included.

      - `sequence_step_id: str`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequence_step_type: Literal["WAIT"]`

        - `"WAIT"`

    - `class PerStepWaitForConnectionStep: …`

      - `current_enrollments: int`

        Enrollments currently on this step, paused ones included.

      - `sequence_step_id: str`

        ID of the step. A step no longer in the published definition keeps its original ID.

      - `sequence_step_type: Literal["WAIT_FOR_CONNECTION"]`

        - `"WAIT_FOR_CONNECTION"`

### Example

```python
from lightfield import Lightfield

client = Lightfield(
    api_key="My API Key",
)
sequence_retrieve_performance_response = client.sequence.retrieve_performance(
    "id",
)
print(sequence_retrieve_performance_response.by_step_type)
```

#### Response

```json
{
  "byStepType": {
    "EMAIL": {
      "bounced": -9007199254740991,
      "bounceRate": 0,
      "currentEnrollments": -9007199254740991,
      "delivered": -9007199254740991,
      "opened": -9007199254740991,
      "openRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "LINKEDIN_INVITE": {
      "acceptanceRate": 0,
      "accepted": -9007199254740991,
      "currentEnrollments": -9007199254740991,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "LINKEDIN_MESSAGE": {
      "currentEnrollments": -9007199254740991,
      "read": -9007199254740991,
      "readRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991
    },
    "WAIT": {
      "currentEnrollments": -9007199254740991
    },
    "WAIT_FOR_CONNECTION": {
      "currentEnrollments": -9007199254740991
    }
  },
  "perStep": [
    {
      "bounced": -9007199254740991,
      "bounceRate": 0,
      "currentEnrollments": -9007199254740991,
      "delivered": -9007199254740991,
      "opened": -9007199254740991,
      "openRate": 0,
      "replied": -9007199254740991,
      "replyRate": 0,
      "sent": -9007199254740991,
      "sequenceStepId": "sequenceStepId",
      "sequenceStepType": "EMAIL"
    }
  ]
}
```
