Validate an API key
curl --request POST \
--url https://api.qontext.ai/auth/validate-key \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qontext.ai/auth/validate-key"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.qontext.ai/auth/validate-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "API key confirmed",
"workspace": {
"id": "ws_123e4567-e89b-12d3-a456-426614174000",
"name": "My Workspace",
"url": "https://myworkspace.com",
"slackChannelLink": "https://qontext.slack.com/channels/workspace-support",
"type": "ai_tool",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z"
}
}{
"message": "<error message(s)>",
"error": "Unauthorized",
"statusCode": 401
}{
"error": "Internal Server Error",
"statusCode": 500
}Authentication Endpoints
Validate an API key
POST
/
auth
/
validate-key
Validate an API key
curl --request POST \
--url https://api.qontext.ai/auth/validate-key \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qontext.ai/auth/validate-key"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.qontext.ai/auth/validate-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "API key confirmed",
"workspace": {
"id": "ws_123e4567-e89b-12d3-a456-426614174000",
"name": "My Workspace",
"url": "https://myworkspace.com",
"slackChannelLink": "https://qontext.slack.com/channels/workspace-support",
"type": "ai_tool",
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z"
}
}{
"message": "<error message(s)>",
"error": "Unauthorized",
"statusCode": 401
}{
"error": "Internal Server Error",
"statusCode": 500
}⌘I