VoiceGateway

Create an API key for the project

POST
/api/v1/org/{orgId}/project/{projectId}/keys

Authorization

consoleSession
cookievg_session<token>

The console's session cookie, set when you sign in. Every operation accepts it, at the role the operation names.

Path Parameters

orgId*string

Authorised orgId; the server must verify organisation/project ownership before any read.

Length1 <= length
projectId*string

Authorised projectId; the server must verify organisation/project ownership before any read.

Length1 <= length

Request Body

application/json
  1. body
name*string

A name for the new key, such as ci.

Length1 <= length <= 64

Response Body

The new key, with its full secret.

application/json
  1. response
keyId*string

The key's id, the 12 characters after vgk_; shown in lists and used to revoke it.

Match^[a-z2-7]{12}$
name*string

The name the admin gave the key.

prefix*string

vgk_ and the key id: the visible start of the key, never the secret.

createdAt*string

When the key was created.

Formatdate-time
createdBy*|

The email of the admin who created the key.

lastUsedAt*|

When the key last read, to the minute.

Formatdate-time
revokedAt*|

When the key was revoked.

Formatdate-time
secret*string

The full key, vgk_ plus the key id plus the secret. Shown only in this answer; the server keeps its SHA-256.

Match^vgk_[a-z2-7]{12}_[A-Za-z0-9_-]{43}$
Example Request
curl -X POST 'https://example.com/api/v1/org/string/project/string/keys' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "keyId": "string",  "name": "string",  "prefix": "string",  "createdAt": "2019-08-24T14:15:22Z",  "createdBy": "string",  "lastUsedAt": "2019-08-24T14:15:22Z",  "revokedAt": "2019-08-24T14:15:22Z",  "secret": "string"}

Was this page helpful?