# accountApiKey

```graphql
query AccountApiKey($accountId: ID!, $id: ID!) {
  accountApiKey(accountId: $accountId, id: $id) {
    id
    accountId
    name
    keyPrefix
    lastUsedAt
    expiresAt
    createdAt
    updatedAt
    status
    revokedAt
    scopes
    scope
  }
}
```

Get account API key as a signed-in account administrator. Requires account.settings.manage.

## Arguments

| Name        | Type | Required | Description |
| ----------- | ---- | -------- | ----------- |
| `accountId` | ID!  | Yes      |             |
| `id`        | ID!  | Yes      |             |

## Variables

```json
{
  "accountId": "string",
  "id": "string"
}
```

## Responses

| Status | Description                              |
| ------ | ---------------------------------------- |
| 200    | The AccountApiKey in data.accountApiKey. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query AccountApiKey($accountId: ID!, $id: ID!) {\n  accountApiKey(accountId: $accountId, id: $id) {\n    id\n    accountId\n    name\n    keyPrefix\n    lastUsedAt\n    expiresAt\n    createdAt\n    updatedAt\n    status\n    revokedAt\n    scopes\n    scope\n  }\n}",
  "variables": {
    "accountId": "string",
    "id": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "accountApiKey": {
      "id": "string",
      "accountId": "string",
      "name": "string",
      "keyPrefix": "string",
      "lastUsedAt": "string",
      "expiresAt": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "status": "string",
      "revokedAt": "string",
      "scopes": [
        "string"
      ],
      "scope": "string"
    }
  }
}
```
