# apiClientUpdate

Update an OAuth2.0 API application

**Scope required:** security:write

For a complete list of input attributes see the [ApiClientAttributes](https://docs.bunny.com/developer/api-reference/types/apiclientattributes) type

```graphql
mutation apiClientUpdate ($id: ID!, $attributes: ApiClientAttributes!) {
  apiClientUpdate (id: $id, attributes: $attributes) {
      apiClient {
        accessTokenExpiresIn
        authorizationCodeEnabled
        clientCredentialsEnabled
        clientId
        clientSecret
        entityId
        id
        name
        ownerId
        pkceEnabled
        redirectUri
      }
      errors
  }
}
```

## Arguments

```json
{
  "id": "456123",
  "attributes": {
    "name": "",
    "entityId": "",
    "redirectUri": "",
    "scopes": [
      ""
    ],
    "clientCredentialsEnabled": true,
    "authorizationCodeEnabled": true,
    "accessTokenExpiresIn": 123,
    "pkceEnabled": true
  }
}
```

| Name       | Type                                                                                            | Description |
| ---------- | ----------------------------------------------------------------------------------------------- | ----------- |
| id         | ID                                                                                              |             |
| attributes | [ApiClientAttributes](https://docs.bunny.com/developer/api-reference/types/apiclientattributes) |             |

## Response

| Name      | Type                                                                        | Description |
| --------- | --------------------------------------------------------------------------- | ----------- |
| apiClient | [ApiClient](https://docs.bunny.com/developer/api-reference/types/apiclient) |             |
| errors    | List (String)                                                               |             |
