Skip to main content

Interactive reference

The k-ID API reference includes interactive code samples that allow you to test API endpoints directly from the documentation. Each endpoint page includes code samples and a request interface that you can use to make live API calls.

Interactive reference interface

Interactive request interface

Every endpoint page includes an interactive request interface in the "Request" section. This interface allows you to:

  1. Select the Base URL: Hover over the Base URL field to reveal an Edit button. Click the Edit button to open a dropdown menu with the available Base URLs:

    • Live: https://game-api.k-id.com/api/v1/
    • Test: https://game-api.test.k-id.com/api/v1/
  2. Authenticate your request: Paste your API key into the "Bearer Token" field

    • You can get your API key from the Compliance Studio
    • Make sure you use the correct API key for the environment you've selected (test or live)
  3. Configure the request body: The body field contains a sample request with example values

    • You can modify any of the values in the request body to match your needs
    • Required fields are indicated in the endpoint documentation
  4. Send the request: Click "Send API Request" to complete the API call

  5. View the response: The response is displayed below the request interface, showing the API's response to your request

Code samples

Each endpoint page also includes code samples in the upper right corner showing how to make requests with various programming languages and tools. These samples are for reference and can be copied to use in your own code.

Best practices

  • Use the test environment when experimenting with the API
  • Never commit API keys to version control - use environment variables instead
  • Review the response carefully to understand the API's behavior
  • Check error responses to understand what went wrong if a request fails

For more information about authentication and API keys, see Authentication.