# apiKey

```graphql
query ApiKey($id: ID!) {
  apiKey(id: $id) {
    id
    projectId
    userId
    accountId
    name
    keyPrefix
    lastUsedAt
    expiresAt
    createdAt
    updatedAt
    status
    revokedAt
    scopes
    scope
  }
}
```

Return one API key's metadata, status and scopes, without its secret.

## Arguments

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

## Variables

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

## Responses

| Status | Description                |
| ------ | -------------------------- |
| 200    | The ApiKey in data.apiKey. |

## 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 ApiKey($id: ID!) {\n  apiKey(id: $id) {\n    id\n    projectId\n    userId\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": {
    "id": "string"
  }
}'
```

## Example response

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