API Sandbox

The API Sandbox allows you to simulate API responses without incurring charges or impacting your live data. By simply including the header x-demo: 1 in your API calls, you can test your integration with our Onboarding Solution and other products in a controlled environment.

This feature helps you validate requests, experiment with different scenarios, and understand how our APIs respond under various conditions.

How it works

To use the sandbox feature:

  1. Add the header x-demo: 1 to your API requests.
  2. Ensure you include an active API key in the request.
  3. Send a formally correct request with the required payload (as it will be validated as an actual request).
  4. Use the customer_id to simulate specific scenarios:
    • good: Simulates a response containing a positive score.
    • moderate: Simulates a response containing a moderate score.
    • bad: Simulates a response containing a poor score.

You can see a code example in our recipes section How to make a sandbox request

Test different products or solution

In case you want to receive a score for a specific product (email, phone, name, domain) or for a solution (onboarding) you'll need to create a correctly formatted request and then pass the demo parameter.

Depending on the product combination the sandbox will produce the correct response with the requested score cluster.

πŸ“˜

Note: If you want to test how the API handles bad requests, you can send an intentionally invalid payload.

Examples

curl --request POST \
     --url https://api.fido.id/1.0/hub \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: [your_app_key]' \
     --header 'x-demo: 1' \
     --data '
{
     "customer_id": "good",
     "claims": [
          "phone",
          "email",
          "name",
          "score"
     ],
     "phone_number": "39349xxxxxxx",
     "email": "t***@trustfull.com",
     "first_name": "Tony",
     "last_name": "Stark"
}'
curl --request POST \
     --url https://api.fido.id/1.0/hub \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: [your_app_key]' \
     --header 'x-demo: 1' \
     --data '
{
     "customer_id": "bad",
     "claims": [
          "phone",
          "email",
          "name",
          "score"
     ],
     "phone_number": "39349xxxxxxx",
     "email": "t***@trustfull.com",
     "first_name": "Tony",
     "last_name": "Stark"
}'
curl --request POST \
     --url https://api.fido.id/1.0/hub \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: [your_app_key]' \
     --header 'x-demo: 1' \
     --data '
{
     "customer_id": "moderate",
     "claims": [
          "phone"
     ],
     "phone_number": "39349xxxxxxx"
}'

Replace your_app_key with your active API key and customize the payload as needed for your use case