---
title: "Update an access key"
description: "Update an access key. Needs the admin scope. Request and response shapes come from the OpenAPI description."
canonical: "https://lookio.app/docs/api/accesses/update-access-key"
updated: "2026-10-29"
---

# Update an access key



```http
PATCH https://api.lookio.app/v1/accesses/{access_id}/keys/{key_id}
```

## Authorizations

- `Authorization` (bearer, in header, required)

## Path parameters

- `access_id` (`string`, required)
- `key_id` (`string`, required)

## Body

`application/json`, required

- `name` (`string`, length: `1–100 chars`): A new name: who the key is for.
- `daily_credits` (`integer | null`): Credits this key, per UTC day, inside the access's own ceilings, may spend; null is no ceiling. A call whose price does not fit is refused with `rate_limited` until the window resets.
- `monthly_credits` (`integer | null`): Credits this key, per UTC month, inside the access's own ceilings, may spend; null is no ceiling. A call whose price does not fit is refused with `rate_limited` until the window resets.

## Response

**200**: Update an access key

- `data` (`object`, required)
- `data.id` (`string`, required, pattern: `^aky_[abcdefghjkmnpqrstuvwxyz23456789]{12}$`)
- `data.name` (`string`, required): Who the key is for.
- `data.prefix` (`string`, required): The start of the key (`ak_live_<key id>`), to recognise it. The whole key is shown once, at creation.
- `data.daily_credits` (`integer | null`, required)
- `data.monthly_credits` (`integer | null`, required)
- `data.spent` (`object`, required): Credits spent with this key, this UTC day and month.
- `data.spent.today` (`integer`, required)
- `data.spent.month` (`integer`, required)
- `data.last_used_at` (`string,null`, required)
- `data.created_at` (`string`, required)
- `request_id` (`string`, required)

```json
{
  "data": {
    "id": "aky_h4n8c2v6y9tk",
    "name": "Globex",
    "prefix": "ak_live_k7f2p9x4m1c8",
    "daily_credits": 3000,
    "monthly_credits": null,
    "spent": {
      "today": 60,
      "month": 1800
    },
    "last_used_at": "2026-10-29T10:00:00.000Z",
    "created_at": "2026-10-20T10:00:00.000Z"
  },
  "request_id": "req_01K9X7M2Q4"
}
```

**400**: Possible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**401**: Possible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked, invalid_access_key

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**403**: Possible codes: insufficient_scope, feature_not_available, admin_required, permission_denied

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**404**: Possible codes: resource_not_found

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**413**: Possible codes: request_too_large

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**429**: Possible codes: rate_limited

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**500**: Possible codes: internal_error

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**Example request**

```bash
curl --request PATCH \
  --url 'https://api.lookio.app/v1/accesses/<access_id>/keys/<key_id>' \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "daily_credits": 123,
  "monthly_credits": 123
}'
```
