Skip to main content

Authentication

To interact with the TrustPath API, all requests must be authenticated using an API Key. Your API keys can be managed in the Getting Started → API Keys section of the TrustPath Console.


Accessing Your API Key

  1. Log in to the TrustPath Console.
  2. Navigate to the left-hand menu and select Getting Started → API Keys.
  3. Copy an existing API key or generate a new one if needed.

⚠️ Important:

  • Keep your API key secure. API keys grant access to your TrustPath account and should not be shared publicly or embedded in client-side code.
  • Rotate your API keys regularly. This helps maintain security by invalidating older keys and reducing the risk of unauthorized access.

Why Two API Keys?

TrustPath provides two API keys for enhanced flexibility and security. This dual-key system allows you to:

  • Replace one API key while still using the other for uninterrupted service.
  • Test and deploy changes without downtime.

💡 Best Practice: Store your API keys in a secure location, such as a secrets manager or environment variables, and avoid hardcoding them into your application.


Using Your API Key

All API requests must include the API key in the Authorization header as a Bearer token.

Authorization Header Format

Authorization: Bearer YOUR_API_KEY

Endpoint for Risk Evaluation

To evaluate the risk of user behavior, make a POST request to the following endpoint:

https://api.trustpath.io/v1/risk/evaluate

The API expects input parameters such as an IP address and email address to assess the risk. Detailed input and output parameters are provided in the next sections.


Example Request

Here’s an example of how to evaluate a user’s risk using cURL:

curl --request POST \
--url https://api.trustpath.io/v1/risk/evaluate \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'content-type: application/json' \
--data '{
"ip": "95.91.243.197",
"email": "[email protected]"
}'

Replace the placeholders:

  • YOUR_API_KEY: Your TrustPath API key.
  • ip and email: Input data to be evaluated.

Next Steps

These resources will help you effectively integrate TrustPath's API into your application and interpret its responses.