Skip to Content
Docs
API referencePlatform API

Secret Keys

List secret keys

GET
/instances/{instance_id}/secret-keys

List the instance's secret keys. Revoked keys stay listed for 30 days. Needs instance:read.

Path Parameters

instance_id*string

Instance ID

Query Parameters

page?integer

Page number

limit?integer

Page size (default 25, at most 100)

Response Body

OK

application/json
  1. response
data?array<>

The keys

object?string

Always "list"

pagination?

Pagination information

Example Request
curl -X GET 'https://api.pontive.com/v1/instances/string/secret-keys'
Example Response
{  "data": [    {      "created_at": "string",      "created_by": {        "email": "string",        "id": "string",        "name": "string"      },      "description": "string",      "environment": "production",      "expires_at": "string",      "id": "string",      "instance_id": "string",      "last_used_at": "string",      "leak": {        "detected_at": "string",        "evidence": {          "property1": "string",          "property2": "string"        },        "source": "github_secret_scanning",        "value_preview": "string"      },      "name": "string",      "object": "string",      "preview": "string",      "previous_expires_at": "string",      "previous_preview": "string",      "region": "string",      "revoked_at": "string",      "role": "admin",      "status": "active",      "updated_at": "string",      "value": "string"    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}

Create a secret key

POST
/instances/{instance_id}/secret-keys

Create a secret key for the instance's management API. The answer carries its value once; it is never shown again. Needs instance:secret_keys.manage. An instance holds at most 10 active keys (secret_key_limit_reached); a deleted instance takes none (instance_deleted).

Path Parameters

instance_id*string

Instance ID

Request Body

Create Secret Key Request

application/json
  1. body

Create Secret Key Request

description?string

What the key is for (0–500 characters); null or absent for none

expires_at?string

When the key stops working; null for never. Must be in the future.

name?string

Names the caller, e.g. billing-worker (1–100 characters) required: true

role?string

The key's authority on its instance required: true enum: admin,developer,support,viewer

Value in"admin""developer""support""viewer"

Response Body

Created

application/json
  1. response
created_at?string
created_by?

Who created it

description?string

What the key is for

environment?string

The instance's environment

Value in"production""non_production"
expires_at?string

When the key stops working; null for never

id?string

The key's id; safe to log

instance_id?string

The only instance the key works on

last_used_at?string

Updated at most once a minute

leak?

Set while a leaked value still works

name?string

Names the caller

object?string

Always "secret_key"

preview?string

The value, masked

previous_expires_at?string

When the rolled-out value stops working

previous_preview?string

The rolled-out value's preview while it still works

region?string

The project's region

revoked_at?string
role?string

The key's authority on its instance

Value in"admin""developer""support""viewer"
status?string

active, revoked or expired

Value in"active""revoked""expired"
updated_at?string
value?string

The full value: on create and roll answers only. It is never shown again.

Example Request
curl -X POST 'https://api.pontive.com/v1/instances/string/secret-keys' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "created_at": "string",  "created_by": {    "email": "string",    "id": "string",    "name": "string"  },  "description": "string",  "environment": "production",  "expires_at": "string",  "id": "string",  "instance_id": "string",  "last_used_at": "string",  "leak": {    "detected_at": "string",    "evidence": {      "property1": "string",      "property2": "string"    },    "source": "github_secret_scanning",    "value_preview": "string"  },  "name": "string",  "object": "string",  "preview": "string",  "previous_expires_at": "string",  "previous_preview": "string",  "region": "string",  "revoked_at": "string",  "role": "admin",  "status": "active",  "updated_at": "string",  "value": "string"}

Get a secret key

GET
/instances/{instance_id}/secret-keys/{secret_key_id}

One of the instance's secret keys. Needs instance:read.

Path Parameters

instance_id*string

Instance ID

secret_key_id*string

Secret key ID

Response Body

OK

application/json
  1. response
created_at?string
created_by?

Who created it

description?string

What the key is for

environment?string

The instance's environment

Value in"production""non_production"
expires_at?string

When the key stops working; null for never

id?string

The key's id; safe to log

instance_id?string

The only instance the key works on

last_used_at?string

Updated at most once a minute

leak?

Set while a leaked value still works

name?string

Names the caller

object?string

Always "secret_key"

preview?string

The value, masked

previous_expires_at?string

When the rolled-out value stops working

previous_preview?string

The rolled-out value's preview while it still works

region?string

The project's region

revoked_at?string
role?string

The key's authority on its instance

Value in"admin""developer""support""viewer"
status?string

active, revoked or expired

Value in"active""revoked""expired"
updated_at?string
value?string

The full value: on create and roll answers only. It is never shown again.

Example Request
curl -X GET 'https://api.pontive.com/v1/instances/string/secret-keys/string'
Example Response
{  "created_at": "string",  "created_by": {    "email": "string",    "id": "string",    "name": "string"  },  "description": "string",  "environment": "production",  "expires_at": "string",  "id": "string",  "instance_id": "string",  "last_used_at": "string",  "leak": {    "detected_at": "string",    "evidence": {      "property1": "string",      "property2": "string"    },    "source": "github_secret_scanning",    "value_preview": "string"  },  "name": "string",  "object": "string",  "preview": "string",  "previous_expires_at": "string",  "previous_preview": "string",  "region": "string",  "revoked_at": "string",  "role": "admin",  "status": "active",  "updated_at": "string",  "value": "string"}

Update a secret key

PATCH
/instances/{instance_id}/secret-keys/{secret_key_id}

Change a secret key's name, description or role. A role change takes effect within 30 seconds. Needs instance:secret_keys.manage.

Path Parameters

instance_id*string

Instance ID

secret_key_id*string

Secret key ID

Request Body

Update Secret Key Request

application/json
  1. body

Update Secret Key Request

description?string

A new description; null clears it, and leaving it out keeps it

name?string

A new name (1–100 characters)

role?string

A new role enum: admin,developer,support,viewer

Value in"admin""developer""support""viewer"

Response Body

OK

application/json
  1. response
created_at?string
created_by?

Who created it

description?string

What the key is for

environment?string

The instance's environment

Value in"production""non_production"
expires_at?string

When the key stops working; null for never

id?string

The key's id; safe to log

instance_id?string

The only instance the key works on

last_used_at?string

Updated at most once a minute

leak?

Set while a leaked value still works

name?string

Names the caller

object?string

Always "secret_key"

preview?string

The value, masked

previous_expires_at?string

When the rolled-out value stops working

previous_preview?string

The rolled-out value's preview while it still works

region?string

The project's region

revoked_at?string
role?string

The key's authority on its instance

Value in"admin""developer""support""viewer"
status?string

active, revoked or expired

Value in"active""revoked""expired"
updated_at?string
value?string

The full value: on create and roll answers only. It is never shown again.

Example Request
curl -X PATCH 'https://api.pontive.com/v1/instances/string/secret-keys/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "created_at": "string",  "created_by": {    "email": "string",    "id": "string",    "name": "string"  },  "description": "string",  "environment": "production",  "expires_at": "string",  "id": "string",  "instance_id": "string",  "last_used_at": "string",  "leak": {    "detected_at": "string",    "evidence": {      "property1": "string",      "property2": "string"    },    "source": "github_secret_scanning",    "value_preview": "string"  },  "name": "string",  "object": "string",  "preview": "string",  "previous_expires_at": "string",  "previous_preview": "string",  "region": "string",  "revoked_at": "string",  "role": "admin",  "status": "active",  "updated_at": "string",  "value": "string"}

Revoke a secret key

POST
/instances/{instance_id}/secret-keys/{secret_key_id}/revoke

End a secret key and any still-valid previous value at once. Final: a revoked key cannot be reactivated. Needs instance:secret_keys.manage.

Path Parameters

instance_id*string

Instance ID

secret_key_id*string

Secret key ID

Response Body

OK

application/json
  1. response
created_at?string
created_by?

Who created it

description?string

What the key is for

environment?string

The instance's environment

Value in"production""non_production"
expires_at?string

When the key stops working; null for never

id?string

The key's id; safe to log

instance_id?string

The only instance the key works on

last_used_at?string

Updated at most once a minute

leak?

Set while a leaked value still works

name?string

Names the caller

object?string

Always "secret_key"

preview?string

The value, masked

previous_expires_at?string

When the rolled-out value stops working

previous_preview?string

The rolled-out value's preview while it still works

region?string

The project's region

revoked_at?string
role?string

The key's authority on its instance

Value in"admin""developer""support""viewer"
status?string

active, revoked or expired

Value in"active""revoked""expired"
updated_at?string
value?string

The full value: on create and roll answers only. It is never shown again.

Example Request
curl -X POST 'https://api.pontive.com/v1/instances/string/secret-keys/string/revoke'
Example Response
{  "created_at": "string",  "created_by": {    "email": "string",    "id": "string",    "name": "string"  },  "description": "string",  "environment": "production",  "expires_at": "string",  "id": "string",  "instance_id": "string",  "last_used_at": "string",  "leak": {    "detected_at": "string",    "evidence": {      "property1": "string",      "property2": "string"    },    "source": "github_secret_scanning",    "value_preview": "string"  },  "name": "string",  "object": "string",  "preview": "string",  "previous_expires_at": "string",  "previous_preview": "string",  "region": "string",  "revoked_at": "string",  "role": "admin",  "status": "active",  "updated_at": "string",  "value": "string"}

Rotate a secret key

POST
/instances/{instance_id}/secret-keys/{secret_key_id}/rotate

Replace a secret key's value, keeping the key. The answer carries the new value once. The current value keeps working for expire_previous_in seconds (0 to 604800, default 86400). Needs instance:secret_keys.manage.

Path Parameters

instance_id*string

Instance ID

secret_key_id*string

Secret key ID

Request Body

Rotate Secret Key Request

application/json
  1. body

Rotate Secret Key Request

expire_previous_in?integer

How long the current value keeps working, in seconds: 0 (ends it now) to 604800 (7 days). Defaults to 86400 (24 hours).

Range0 <= value <= 604800

Response Body

OK

application/json
  1. response
created_at?string
created_by?

Who created it

description?string

What the key is for

environment?string

The instance's environment

Value in"production""non_production"
expires_at?string

When the key stops working; null for never

id?string

The key's id; safe to log

instance_id?string

The only instance the key works on

last_used_at?string

Updated at most once a minute

leak?

Set while a leaked value still works

name?string

Names the caller

object?string

Always "secret_key"

preview?string

The value, masked

previous_expires_at?string

When the rolled-out value stops working

previous_preview?string

The rolled-out value's preview while it still works

region?string

The project's region

revoked_at?string
role?string

The key's authority on its instance

Value in"admin""developer""support""viewer"
status?string

active, revoked or expired

Value in"active""revoked""expired"
updated_at?string
value?string

The full value: on create and roll answers only. It is never shown again.

Example Request
curl -X POST 'https://api.pontive.com/v1/instances/string/secret-keys/string/rotate' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "created_at": "string",  "created_by": {    "email": "string",    "id": "string",    "name": "string"  },  "description": "string",  "environment": "production",  "expires_at": "string",  "id": "string",  "instance_id": "string",  "last_used_at": "string",  "leak": {    "detected_at": "string",    "evidence": {      "property1": "string",      "property2": "string"    },    "source": "github_secret_scanning",    "value_preview": "string"  },  "name": "string",  "object": "string",  "preview": "string",  "previous_expires_at": "string",  "previous_preview": "string",  "region": "string",  "revoked_at": "string",  "role": "admin",  "status": "active",  "updated_at": "string",  "value": "string"}