Skip to main content
POST
/
organisations
/
{orgId}
/
api-keys
Create an API key
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: 'Production key'})
};

fetch('https://api.prudra.dev/organisations/{orgId}/api-keys', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "key_abc123",
  "name": "Production key",
  "createdAt": "2023-11-07T05:31:56Z",
  "revokedAt": "2023-11-07T05:31:56Z",
  "key": "prv_live_sk_..."
}

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys

Path Parameters

orgId
string
required

Body

application/json
name
string
required
Example:

"Production key"

Response

201 - application/json

API key created

id
string
required
Example:

"key_abc123"

name
string
required
Example:

"Production key"

createdAt
string<date-time>
required
revokedAt
string<date-time> | null
key
string

Raw API key — shown once only

Example:

"prv_live_sk_..."