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));import requests
url = "https://api.prudra.dev/organisations/{orgId}/api-keys"
payload = { "name": "Production key" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/organisations/{orgId}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Production key"
}
'{
"id": "key_abc123",
"name": "Production key",
"createdAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"key": "prv_live_sk_..."
}Organisation
Create an API key
The raw key is returned once — store it securely. Caller must be a member of the organisation.
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));import requests
url = "https://api.prudra.dev/organisations/{orgId}/api-keys"
payload = { "name": "Production key" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/organisations/{orgId}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Production key"
}
'{
"id": "key_abc123",
"name": "Production key",
"createdAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"key": "prv_live_sk_..."
}Authorizations
Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys
Path Parameters
Body
application/json
Example:
"Production key"

