# sessionKeys.approveOperation

> Documentation index: [llms.txt](https://namera.ai/llms.txt).

Source: https://namera.ai/docs/sdk/reference/session-keys/approve-operation

Approve a prepared installation or removal.

`namera.sessionKeys.approveOperation()` approve a prepared installation or removal.



## Usage [#usage]

Install `@namera-ai/sdk` and set `NAMERA_API_KEY` on your backend. IDs and responses below are illustrative fixtures; replace IDs with your own resources.

<Tabs items={["index.ts", "client.ts"]}>
<Tab value="index.ts">

```ts title="index.ts"
import { namera } from "./client";
const result = await namera.sessionKeys.approveOperation({
  operationId: "0199dfe1-0000-7000-8000-000000000014",
  approval: { type: "1claw" },
});
if (!result.success) throw new Error(result.error.message);

console.log(result.data);
```

</Tab>
<Tab value="client.ts">

```ts title="client.ts"
import { NameraClient } from "@namera-ai/sdk";

export const namera = new NameraClient({
  apiKey: process.env.NAMERA_API_KEY!,
});
```

</Tab>
</Tabs>

## Returns [#returns]

API methods return a `Promise<NameraResult<T, E>>`. When `success` is `true`,
`data` contains the value described below and `error` is `null`. On failure,
`data` is `null` and `error` describes the failure.

The JSON example shows the complete successful `data`, with illustrative values.
Date-time values use ISO strings in JSON; bigint values use decimal strings.
See [Handling Results and Errors](https://namera.ai/docs/sdk/handling-results-and-errors) for the error shape.

Returns the operation ID and durable status. `signed` means the signed request was persisted for worker submission; it does not mean the installation is confirmed.

<div className="docs-response">

```json
{
  "operationId": "0199dfe1-0000-7000-8000-000000000014",
  "status": "signed"
}
```

</div>

## Parameters [#parameters]

### operationId [#operationid]

Type: `string`. Required. ID returned by preparation or recovery. It must belong to this same API-key actor.

```ts title="index.ts"
import { namera } from "./client";
const result = await namera.sessionKeys.approveOperation({
  operationId: "0199dfe1-0000-7000-8000-000000000014", // [!code focus]
  approval: { type: "1claw" },
});
if (!result.success) throw new Error(result.error.message);

console.log(result.data);
```

### approval [#approval]

Type: `object`. Required. Use `{ type: "1claw" }` for a managed account owner. This explicitly authorizes managed owner signing. For a passkey owner use `{ type: "passkey", response }`, where `response` is the browser’s complete assertion over the validated preparation challenge.

```ts title="index.ts"
import { namera } from "./client";
const result = await namera.sessionKeys.approveOperation({
  operationId: "0199dfe1-0000-7000-8000-000000000014",
  approval: { type: "1claw" }, // [!code focus]
});
if (!result.success) throw new Error(result.error.message);

console.log(result.data);
```

#### approval.response [#approvalresponse]

Type: `PasskeyAuthenticationResponse`. Required only for `type: "passkey"`. The assertion must match the stored account credential, challenge, RP ID, origin, and counter. Keep API credentials on your backend; the browser returns only its assertion to your application.

## Behavior and errors [#behavior-and-errors]

Requires the matching install/uninstall permission. Authorization is checked again before managed signing and at acceptance; revocation prevents unaccepted work from gaining authority. Only the initiating actor can approve. Transient retries reuse the same operation and exact assertion. Accepted signed work remains subject to reconciliation after API-key revocation. Validate using `validateOwnerApproval()` or `validateManagedOwnerApproval()` before this call; the SDK does not silently approve prepared calldata for you. Those helpers require independently reconstructed owner, deployment, call, and fee expectations, not values copied from the preparation.
