# api_key.create

Creates API Key.

name is a user-readable name for key.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: api_key_create

#### api_key_create

Type: object

API key configuration data for the new key.

No Additional Properties

##

#### Name

Type: string Default: "nobody"

Human-readable name for the API key.

Must be at least `1` characters long

Must be at most `200` characters long

##

#### Username

## Any of

Type: string
Type: string

Must be at least `1` characters long

##

#### Expires At

Default: null

Expiration timestamp for the API key or `null` for no expiration.

## Any of

Type: string Format: date-time
Type: null

##

#### ApiKeyEntryWithKey

Type: object

The created API key with the actual key value.

No Additional Properties

##

#### Id

Type: integer

Unique identifier for the API key.

##

#### Name

Type: string Default: "nobody"

Human-readable name for the API key.

Must be at least `1` characters long

Must be at most `200` characters long

##

#### Username

Username associated with the API key or `null` for system keys.

## Any of

Type: string
Type: string

Must be at least `1` characters long

Type: null

##

#### User Identifier

User ID (numeric) or SID (string) that owns this API key.

## Any of

Type: integer
Type: string

##

#### Iterations

Type: integer

Number of iterations of PBKDF2-SHA512.

##

#### Salt

Type: string

Base64 encoded salt for API key.

##

#### Stored Key

Type: string

SCRAM StoredKey for API key.

##

#### Server Key

Type: string

SCRAM ServerKey for API key.

##

#### Created At

Type: string Format: date-time

Timestamp when the API key was created.

##

#### Expires At

Default: null

Expiration timestamp for the API key or `null` for no expiration.

## Any of

Type: string Format: date-time
Type: null

##

#### Local

Type: boolean

Whether this API key is for local system use only.

##

#### Revoked

Type: boolean

Whether the API key has been revoked and is no longer valid.

##

#### Revoked Reason

Reason for API key revocation or `null` if not revoked.

## Any of

Type: string
Type: null

##

#### Key

Type: string

The actual API key value (only returned on creation).

##

#### Client Key

Type: string

Pre-computed SCRAM ClientKey.

Required roles: API_KEY_WRITE | READONLY_ADMIN