## Revoke

`client.Admin.APIKeys.Revoke(ctx, apiKeyID) (*AdminAPIKeyRevokeResponse, error)`

**post** `/compute/v1/admin/api-keys/{api_key_id}/revoke`

Revoke an API key

### Parameters

- `apiKeyID string`

### Returns

- `type AdminAPIKeyRevokeResponse struct{…}`

  - `ID string`

    API key ID

  - `AllowedIPs []string`

    IP addresses allowed to use this key. An empty array means all IPs are allowed.

  - `CreatedAt Time`

  - `ExpiresAt Time`

    When the key expires. Null if the key does not expire.

  - `IsActive bool`

  - `KeyPrefix string`

    First 12 characters of the key

  - `KeyType AdminAPIKeyRevokeResponseKeyType`

    - `const AdminAPIKeyRevokeResponseKeyTypeAdmin AdminAPIKeyRevokeResponseKeyType = "admin"`

    - `const AdminAPIKeyRevokeResponseKeyTypeWorkspace AdminAPIKeyRevokeResponseKeyType = "workspace"`

  - `LastUsedAt Time`

  - `Livemode bool`

    Whether this is a live API key (false for test keys).

  - `Name string`

    API key name

  - `WorkspaceID string`

    Workspace ID if workspace-scoped

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/boltz-bio/boltz-api-go"
  "github.com/boltz-bio/boltz-api-go/option"
)

func main() {
  client := boltzapi.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Admin.APIKeys.Revoke(context.TODO(), "api_key_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ID)
}
```
