# Get an Action Attempt

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

Returns a specified [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts).

{% tabs %}
{% tab title="JavaScript" %}
Returns a specified action attempt.

**Code:**

```javascript
await seam.actionAttempts.get({
  action_attempt_id: "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
});
```

**Output:**

```javascript
{
  "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
  "action_type": "UNLOCK_DOOR",
  "error": null,
  "result": { "was_confirmed_by_device": false },
  "status": "success"
}
```

{% endtab %}

{% tab title="cURL" %}
Returns a specified action attempt.

**Code:**

```curl
curl --include --request POST "https://connect.getseam.com/action_attempts/get" \
  --header "Authorization: Bearer $SEAM_API_KEY" \
  --json @- <<EOF
{
  "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f"
}
EOF
```

**Output:**

```curl
{
  "action_attempt": {
    "action_attempt_id": "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
    "action_type": "UNLOCK_DOOR",
    "error": null,
    "result": { "was_confirmed_by_device": false },
    "status": "success"
  }
}
```

{% endtab %}

{% tab title="Python" %}
Returns a specified action attempt.

**Code:**

```python
seam.action_attempts.get(action_attempt_id="5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f")
```

**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",
)
```

{% endtab %}

{% tab title="Ruby" %}
Returns a specified action attempt.

**Code:**

```ruby
seam.action_attempts.get(action_attempt_id: "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f")
```

**Output:**

```ruby
{
  "action_attempt_id" => "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
  "action_type" => "UNLOCK_DOOR",
  "error" => nil,
  "result" => {
    was_confirmed_by_device: false,
  },
  "status" => "success",
}
```

{% endtab %}

{% tab title="PHP" %}
Returns a specified action attempt.

**Code:**

```php
$seam->action_attempts->get(
    action_attempt_id: "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
);
```

**Output:**

```php
[
    "action_attempt_id" => "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f",
    "action_type" => "UNLOCK_DOOR",
    "error" => null,
    "result" => ["was_confirmed_by_device" => false],
    "status" => "success",
];
```

{% endtab %}

{% tab title="Seam CLI" %}
Returns a specified action attempt.

**Code:**

```seam_cli
seam action-attempts get --action_attempt_id "5f4e3d2c-1b0a-9f8e-7d6c-5b4a3c2d1e0f"
```

**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"
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Authentication Methods</summary>

* API key
* Client session token
* 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_id`** *String* (Required)

ID of the action attempt that you want to get.

***

## Response

{% hint style="success" %}
Returns: [**action\_attempt**](/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/get.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.
