Webhooksv1.00.11.02OpenAPI
1Kosmos · Webhooks

Webhooks API

Deliver signed platform-event callbacks to your endpoints.

The Webhooks service delivers platform events to your own endpoints. Register subscriptions, choose the events you care about, and receive signed callbacks when they happen.

12 endpoints

across 8 resource groups.

ECDSA-signed

every request is signed with your key pair.

JSON over HTTPS

predictable REST, conventional status codes.

Reference

Base URL

All Webhooks endpoints are relative to your environment host. Examples on this page use the 1Kosmos pilot environment — swap in your production root when you go live.

Pilot

Content type

Requests and responses use application/json.

GET/healthz
curl -X GET '/healthz' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
Security

Authentication

Webhooks uses ECDSA key-pair authentication. Each request carries your credentials as HTTP headers; verification-grade calls additionally sign the request body. Retrieve the system signing key from /publickeys.

Credentials
keyIdECDSA Public Keyheader
keySecretECDSA Private Keyheader
licenseLicense key from License Microserviceheader
GET/healthz
cURL
Node.js
Python
curl -X GET '/healthz' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
Reference

Errors

Webhooks uses conventional HTTP status codes: 2xx success, 4xx a problem with the request, 5xx a service-side error.

StatusMeaningDescription
200 / 204OKThe request succeeded.
400Bad RequestValidation failed.
401UnauthorizedMissing or invalid credentials.
403ForbiddenAuthenticated, but not permitted.
404Not FoundThe resource does not exist.
500Server ErrorSomething went wrong on our side.
4XXerror response
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Validation error"
}
Webhooks

Webhooks

Register and manage webhook subscriptions.

POST/tenant/{tenantId}/community/{communityId}/webhooks/fetch

Fetch webhooks.

Fetch webhooks.

  • A valid community license key with auth level system / service or / service_ext is required
  • If the system key is used to fetch webhooks, then only webhooks have the credential object.
  • If another key is used to fetch webhooks, the API does not provide a credential object.

Headers

licensekey (required)

License key encrypted with ECDSA

requestid (required)

JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now

publickey (required)

Public key

Request Body

pIndex (optional)

The pIndex key is a cursor for the pagination.

pSize (optional)

A limit on the number of objects to be returned. The range between 1 to 100 and the default is 25.

tags (optional)

The tags key will use to filter the webhooks

Returns

Returns the fetched webhook data.

This API throw an error if something goes wrong.

Path parameters
NameTypeDescription
tenantIdrequiredstringID of tenant
communityIdrequiredstringID of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize 🔒
requestidrequiredstringJSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒
publickeyrequiredstringPublic Key / Try Authorize 🔒
Request body

Request body contains below fields to fetch webhook.

FieldTypeDescription
pIndexnumber
pSizenumber
tagsarray<string>
POST/tenant/{tenantId}/community/{communityId}/webhooks/fetch
cURL
Node.js
Python
curl -X POST '/tenant/xxxxxxxxxxxx/community/xxxxxxxxxxxx/webhooks/fetch' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pIndex": 0, "pSize": 25, "tags": ["string"]}'
RESPONSE
200
400
401
405
Success Webhooks fetch result with pagination details. ``` { "page": { "index": 0, page number, starting from 0 "total": 50, total number of records "size": 25 number of records, per page }, "data": [ { "_id": "xxxxxxxxxxxxxxx", "tenantId": "xxxx", "communityId": "xxxx", "eventNames": ["xxxx"], "tags": ["xxxxx"], "name": "xxxx", "disabled": false, "createdBy": "xxxx", "query": [ { "key1": "xxxx" } ], "criteria": "ANY", "api": { "type": "POST", "url": "https://xxx.xxxxxx.xxx/xxxxx", "authType": "none", "oAuthGrantType": "client_credentials", "oAuthTokenUrl": "xxxxx", "oAuthScopes": [], "credential": { "username": "xxxx", "password": "xxxx", "keyName": "xxxx", "keyValue": "xxxx", "token": "xxxx", "oauth2": { "clientId": "xxxx", "clientSecret": "xxxx" } } }, "successCodes": [ 200 ], "retryCodes": [ 0 ], "retryCount": 0, "ttl": 0 } ], "publicKey": "servicekey's publickey" } ```
{
  "page": {
    "index": 0,
    "total": 0,
    "size": 0
  },
  "data": [
    {
      "_id": "xxxxxxxxxxxxxxx",
      "tenantId": "xxxx",
      "communityId": "xxxx",
      "eventNames": [
        "xxxx"
      ],
      "name": "xxxx",
      "disabled": false,
      "createdBy": "xxxx",
      "tags": [
        "log_stream"
      ],
      "query": [
        {
          "key1": "xxxx"
        }
      ],
      "criteria": "ANY",
      "api": {
        "type": "POST",
        "url": "https://xxx.xxxxxx.xxx/xxxxx",
        "authType": "none",
        "oAuthGrantType": "client_credentials",
        "oAuthTokenUrl": "xxxx",
        "oAuthScopes": [
          "xxxx"
        ],
        "credential": {
          "username": "xxxx",
          "password": "xxxx",
          "keyName": "xxxx",
          "keyValue": "xxxx",
          "token": "xxxx",
          "oauth2": {
            "clientId": "xxxx",
            "clientSecret": "xxxx"
          }
        }
      },
      "successCodes": [
        200
      ],
      "retryCodes": [
        0
      ],
      "retryCount": 0,
      "ttl": 0
    }
  ]
}
PUT/tenant/{tenantId}/community/{communityId}/webhook

Create webhook.

Create webhook.

  • A valid community license key with auth level system / service or / service_ext is required

Headers

licensekey (required)

License key encrypted with ECDSA

requestid (required)

JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now

publickey (required)

Public key

Request Body

eventNames (required)

This key sets the event names for webhook.

name (required)

This key sets the name for the webhook.

disabled (required)

This key set disabled status of a webhook.

createdBy (required)

This key sets the created by for the webhook.

tags (optional)

The tags key will use to filter the webhooks

query (optional)

The query to filter webhooks.

criteria (optional)

This key sets the status of a webhook. The type key only accept these values ("ALL", "ANY").

api (required)

This key sets the API details of a webhook.

successCodes (required)

This key sets the success codes of a API.

retryCodes (optional)

This key sets the retry codes of a API.

retryCount (optional)

This key sets the retry count of API calles. min = 0, max 2

ttl (optional)

This key sets the ttl of API response. min = 0, max 5

Returns

Returns the created webhook data.

This API throw an error if something goes wrong.

Path parameters
NameTypeDescription
tenantIdrequiredstringID of tenant
communityIdrequiredstringID of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Request body contains below fields to create webhook.

  {
      "eventName": "xxxx",
      "name": "xxxx",
      "disabled": false,
      "createdBy": "xxxx",
      "query": [
         {
          "key1": "xxxx"
         }
       ],
       "criteria": "ANY/ALL",
       "api": {
         "type": "POST",
         "url": "https://xxx.xxxxxx.xxx/xxxxx",
         "authType": "none", // Valid auth types [ none, basic, bearer, api_key, oauth2]
         "oAuthGrantType": "client_credentials", // required for authType = oauth2
         "oAuthTokenUrl": "xxxxx", Token URL for OAuth2, required for authType = oauth2
         "oAuthScopes": [], // Array of OAuth2 scopes, optional
         "credential": {
           "username": "xxxx", // This should be plain text
           "password": "xxxx", // This should be plain text
           "keyName": "xxxx", // This should be plain text
           "keyValue": "xxxx", // This should be plain text
           "token": "xxxx" // This should be plain text
           "oauth2": {
              "clientId": "xxxx", // Client ID for OAuth2
              "clientSecret": "xxxx", // Client Secret for OAuth2
            }
          }
        },
       "successCodes": [
           200
       ],
       "retryCodes": [
          0
       ],
      "retryCount": 0,
      "ttl": 0
  }
FieldTypeDescription
eventNamesrequiredarray<string>
namerequiredstring
disabledboolean
createdBystring
tagsarray<string>
queryarray<object>
criteriastring
apirequiredobject
successCodesrequiredarray<number>
retryCodesarray<number>
retryCountnumber
ttlnumber
PUT/tenant/{tenantId}/community/{communityId}/webhook
cURL
Node.js
Python
curl -X PUT '/tenant/xxxxxxxxxxxx/community/xxxxxxxxxxxx/webhook' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"eventNames": ["xxxx"], "name": "xxxx", "disabled": false, "createdBy": "xxxx", "tags": ["log_stream"], "query": [{"key1": "xxxx"}], "criteria": "ANY", "api": {"type": "POST", "url": "https://xxx.xxxxxx.xxx/xxxxx", "authType": "none", "oAuthGrantType": "client_credentials", "oAuthTokenUrl": "xxxx", "oAuthScopes": ["xxxx"], "credential": {"username": "xxxx", "password": "xxxx", "keyName": "xxxx", "keyValue": "xxxx", "token": "xxxx", "oauth2": {"clientId": "xxxx", "clientSecret": "xxxx"}}}, "successCodes": [200], "retryCodes": [0], "retryCount": 0, "ttl": 0}'
RESPONSE
200
400
401
405
Success
{
  "_id": "xxxxxxxxxxxxxxx",
  "tenantId": "xxxx",
  "communityId": "xxxx",
  "eventNames": [
    "xxxx"
  ],
  "name": "xxxx",
  "disabled": false,
  "createdBy": "xxxx",
  "tags": [
    "log_stream"
  ],
  "query": [
    {
      "key1": "xxxx"
    }
  ],
  "criteria": "ANY",
  "api": {
    "type": "POST",
    "url": "https://xxx.xxxxxx.xxx/xxxxx",
    "authType": "none",
    "oAuthGrantType": "client_credentials",
    "oAuthTokenUrl": "xxxx",
    "oAuthScopes": [
      "xxxx"
    ],
    "credential": {
      "username": "xxxx",
      "password": "xxxx",
      "keyName": "xxxx",
      "keyValue": "xxxx",
      "token": "xxxx",
      "oauth2": {
        "clientId": "xxxx",
        "clientSecret": "xxxx"
      }
    }
  },
  "successCodes": [
    200
  ],
  "retryCodes": [
    0
  ],
  "retryCount": 0,
  "ttl": 0
}
PATCH/tenant/{tenantId}/community/{communityId}/webhook/{webhookId}

Update webhook.

Update webhook.

  • A valid community license key with auth level system / service or / service_ext is required

Headers

licensekey (required)

License key encrypted with ECDSA

requestid (required)

JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now

publickey (required)

Public key

Request Body

name (required)

This key sets the name for the webhook.

disabled (required)

This key set disabled status of a webhook.

eventNames (required)

This key sets the event names for webhook.

query (optional)

The query to filter webhooks.

criteria (optional)

This key sets the status of a webhook. The type key only accept these values ("ALL", "ANY").

api (required)

This key sets the API details of a webhook.

successCodes (required)

This key sets the success codes of a API.

retryCodes (optional)

This key sets the retry codes of a API.

retryCount (optional)

This key sets the retry count of API calles. min = 0, max 2

ttl (optional)

This key sets the ttl of API response. min = 0, max 5

Returns

Returns the created webhook data.

This API throw an error if something goes wrong.

Path parameters
NameTypeDescription
tenantIdrequiredstringID of tenant
communityIdrequiredstringID of community
webhookIdrequiredstringID of webhook
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Request body contains below fields to update webhook.

  {
      "name": "xxxx",
      "disabled": false,
      "eventNames": ['E_IDV_DOCUMENT_VALIDATE'],
      "query": [
         {
          "key1": "xxxx"
         }
       ],
       "criteria": "ANY/ALL",
       "api": {
         "type": "POST",
         "url": "https://xxx.xxxxxx.xxx/xxxxx",
         "authType": "none", // Valid auth types [ none, basic, bearer, api_key, oauth2]
         "oAuthGrantType": "client_credentials", // required for authType = oauth2
         "oAuthTokenUrl": "xxxxx", Token URL for OAuth2, required for authType = oauth2
         "oAuthScopes": [], // Array of OAuth2 scopes, optional
         "credential": {
           "username": "xxxx", // This should be plain text
           "password": "xxxx", // This should be plain text
           "keyName": "xxxx", // This should be plain text
           "keyValue": "xxxx", // This should be plain text
           "token": "xxxx" // This should be plain text
           "oauth2": {
              "clientId": "xxxx", // Client ID for OAuth2
              "clientSecret": "xxxx", // Client Secret for OAuth2
            }
          }
        },
       "successCodes": [
           200
       ],
       "retryCodes": [
          0
       ],
      "retryCount": 0,
      "ttl": 0
  }
FieldTypeDescription
namestring
disabledboolean
eventNamesarray<string>
queryarray<object>
criteriastring
apiobject
successCodesarray<number>
retryCodesarray<number>
retryCountnumber
ttlnumber
PATCH/tenant/{tenantId}/community/{communityId}/webhook/{webhookId}
cURL
Node.js
Python
curl -X PATCH '/tenant/xxxxxxxxxxxxxx/community/xxxxxxxxxxxxxx/webhook/xxxxxxxxxxxxxx' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name": "xxxx", "disabled": false, "eventNames": ["xxxx"], "query": [{"key1": "xxxx"}], "criteria": "ANY", "api": {"type": "POST", "url": "https://xxx.xxxxxx.xxx/xxxxx", "authType": "none", "oAuthGrantType": "client_credentials", "oAuthTokenUrl": "xxxx", "oAuthScopes": ["xxxx"], "credential": {"username": "xxxx", "password": "xxxx", "keyName": "xxxx", "keyValue": "xxxx", "token": "xxxx", "oauth2": {"clientId": "xxxx", "clientSecret": "xxxx"}}}, "successCodes": [200], "retryCodes": [0], "retryCount": 0, "ttl": 0}'
RESPONSE
200
400
401
405
Success
{
  "_id": "xxxxxxxxxxxxxxx",
  "tenantId": "xxxx",
  "communityId": "xxxx",
  "eventNames": [
    "xxxx"
  ],
  "name": "xxxx",
  "disabled": false,
  "createdBy": "xxxx",
  "tags": [
    "log_stream"
  ],
  "query": [
    {
      "key1": "xxxx"
    }
  ],
  "criteria": "ANY",
  "api": {
    "type": "POST",
    "url": "https://xxx.xxxxxx.xxx/xxxxx",
    "authType": "none",
    "oAuthGrantType": "client_credentials",
    "oAuthTokenUrl": "xxxx",
    "oAuthScopes": [
      "xxxx"
    ],
    "credential": {
      "username": "xxxx",
      "password": "xxxx",
      "keyName": "xxxx",
      "keyValue": "xxxx",
      "token": "xxxx",
      "oauth2": {
        "clientId": "xxxx",
        "clientSecret": "xxxx"
      }
    }
  },
  "successCodes": [
    200
  ],
  "retryCodes": [
    0
  ],
  "retryCount": 0,
  "ttl": 0
}
DELETE/tenant/{tenantId}/community/{communityId}/webhook/{webhookId}

Delete webhook.

Delete webhook.

  • A valid community license key with auth level system / service or / service_ext is required

Headers

licensekey (required)

License key encrypted with ECDSA

requestid (required)

JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now

publickey (required)

Public key

Returns

Returns no content.

This API throw an error if something goes wrong.

Path parameters
NameTypeDescription
tenantIdrequiredstringID of tenant
communityIdrequiredstringID of community
webhookIdrequiredstringID of webhook
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
DELETE/tenant/{tenantId}/community/{communityId}/webhook/{webhookId}
cURL
Node.js
Python
curl -X DELETE '/tenant/xxxxxxxxxxxxxx/community/xxxxxxxxxxxxxx/webhook/xxxxxxxxxxxxxx' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
204
400
401
405
Success
// no response body
Webhooks

Service Key

Service Key endpoints.

GET/servicekeys

Get service keys

This endpoint returns available service keys. The license you are using must be of authLevel 'system'

Headers

licensekey (required)

License key encrypted with ECDSA

requestid (required)

JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now

publickey (required)

Public key

Returns

Returns array with service keys

Headers
NameTypeDescription
requestidrequiredstringJSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
GET/servicekeys
cURL
Node.js
Python
curl -X GET '/servicekeys' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
200
400
401
403
500
Success
[
  {
    "tag": "xxxxx",
    "keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
    "keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
    "type": "xxxxx"
  }
]
DELETE/servicekey/{keyId}

Reset Service Key

This endpoint resets service key for given keyId. Deletes current one and recreates a new one. The license you are using must be of authLevel 'system'

Parameters

keyId (required)

The keyId of service key to reset

Headers

licensekey (required)

License key encrypted with ECDSA

requestid (required)

JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now

publickey (required)

Public key

Returns

Returns re-created service key

Path parameters
NameTypeDescription
keyIdrequiredstringkeyId of service key to reset
Headers
NameTypeDescription
requestidrequiredstringJSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
DELETE/servicekey/{keyId}
cURL
Node.js
Python
curl -X DELETE '/servicekey/<keyId>' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
200
400
401
500
Success
[
  {
    "tag": "xxxxx",
    "keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
    "keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
    "type": "xxxxx"
  }
]
Webhooks

ECDSA Helper

ECDSA Helper endpoints.

POST/ecdsa_helper/{method}

Encrypt and decrypt the data string by public key and private key.

Encrypt and decrypt the data string by public key and private key.

Parameters

method (optional)

The method parameter is type of enum. Default value is encrypt.

This parameter only accepts following values

encrypt, decrypt

Request Body

data (optional)

The data key is type of String.

publicKey (required)

The publicKey is type of string.

privateKey (required)

The privateKey is type of string.

Returns

Returns the encrypted/decrypted string.

This API throw an error if something goes wrong. A common source of error is public or private key is not valid.

Path parameters
NameTypeDescription
methodstring
Request body
FieldTypeDescription
datastring
publicKeystring
privateKeystring
POST/ecdsa_helper/{method}
cURL
Node.js
Python
curl -X POST '/ecdsa_helper/<method>' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"data": "Hey, This is example data string.", "publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=", "privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'
RESPONSE
200
successful operation
{
  "data": "xxxxxxxxxxxxxxxxxxxx",
  "publicKey": "xxxxxxxxxxxxxxxxxxxx"
}
Webhooks

Environment

Environment endpoints.

GET/environment

/environment

Provide details regarding the environments.

Returns

Returns an environment object

GET/environment
cURL
Node.js
Python
curl -X GET '/environment' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
200
Success
// no response body
Webhooks

Healthz

Healthz endpoints.

GET/healthz

Get healthz.

Get healthz

Returns

Returns a healthz object

  • ``version = <git-tag>.<commit-id>.<dob>``
  • ``git-tag``: When code is compiled from a git-tag, this must carry the tag name. This should match one of the git tags.
  • ``commit-id``: This is the git-commit-id. eg: When code is built from this, the hex code, in the end, is the commit it.
  • ``dob``: Date Of Build. This is epoc-time-in-se conds that tell the time when the build was created.
  • ​if the code is not built from a git-tag, then the ``version =<commit-id>.<dob>``
GET/healthz
cURL
Node.js
Python
curl -X GET '/healthz' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
200
Success ``` { "status": "all services operational", "publicKey": "string" //same as <service>/publickeys endpoint, "code": "200", "version": "<version>" //as defined above } ```
{
  "status": "all services operational",
  "publicKey": "//same as <service>/publickeys endpoint",
  "code": "200",
  "version": "xxxx.xxxx.xxxx"
}
Webhooks

Public Key

Public Key endpoints.

GET/publickeys

Get system's public key.

Get system's public key.

Returns

Returns a public key object

GET/publickeys
cURL
Node.js
Python
curl -X GET '/publickeys' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
200
401
{
  "publicKey": ""
}
Webhooks

Service Directory

Service Directory endpoints.

GET/sd

Get all service directories.

Get all service directories.

Returns

Returns all service directories.

GET/sd
cURL
Node.js
Python
curl -X GET '/sd' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
200
{
  "name1": "https://xxx.xxxxxx.xxx/xxxxx",
  "name2": "https://xxx.xxxxxx.xxx/xxxxx",
  "name3": "https://xxx.xxxxxx.xxx/xxxxx"
}
Webhooks

Well Known config

Well Known config endpoints.

GET/.well-known

Get well known config.

Get well known config

Returns

Returns an object

GET/.well-known
cURL
Node.js
Python
curl -X GET '/.well-known' \
  -H 'keyId: YOUR_KEY_ID' \
  -H 'keySecret: YOUR_KEY_SECRET' \
  -H 'license: YOUR_LICENSE_KEY'
RESPONSE
200
Success ``` { "public_key": "string" //same as <service>/publickeys endpoint, } ```
{
  "public_key": "//same as <service>/publickeys endpoint"
}
© 2026 1Kosmos · Webhooks service v1.00.11.02Generated from the OpenAPI spec · webhooks.json