NAV
shell javascript

PrivMX PKI Server

Basic Usage

The Admin PKI API and Accessing the Server

Log in using the auth/token API method and the API_KEY_ID and API_KEY_SECRET, which you received - depending on how the server was launched - from the setup script, or from create_api_key script.

curl -X POST -H "Content-Type: application/json" --data-binary '{
    "jsonrpc":"2.0",
    "id":0,
    "method":
    "auth/token",
    "params":{
        "scope":["user:read_write"],
        "grantType":"client_credentials",
        "clientId":"<API_KEY_ID>",
        "clientSecret":"<API_KEY_SECRET>"
    }
}' http://localhost:8101/main

As a result, one of the fields you will receive will be the access_token field.

You can now use it for methods requiring authentication by providing it in the header as follows: "Authorization: Bearer <access_token>".

Registering PrivMX Bridge Server

To register a PrivMX Bridge server you will use the pkiadmin/setHost method of the Admin PKI API and the generated access token:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <access-token>" --data-binary '{
    "jsonrpc":"2.0",
    "id":0,
    "method":"pkiadmin/setHost",
    "params":{
        "hostPubKey":"<BRIDGE_SERVER_PUBLIC_KEY>",
        "hostUrl":"<BRIDGE_SERVER_HOST_URL>"
    }
}' http://localhost:8101/main

As a result, you will receive a JSON object with an instanceId identifying the added PrivMX Bridge server.

Verification of Registration

In order to verify the correctness of the previous step, you can use pkiadmin/listHosts API method get the list of registered Bridge servers:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <access-token>" --data-binary '{
    "jsonrpc":"2.0",
    "id":0,"method":"pkiadmin/listHosts",
    "params":{}
}' http://localhost:8101/main

The PKI server should return a list of registered PrivMX Bridge records in the form of a JSON object as a result.

Adding User Identification Information

To enable verification of users' public keys, their records (UserIdentity) must be added to the PKI server using pkiadmin/setKey API method:

url -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <access-token>" --data-binary '{
    "jsonrpc":"2.0",
    "id":0,
    "method":"pkiadmin/setKey",
    "params":{
        "userId":"user1",
        "userPubKey":"<USER_PUBLIC_KEY>",
        "instanceId":"<INSTANCE_ID_OF_REGISTERED_BRIDGE_SERVER>",
        "contextId":"<CONTEXT_ID_OF_USER_ON_BRIDGE_SERVERR>"
    }
}' http://localhost:8101/main

From now on, the UserIdentity of a user presenting a given public key will be associated with a specific instance of PrivMX Bridge (and with a context within that server).

Further steps on how to verify the data at the client application level using the PrivMX Endpoint library are described in the PrivMX Docs.

Api errors

Every API request can return any of the common errors, which are only specified in Error Codes section not to duplicate them in every method description.

Methods

Auth

auth/bindAccessToken

Bind Access Token to websocket, request will be executed with the given Token rights.

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/bindAccessToken",
        "params": {
            "accessToken": "SXRzIGEgcmFuZG9tIHRleHQgZW5jb2RlZCBmb3IgdGhlIHRlc3RpbmcgcHVycG9zZSwgaWYgeW91IGRlY29kZWQgdGhpcyB0ZXh0LCB0cmVhdCBpcyBhcyBhIHNvcnQgb2YgZWFzdGVyIGVnZyA6KS4"
        }
    }),
    headers: {
        "Content-type": "application/json"
    }
});
curl -X POST \
    -H "Content-Type: application/json" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/bindAccessToken",
        "params": {
            "accessToken": "SXRzIGEgcmFuZG9tIHRleHQgZW5jb2RlZCBmb3IgdGhlIHRlc3RpbmcgcHVycG9zZSwgaWYgeW91IGRlY29kZWQgdGhpcyB0ZXh0LCB0cmVhdCBpcyBhcyBhIHNvcnQgb2YgZWFzdGVyIGVnZyA6KS4"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
accessToken string Generated earlier Access Token (length in [0,1024])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK OK

Additional errors

No additional errors

auth/createFirstApiKey

Creates and returns a pair of API_KEY_ID and API_KEY_SECRET as long as initializationToken passed in the model equals the token passed through the PMX_INITIALIZATION_TOKEN env variable.

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/createFirstApiKey",
        "params": {
            "initializationToken": "some_secret_token",
            "name": "name_for_api_key"
        }
    }),
    headers: {
        "Content-type": "application/json"
    }
});
curl -X POST \
    -H "Content-Type: application/json" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/createFirstApiKey",
        "params": {
            "initializationToken": "some_secret_token",
            "name": "name_for_api_key"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "apiKeyId": "API_KEY_ID",
        "apiKeySecret": "API_KEY_SECRET"
    }
}
Parameter Type Enum Description
initializationToken string Initialization token (length in [1,1024])
name string New api key name (length in [0,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object API_KEY_ID and API_KEY_SECRET pair
  ›  apiKeyId string
  ›  apiKeySecret string

Additional errors

Error Code Message
96 First api key was already created
97 Initialization token is invalid or not set

auth/forkToken

Generates a Token for a new named session. This method can be used only wth Tokens not bounded to the websocket connection.

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/forkToken",
        "params": {
            "refreshToken": "VtTG9yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0gaXBzdW09yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0ga=",
            "sessionName": "myNewSession"
        }
    }),
    headers: {
        "Content-type": "application/json"
    }
});
curl -X POST \
    -H "Content-Type: application/json" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/forkToken",
        "params": {
            "refreshToken": "VtTG9yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0gaXBzdW09yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0ga=",
            "sessionName": "myNewSession"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "accessToken": "SXRzIGEgcmFuZG9tIHRleHQgZW5jb2RlZCBmb3IgdGhlIHRlc3RpbmcgcHVycG9zZSwgaWYgeW91IGRlY29kZWQgdGhpcyB0ZXh0LCB0cmVhdCBpcyBhcyBhIHNvcnQgb2YgZWFzdGVyIGVnZyA6KS4=",
        "accessTokenExpiresIn": 900000,
        "refreshToken": "TG9yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0gaXBzdW0=",
        "refreshTokenExpiresIn": 604800000,
        "tokenType": "Bearer",
        "scope": [
            "user:read",
            "user:write"
        ]
    }
}
Parameter Type Enum Description
refreshToken string Refresh Token from earlier invocation (length in [0,1024])
sessionName string New session name (length in [0,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object accessToken, refreshToken, expirationTime, scope and sessionName(optional)
  ›  accessToken string Access Token used in authorization
  ›  accessTokenExpiresIn number Access Token lifetime in milliseconds
  ›  tokenType string "Bearer" Token type
  ›  refreshToken string Refresh Token that will be used to generate new Tokens
  ›  refreshTokenExpiresIn number Access Token lifetime in milliseconds
  ›  scope array of string Created Token scope
  ›  sessionName string (optional) Session name

Additional errors

No additional errors

auth/token

Retrieve an Oauth Access Token, to be used for authentication of requests.

Three methods of authentication are supported:

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/token",
        "params": {
            "scope": [
                "user:read_write"
            ],
            "grantType": "client_credentials",
            "clientId": "65ad8f6b2e4f4f1adb40bf68",
            "clientSecret": "5ZTUQ7VBxoqRKn3pEyPjHeavXHVw7JcJF3MvAV43yfsR"
        }
    }),
    headers: {
        "Content-type": "application/json"
    }
});
curl -X POST \
    -H "Content-Type: application/json" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "auth/token",
        "params": {
            "scope": [
                "user:read_write"
            ],
            "grantType": "client_credentials",
            "clientId": "65ad8f6b2e4f4f1adb40bf68",
            "clientSecret": "5ZTUQ7VBxoqRKn3pEyPjHeavXHVw7JcJF3MvAV43yfsR"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "accessToken": "SXRzIGEgcmFuZG9tIHRleHQgZW5jb2RlZCBmb3IgdGhlIHRlc3RpbmcgcHVycG9zZSwgaWYgeW91IGRlY29kZWQgdGhpcyB0ZXh0LCB0cmVhdCBpcyBhcyBhIHNvcnQgb2YgZWFzdGVyIGVnZyA6KS4=",
        "accessTokenExpiresIn": 900000,
        "refreshToken": "TG9yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0gaXBzdW1Mb3JlbSBpcHN1bUxvcmVtIGlwc3VtTG9yZW0gaXBzdW0=",
        "refreshTokenExpiresIn": 604800000,
        "tokenType": "Bearer",
        "scope": [
            "user:read",
            "user:write"
        ]
    }
}

TokenClientCredentialsModel

Parameter Type Enum Description
grantType string "client_credentials" Token grant type
clientId string API Key ID (length in [3,128])
clientSecret string API key secret (length in [32,256])
scope array of string Requested Token scope (length in [0,128])

TokenRefreshTokenModel

Parameter Type Enum Description
grantType string "refresh_token" Token grant type
refreshToken string Refresh Token from earlier invocation (length in [0,1024])

TokenClientSignatureModel

Parameter Type Enum Description
grantType string "client_signature" Token grant type
clientId string API key ID (length in [3,128])
signature string EdDSA signature or Hash (length in [0,4096])
timestamp number Request timestamp (in range: [0,∞])
nonce string Random value used to generate signature (length in [0,64])
scope array of string Requested Token scope (length in [0,128])
data string (optional) Optional signed data (length in [0,512])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object accessToken, refreshToken, expirationTime, scope and sessionName(optional)
  ›  accessToken string Access Token used in authorization
  ›  accessTokenExpiresIn number Access Token lifetime in milliseconds
  ›  tokenType string "Bearer" Token type
  ›  refreshToken string Refresh Token that will be used to generate new Tokens
  ›  refreshTokenExpiresIn number Access Token lifetime in milliseconds
  ›  scope array of string Created Token scope
  ›  sessionName string (optional) Session name

Additional errors

Error Code Message
73 Inssuficent scope
12 Invalid credentials
2 Invalid user or password
43 Account not activated yet
35 Account disabled
71 Api key does not exist
75 Token is expired or has been revoked
76 Token is invalid

PkiAdmin

pkiAdmin/addHostUrl

Add host's URL

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/addHostUrl",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/addHostUrl",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
instanceId string
hostUrl string (length in [3,2048])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK

Additional errors

Error Code Message
86 Cannot add url to the given host.

pkiAdmin/deleteHost

Delete host from PKI

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/deleteHost",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/deleteHost",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
instanceId string

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK

Additional errors

Error Code Message
82 No host for given instanceId

pkiAdmin/deleteKey

Deletes a user’s public key

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/deleteKey",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/deleteKey",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
userId string (length in [3,128])
instanceId string
contextId string (length in [3,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK

Additional errors

Error Code Message
79 No key for user

pkiAdmin/listHosts

List hosts

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/listHosts",
        "params": {}
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/listHosts",
        "params": {}
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128
}

No parameters

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result array of object
  ›  instanceId string
  ›  hostPubKey string
  ›  addresses array of string

Additional errors

No additional errors

pkiAdmin/removeHostUrl

Remove host's URL

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/removeHostUrl",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/removeHostUrl",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
instanceId string
hostUrl string (length in [3,2048])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK

Additional errors

Error Code Message
82 No host for given instanceId
84 Host URL does not exist.

pkiAdmin/setHost

Creates host's identity in PKI

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/setHost",
        "params": {
            "hostPubKey": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/setHost",
        "params": {
            "hostPubKey": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH"
}
Parameter Type Enum Description
hostPubKey string
hostUrl string (length in [3,2048])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string

Additional errors

Error Code Message
85 Cannot add host.

pkiAdmin/setKey

Sets a new public key for a user or updates an existing one.

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/setKey",
        "params": {
            "userId": "user1",
            "userPubKey": "51WPnnGwztNPWUDEbhncYDxZCZWAFS4M9Yqv94N2335nL92fEn",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pkiAdmin/setKey",
        "params": {
            "userId": "user1",
            "userPubKey": "51WPnnGwztNPWUDEbhncYDxZCZWAFS4M9Yqv94N2335nL92fEn",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
userId string (length in [3,128])
userPubKey string
instanceId string
contextId string (length in [3,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK

Additional errors

Error Code Message
81 The key already exists

Pki

pki/getCurrentKey

Retrieves the current public key of a user. Returns null if no key is found.

Requires scope: pki:read

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getCurrentKey",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getCurrentKey",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "userId": "user1",
        "userPubKey": "51WPnnGwztNPWUDEbhncYDxZCZWAFS4M9Yqv94N2335nL92fEn",
        "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6",
        "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
        "createDate": 1752006667020
    }
}
Parameter Type Enum Description
userId string (length in [3,128])
instanceId string
contextId string (length in [3,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object
  ›  instanceId string
  ›  contextId string
  ›  userId string
  ›  userPubKey string (optional)
  ›  createDate number
  ›  customData unknown (optional)

Additional errors

Error Code Message
79 No key for user

pki/getHost

Gets the HostIdentity by the given filter.

Requires scope: pki:read

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getHost",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getHost",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
        "hostPubKey": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
        "addresses": [
            "localhost:3000"
        ]
    }
}
Parameter Type Enum Description
instanceId string (optional)
hostUrl string (optional) (length in [3,2048])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object
  ›  instanceId string
  ›  hostPubKey string
  ›  addresses array of string

Additional errors

Error Code Message
87 Cannot find host by given filter.

pki/getKeyAt

Returns the public key that was assigned to the user at the specified date. Returns null if no key was assigned at that time.

Requires scope: pki:read

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getKeyAt",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6",
            "date": 1752006667021
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getKeyAt",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6",
            "date": 1752006667021
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "userId": "user1",
        "userPubKey": "51WPnnGwztNPWUDEbhncYDxZCZWAFS4M9Yqv94N2335nL92fEn",
        "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6",
        "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
        "createDate": 1752006667021
    }
}
Parameter Type Enum Description
userId string (length in [3,128])
instanceId string
contextId string (length in [3,128])
date number (in range: [0,∞])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object
  ›  instanceId string
  ›  contextId string
  ›  userId string
  ›  userPubKey string (optional)
  ›  createDate number
  ›  customData unknown (optional)

Additional errors

Error Code Message
80 No key for user at given time

pki/getKeyHistory

Returns the modification history of the user's public key. If a key was deleted, the pubKey field is null.

Requires scope: pki:read

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getKeyHistory",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/getKeyHistory",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": [
        {
            "userId": "user1",
            "userPubKey": "51WPnnGwztNPWUDEbhncYDxZCZWAFS4M9Yqv94N2335nL92fEn",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "createDate": 1752006667021
        }
    ]
}
Parameter Type Enum Description
userId string (length in [3,128])
instanceId string
contextId string (length in [3,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result array of object
  ›  instanceId string
  ›  contextId string
  ›  userId string
  ›  userPubKey string (optional)
  ›  createDate number
  ›  customData unknown (optional)

Additional errors

No additional errors

pki/verifyHostById

Verifies the HostIdentity by the given instanceId and hostUrl.

Requires scope: pki:read

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/verifyHostById",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/verifyHostById",
        "params": {
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": true
}
Parameter Type Enum Description
instanceId string
hostUrl string (length in [3,2048])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result boolean

Additional errors

No additional errors

pki/verifyHostByPub

Verifies the HostIdentity by the given instanceId and hostUrl.

Requires scope: pki:read

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/verifyHostByPub",
        "params": {
            "hostPubKey": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/verifyHostByPub",
        "params": {
            "hostPubKey": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "hostUrl": "localhost:3000"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": true
}
Parameter Type Enum Description
hostPubKey string
hostUrl string (length in [3,2048])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result boolean

Additional errors

No additional errors

pki/verifyKey

Verifies whether the given public key was assigned to the user at the specified date.

Requires scope: pki:read

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/verifyKey",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6",
            "userPubKey": "51WPnnGwztNPWUDEbhncYDxZCZWAFS4M9Yqv94N2335nL92fEn",
            "date": 1752006667021
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "pki/verifyKey",
        "params": {
            "userId": "user1",
            "instanceId": "8UV7xqdcyqYDcZomeZbv4YNXLhikz1gt5teR9Qgot8xknL6nhH",
            "contextId": "32fcd0b5-ceb5-44a7-9990-0d999b9718e6",
            "userPubKey": "51WPnnGwztNPWUDEbhncYDxZCZWAFS4M9Yqv94N2335nL92fEn",
            "date": 1752006667021
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": true
}
Parameter Type Enum Description
userId string (length in [3,128])
instanceId string
contextId string (length in [3,128])
userPubKey string
date number (in range: [0,∞])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result boolean

Additional errors

Error Code Message
80 No key for user at given time

User

user/addApiKey

Adds new ApiKey (up to limit of 10)

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/addApiKey",
        "params": {
            "type": "secret",
            "name": "My ApiKey",
            "clientSecret": "myverylongandsecuresecretforapikey",
            "maxScope": [
                "user:read"
            ]
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/addApiKey",
        "params": {
            "type": "secret",
            "name": "My ApiKey",
            "clientSecret": "myverylongandsecuresecretforapikey",
            "maxScope": [
                "user:read"
            ]
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "apiKeyId": "65854daeb50d70e69ed0912d"
    }
}

one of the following: AddApiKeyWithPubKeyModel, AddApiKeyWithSecretModel

AddApiKeyWithPubKeyModel

Parameter Type Enum Description
type string "pubKey" Type of API key
name string ApiKey name (length in [0,128])
clientPubKey string ED25519 PEM encoded public key
maxScope array of string ApiKey max scope, affects possible requests and scope of tokens created using this key (length in [0,128])

AddApiKeyWithSecretModel

Parameter Type Enum Description
type string "secret" Type of API key
name string ApiKey name (length in [0,128])
clientSecret string Client secret used for authorization (length in [32,256])
maxScope array of string ApiKey max scope, affects possible requests and scope of tokens created using this key (length in [0,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object ApiKey ID
  ›  apiKeyId string ApiKey ID

Additional errors

No additional errors

user/deleteApiKey

Deletes ApiKey

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/deleteApiKey",
        "params": {
            "apiKeyId": "65854daeb50d70e69ed0912d"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/deleteApiKey",
        "params": {
            "apiKeyId": "65854daeb50d70e69ed0912d"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
apiKeyId string ApiKey ID (length in [3,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK OK

Additional errors

No additional errors

user/getApiKey

Returns info about ApiKey

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/getApiKey",
        "params": {
            "apiKeyId": "65854daeb50d70e69ed0912d"
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/getApiKey",
        "params": {
            "apiKeyId": "65854daeb50d70e69ed0912d"
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "apiKey": {
            "apiKeyId": "65854daeb50d70e69ed0912d",
            "name": "My ApiKey",
            "enabled": true,
            "maxScope": [
                "profile",
                "websocket"
            ],
            "clientSecret": "secret"
        }
    }
}
Parameter Type Enum Description
apiKeyId string ApiKey ID (length in [3,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object ApiKey info
  ›  apiKey object ApiKey info
  ›    ›  apiKeyId string
  ›    ›  name string
  ›    ›  clientPublicKey string (optional)
  ›    ›  clientSecret string (optional)
  ›    ›  maxScope array of string
  ›    ›  enabled boolean

Additional errors

No additional errors

user/listApiKeys

lists all ApiKeys

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/listApiKeys",
        "params": {}
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/listApiKeys",
        "params": {}
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": {
        "list": [
            {
                "apiKeyId": "65854daeb50d70e69ed0912d",
                "name": "My ApiKey",
                "enabled": true,
                "maxScope": [
                    "profile",
                    "websocket"
                ],
                "clientSecret": "secret"
            }
        ]
    }
}

No parameters

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result object list of ApiKeys
  ›  list array of object list of ApiKeys
  ›    ›  apiKeyId string
  ›    ›  name string
  ›    ›  clientPublicKey string (optional)
  ›    ›  clientSecret string (optional)
  ›    ›  maxScope array of string
  ›    ›  enabled boolean

Additional errors

No additional errors

user/updateApiKey

updates given ApiKey

Parameters

const response = await fetch("https://api.privmx-pki-server/main", {
    method: "POST",
    body: JSON.stringify({
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/updateApiKey",
        "params": {
            "apiKeyId": "65854daeb50d70e69ed0912d",
            "name": "new name",
            "enabled": true,
            "maxScope": [
                "profile"
            ]
        }
    }),
    headers: {
        "Content-type": "application/json", 
        "X-User-Token": "user-token"
    }
});
curl -X POST \
    -H "Content-Type: application/json" -H "X-User-Token: user-token" \
    --data-binary '{
        "jsonrpc": "2.0",
        "id": 128,
        "method": "user/updateApiKey",
        "params": {
            "apiKeyId": "65854daeb50d70e69ed0912d",
            "name": "new name",
            "enabled": true,
            "maxScope": [
                "profile"
            ]
        }
    }' \
    https://api.privmx-pki-server/main

The command above returns JSON structured like this:

{
    "jsonrpc": "2.0",
    "id": 128,
    "result": "OK"
}
Parameter Type Enum Description
apiKeyId string ApiKey ID (length in [3,128])
name string (optional) ApiKey name (length in [0,128])
enabled boolean (optional) ApiKey status
maxScope array of string (optional) ApiKey max scope (length in [0,128])

Response

Parameter Type Enum Description
id number ID sent in the request
jsonrpc string 2.0 The JSON-RPC version
result string OK OK

Additional errors

No additional errors

Errors

HTTP error codes

Error Code Message Description
404 Not Found Given url is invalid.
429 Too Many Requests You're making to many request.
500 Internal Server Error We had a problem with our server. Try again later.
503 Service Unavailable We're temporarily offline for maintenance. Please try again later.

Common Errors

Error Code Message Description
14 Unauthorized Your credentials are invalid
1 Access denied You don't have access to requested resource
45 Insufficient role You don't have enough rights to requested resource
-32601 Method not found Given method does not exist
-32602 Invalid params Given parameters are invalid. The data property of error object contains detailed description what is wrong
-32603 Internal error We had a problem with our server
-32700 Parse error You sent us invalid json
-32600 Invalid request You sent us invalid json rpc request
-32605 Only post method allowed You do not use HTTP POST method

Other JSON-RPC error codes

Error Code Message Description
-32604 Not yet installed Not yet installed
2 Invalid user or password Your username or password is invalid
3 Email already in use This email adress is already in use
8 Context does not exist Context that you wanted to access does not exists
9 Context user does not exist This user does not exists in this specific context
10 User does not exist This user does not exists
11 User token does not exist User token not found
12 Invalid credentials Invalid credentials
15 Pub key already in use This public key is already in use
16 Access key does not exist Access key not found
17 Access key already in use This access key is already in use
18 Access denied to access key You do not have access to this key
19 Instance does not exist Instance not found
20 Organization does not exist Organization not found
21 Solution does not exist Solution not found
22 Instance does not match Solution instance does not match context instance
23 Solution has contexts Solution that you wanted to delete has contexts
24 Cannot assign private context You cannot add private context to solution
25 Cannot unassign context from its parent You cannot unassign context from its parent
26 Cannot switch connected context to private You cannot switch context that shares solutions to private
30 Mail log does not exist Mail log does not exist
31 Mail template already exists Mail template like this already exists
32 Mail template does not exist This mail template was not found
33 Cannot remove mail template lang You cannot remove language from mail template properties
34 Mail does not exist This mail does not exists
35 Account disabled This account is disabled
36 Token does not exist Token was not found
37 Account already activated Account is already activated
38 User already in organization User is already part of this organization
39 User not in organization User is not part of this organization
40 User already has organization User already has his organization
41 Invitation already exists Invitation was already sent
42 Invitation does not exist Invitaion was not found
43 Account not activated yet Account is not acivated yet
44 Open registration disabled You cannot register by yourself, you need invitation
46 Invalid second factor secret Invalid second factor secret code
47 Cannot send second factor code Requirements to send second factor code has not been met
48 Second factor verification failed Second factor verfication failed
51 Second factor invalid code Invalid second factor authorization code
52 Second factor already enabled Second factor is already enabled on this account
53 Second factor already disabled Second factor is already disabled on this account
54 Not in second factor authorization mode Second factor authorization is disabled on this account
55 Invalid Password Your password is invalid
56 Email does not match the invitation Use email that was used to receive invitation
57 SRP not enabled for this account SRP not enabled for this account, to enable it, login with plain password
58 Authorization code does not exists Authorization code does not exists or has already expired
59 Method is callable with websocket only Method is callable with websocket only
60 Manage resource error Error during managing resource, check additional data to more info
61 No match found for provided last id Object with last id has not been found, it may have been deleted
62 Given email is invalid Given email is invalid
63 Maximal api usage resolution exceeded Maximal resolution is 1000
64 Given license does not exist This license does not exist
65 Given license has expired This license has expired
66 License not yet activated License not yet activated
67 Too many login attempts Too many login attempts
68 Too many unsuccessful login attepmts Too many unsuccessful login attepmts
69 Too many totp attempts Too many totp attempts
70 Too many unsuccessful totp attempts Too many unsuccessful totp attempts
71 Api key does not exist Api key does not exist
72 Too many api keys Too many api keys
73 Inssuficent scope Inssuficent scope
74 Session does not exist or exipred Session does not exist or expired
75 Token is expired or has been revoked Token is expired or has been revoked
76 Token is invalid Token is invalid
77 Method callable with session scoped tokens only Method callable with session scoped tokens only
78 User does not exist User with given id does not exist
79 No key for user There is no key matching the given userId and the given context
80 No key for user at given time There is no key matching given userId and context at given time
81 The key already exists The key for the given user and the given context already exists
82 No host for given instanceId There is no host matching the given instanceId
83 Host URL already exists. There is already an entry with the given URL associated to the HostIdentity identified by the given instanceId.
84 Host URL does not exist. There is no entry with the given URL associated to the HostIdentity identified by the given instanceId.
85 Cannot add host. Cannot add host identity to the PKI.
86 Cannot add url to the given host. Cannot add the URL to the host identity identified by the given instanceId.
87 Cannot find host by given filter. Cannot find the host identity by the given filter.
88 Given URL already reserved. There is already a HostIdentity with the given URL associated to it.
89 Host Identity with the given public key already exists. There is already a Host Identity with the given public key.
89 Cannot remove url from the given host. Cannot remove the URL from the host identity identified by the given instanceId.
96 First api key was already created undefined
97 Initialization token is invalid or not set undefined