Authentication > API Keys > keysCreate
Commerce APIAuthenticationAPI KeyskeysCreate
keysCreate
POST:keys.json

Description

Create one or multiple API keys.

You cannot give more permissions to API keys than you currently have.

See also: Authentication.

Permission bit: "keys.create"

Topic: API Keys

Arguments

data: [KeyCreate!]!

Main argument for mutations.


shop_id: String!

Unique shop identifier. See also: Unique Identifiers

Example: "sh_EQzGqWoY"


Data Argument Fields

expires_at: String

The date and time when the key expires, RFC3339 format

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


name: String

The name of the key

Example: "unnamed"

Valid when: name's length doesn't exceed 250 characters


permissions: [String!]

A set of permission bits valid for this key


role_ids: [String!]


sales_channel_id: String

Sales channel this API key is associated with

Example: "sc_EQzGqWoY"

Valid when: sales_channel_id matches regexp pattern: ^sc_


Result

[Key!]

Preview (typescript)

Loading module