# List Action Attempts

* [Request Parameters](#request-parameters)
* [Response](#response)

Returns a list of the [action attempts](https://docs.seam.co/latest/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s.

{% tabs %}
{% tab title="JavaScript" %}
Returns a list of the action attempts that you specify as an array of `action_attempt_id`s.

**Code:**

```javascript
await seam.actionAttempts.list({
  action_attempt_ids: [
    "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
    "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
  ],
});
```

**Output:**

```javascript
[
  {
    "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
    "action_type": "UNLOCK_DOOR",
    "error": null,
    "result": { "was_confirmed_by_device": false },
    "status": "success"
  },
  {
    "action_attempt_id": "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
    "action_type": "LOCK_DOOR",
    "error": null,
    "result": {},
    "status": "success"
  }
]
```

{% endtab %}

{% tab title="cURL" %}
Returns a list of the action attempts that you specify as an array of `action_attempt_id`s.

**Code:**

```curl
curl --include --request POST "https://connect.getseam.com/action_attempts/list" \
  --header "Authorization: Bearer $SEAM_API_KEY" \
  --json @- <<EOF
{
  "action_attempt_ids": [
    "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
    "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f"
  ]
}
EOF
```

**Output:**

```curl
{
  "action_attempts": [
    {
      "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
      "action_type": "UNLOCK_DOOR",
      "error": null,
      "result": { "was_confirmed_by_device": false },
      "status": "success"
    },
    {
      "action_attempt_id": "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
      "action_type": "LOCK_DOOR",
      "error": null,
      "result": {},
      "status": "success"
    }
  ]
}
```

{% endtab %}

{% tab title="Python" %}
Returns a list of the action attempts that you specify as an array of `action_attempt_id`s.

**Code:**

```python
seam.action_attempts.list(
    action_attempt_ids=[
        "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
        "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
    ]
)
```

**Output:**

```python
[
    ActionAttempt(
        action_attempt_id="5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
        action_type="UNLOCK_DOOR",
        error=None,
        result={"was_confirmed_by_device": false},
        status="success",
    ),
    ActionAttempt(
        action_attempt_id="3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
        action_type="LOCK_DOOR",
        error=None,
        result={},
        status="success",
    ),
]
```

{% endtab %}

{% tab title="Ruby" %}
Returns a list of the action attempts that you specify as an array of `action_attempt_id`s.

**Code:**

```ruby
seam.action_attempts.list(
  action_attempt_ids: %w[5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f 3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f],
)
```

**Output:**

```ruby
[
  {
    "action_attempt_id" => "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
    "action_type" => "UNLOCK_DOOR",
    "error" => nil,
    "result" => {
      was_confirmed_by_device: false,
    },
    "status" => "success",
  },
  {
    "action_attempt_id" => "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
    "action_type" => "LOCK_DOOR",
    "error" => nil,
    "result" => {
    },
    "status" => "success",
  },
]
```

{% endtab %}

{% tab title="PHP" %}
Returns a list of the action attempts that you specify as an array of `action_attempt_id`s.

**Code:**

```php
$seam->action_attempts->list(
    action_attempt_ids: [
        "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
        "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
    ],
);
```

**Output:**

```php
[
    [
        "action_attempt_id" => "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
        "action_type" => "UNLOCK_DOOR",
        "error" => null,
        "result" => ["was_confirmed_by_device" => false],
        "status" => "success",
    ],
    [
        "action_attempt_id" => "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
        "action_type" => "LOCK_DOOR",
        "error" => null,
        "result" => [],
        "status" => "success",
    ],
];
```

{% endtab %}

{% tab title="Seam CLI" %}
Returns a list of the action attempts that you specify as an array of `action_attempt_id`s.

**Code:**

```seam_cli
seam action-attempts list --action_attempt_ids ["5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f","3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f"]
```

**Output:**

```seam_cli
[
  {
    "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
    "action_type": "UNLOCK_DOOR",
    "error": null,
    "result": { "was_confirmed_by_device": false },
    "status": "success"
  },
  {
    "action_attempt_id": "3f2b1c8d-1b5e-4f8c-9c7d-9a8b7c6d5e4f",
    "action_type": "LOCK_DOOR",
    "error": null,
    "result": {},
    "status": "success"
  }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Authentication Methods</summary>

* API key
* Personal access token\
  Must also include the `seam-workspace` header in the request.

To learn more, see [Authentication](https://docs.seam.co/latest/api/authentication).

</details>

## Request Parameters

**`action_attempt_ids`** *Array* *of UUIDs*

IDs of the action attempts that you want to retrieve.

***

**`device_id`** *String*

ID of the device to filter action attempts by.

***

**`limit`** *Number*

Maximum number of records to return per page.

***

**`page_cursor`** *String*

Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.

***

## Response

{% hint style="success" %}
Returns: **Array of** [**action\_attempts**](/latest/api/action_attempts.md)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seam.co/latest/api/action_attempts/list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
