# Update key invitations

`PATCH https://api.parklio.com/v2/key-invitations/{id}`

This endpoint allows the user to update key invitations by id

**Auth:** `Authorization: Bearer <token>`

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | The new name of the Operation Token |
| `status` | string (`pending`, `reactived`, `blocked`, `invalid`, `deleted`, `expired`, `activated`) | yes | The new status of the invite |

```json
{
  "name": "New operation token name",
  "status": "blocked"
}
```

## Responses

### 200

```json
{
  "success": true,
  "data": {
    "id": 0,
    "name": "John Doe",
    "sender_id": 0,
    "product_id": 0,
    "receiver_identifier": "john.doe@example.com",
    "receiver_identifier_type": "email",
    "status": "activated",
    "start_time": "2026-01-15T09:30:00.000Z",
    "end_time": "2026-01-15T09:30:00.000Z",
    "is_unlimited": 0,
    "deleted_at": null,
    "activated_at": "2026-01-15T09:30:00.000Z",
    "created_at": "2026-01-15T09:30:00.000Z",
    "updated_at": "2026-01-15T09:30:00.000Z",
    "product": null,
    "sender": {
      "id": 1,
      "email": "john.doe@example.com",
      "name": "John Doe"
    }
  }
}
```

### 401 — Account user is not logged in and they should log in again.

```json
{
  "success": false,
  "errors": [
    {
      "code": 1,
      "message": "Unauthorized access."
    }
  ]
}
```

### 403 — User does not have permission to access requested resource.

```json
{
  "success": false,
  "errors": [
    {
      "code": 4,
      "message": "No permission."
    }
  ]
}
```

### 404 — Resource that has been requested does not exist. User should not try to repeat this request.

```json
{
  "success": false,
  "errors": [
    {
      "code": 6,
      "message": "Resource not found."
    }
  ]
}
```

### 422 — Some of the provided request parameters are missing or are invalid. User should add/change them according to response message.

```json
{
  "success": false,
  "errors": [
    {
      "code": 23,
      "message": "Validation error",
      "field": "field"
    }
  ]
}
```

