API Keys

An alternate way to access Telmai APIs using API Key.

All Telmai APIs can be executed either with OAuth access token or API keys. Use apis listed below to create a key. Use this key in the header of the Telmai APIs instead of the Authorization bearer token like this:

X-TLM-Key:{API Key}

Execute Authenticate API to retrieve access token for Authorization header used below

Tenant Id can be retrieved from the UI as listed here.

Retrieve API Keys for this tenant

GET https://env1.auth.telm.ai/auth/{tenant}/apiKeys

Path Parameters

NameTypeDescription

tenant*

String

Tenant Id

Headers

NameTypeDescription

Authorization*

String

Bearer {{token}}

{
    "keys": [
        {
            "id": "<id>",
            "name": "<api-key-name>",
            "key": "<api-key>"
        }
    ]
}

Add an API Key

POST https://env1.auth.telm.ai/auth/{tenant}/apiKeys

Path Parameters

NameTypeDescription

tenant*

String

Tenant Id

Headers

NameTypeDescription

Authorization

String

Bearer {{token}}

Request Body

NameTypeDescription

name*

String

Name of the API Key

{
    "id": "<api-key-id>",
    "name": "<api-key-name>",
    "key": "<api-key>"
}

Get details of an API Key

GET https://env1.auth.telm.ai/auth/{{tenant}}/apiKeys/{{apiKeyId}}

Path Parameters

NameTypeDescription

tenant*

String

Tenant Id

Headers

NameTypeDescription

Authorization*

String

Bearer {{token}}

{
    "id": "<api-key-id>",
    "name": "<api-key-name>",
    "key": "<api-key>",
    "created_by": "string",
    "created_on": "string"
}

Delete an API Key

DELETE https://env1.auth.telm.ai/auth/{{tenant}}/apiKeys/{{apiKeyId}}

Path Parameters

NameTypeDescription

tenant*

String

Tenant Id

Headers

NameTypeDescription

Authorization*

String

Bearer {{token}}

{
  {
    "message": "API key was deleted successfully"
}

Last updated