> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ApiKey

> Describes a key a system uses to call an Occtoo API, limited to the scopes it was given. The secret is returned only by `createTenantApiKey`, `createApiKey` and `rotateApiKey`.



**Kind**: `object`

## Fields

**`apiIds`**: `[String!]!`

Ids of the APIs the key may call.

---

**`createdBy`**: `String!`

Name of the user who created the key.

---

**`createdOn`**: `String!`

When the key was created, as an ISO 8601 date-time string.

---

**`id`**: `ID!`

Global id of the key: base64 of `ApiKey:<raw id>`. `apiKey` takes it. `rotateApiKey` and `deleteApiKey` take the raw id (`ApiKeyWithSecret.id`, e.g. `api_key_0195ac80a14e8d71f42b98e75d3c61ad`).

---

**`keyPrefix`**: `String!`

First characters of the key, to tell keys apart without the secret.

---

**`keySuffix`**: `String!`

Last characters of the key, to tell keys apart without the secret.

---

**`lastVerifiedIp`**: `String`

IP address the key was last verified from. Null if it never has been.

---

**`lastVerifiedOn`**: `String`

When the key was last verified, as an ISO 8601 date-time string. Null if it never has been.

---

**`name`**: `String!`

Name of the key.

---

**`organizationId`**: `String`

Organization code of the tenant the key belongs to.

---

**`scopes`**: `[String!]!`

Scopes the key was given. `tenantScopes` lists the ones a tenant-level key can get.

---

**`status`**: `String!`

State of the key, in lowercase (e.g. `active`, `revoked`). `apiKeys` filters on it with `status`.

---

**`type`**: `String!`

Kind of key, in lowercase: `organization` for a tenant-level key, `user` for a key tied to one user. `apiKeys` filters on it with `keyType`.

---

**`userId`**: `String`

Sign-in id of the user a user key belongs to; not `UserV2.id`. Null for a tenant-level key.

---

**`verificationCount`**: `Int!`

Number of times the key has been verified.



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.