Skip to main content
POST
Create an EPCIS capture key

Authorizations

X-API-Key
string
header
required

Path Parameters

organization_id
string<shortuuid>
required

Identifier of the organization.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$

Body

application/json

The capture key to create.

name
string
required

Label for the key, 1 to 255 characters, such as the device or system that will use it.

Required string length: 1 - 255
Pattern: ^[^\x00]{1,255}$
expires_at
string<date-time> | null

When the key stops working, as a time with a UTC offset. Omit for a key that never expires.

Response

Created

A new EPCIS capture key, with its secret. This is the only response that ever carries the secret.

id
string<shortuuid>
required

Identifier of the key, for revoking it.

Required string length: 22
Pattern: ^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$
name
string
required

Label the key was given, such as the device or system that uses it.

prefix
string
required

First 8 characters of the secret, to tell keys apart. It is not enough to use the key.

is_active
boolean
required

False once the key is revoked; a revoked key captures nothing.

expires_at
string<date-time> | null
required

When the key stops working; null for a key that never expires.

last_used_at
string<date-time> | null
required

When the key last captured an event; null if never used.

created
string<date-time>
required

When the key was created.

secret
string
required

The key itself, sent as the credential when capturing EPCIS events. Shown only in this response; Closient stores a hash, so a lost secret cannot be recovered and the key must be replaced.