Create an API key
curl --request POST \
--url https://api.kintra.io/api/v1/tenant/{tenantId}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expires_at": "<string>",
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expires_at: '<string>', label: '<string>'})
};
fetch('https://api.kintra.io/api/v1/tenant/{tenantId}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kintra.io/api/v1/tenant/{tenantId}/api-keys"
payload = {
"name": "<string>",
"expires_at": "<string>",
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"key_id": "<string>",
"name": "<string>",
"secret": "<string>",
"secret_prefix": "<string>",
"secret_suffix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": {
"id": "<string>",
"key_id": "<string>",
"name": "<string>",
"secret": "<string>",
"secret_prefix": "<string>",
"secret_suffix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}API keys
Create an API key
Creates the credential a Gateway API integration signs its requests with. name is required and has to be unique among your active keys; label and expires_at are optional, where expires_at takes an ISO date or date-time in the future and a date-only value is read as end of day. Omit it for a key that does not expire. The response data carries the key record plus secret, and secret is returned on this response only: it cannot be read back from any other route, so store it before you move on. Send key_id as X-Tenant-Key on gateway requests and sign each one with secret. Returns 403 when your account may not manage keys for this tenant, and 404 when the tenant is not found.
POST
/
tenant
/
{tenantId}
/
api-keys
Create an API key
curl --request POST \
--url https://api.kintra.io/api/v1/tenant/{tenantId}/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expires_at": "<string>",
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expires_at: '<string>', label: '<string>'})
};
fetch('https://api.kintra.io/api/v1/tenant/{tenantId}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kintra.io/api/v1/tenant/{tenantId}/api-keys"
payload = {
"name": "<string>",
"expires_at": "<string>",
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"key_id": "<string>",
"name": "<string>",
"secret": "<string>",
"secret_prefix": "<string>",
"secret_suffix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": {
"id": "<string>",
"key_id": "<string>",
"name": "<string>",
"secret": "<string>",
"secret_prefix": "<string>",
"secret_suffix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}Authorizations
Auth0 access token
Path Parameters
Body
application/json
⌘I

