DocumentationAuthentication

Authentication

Create an API key and authenticate requests from your server.

Base URLhttps://api.dehashit.com/api/v1/

Authentication

Include your API key in the X-Api-Key HTTP header when calling the API from your server. Never expose keys in client-side code, mobile applications, or public version control.

Authentication header

X-Api-Key: dh_live_...

Replace dh_live_... with your own key. The example below validates a phone number and is always free, so you can confirm authentication before making a billable lookup.

Example authenticated request

curl -X POST https://api.dehashit.com/api/v1/validations/phone-validation/ \
  -H "X-Api-Key: dh_live_..." \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "254712345678", "country_code": "254"}'

Manage your keys

Generate, rotate, and revoke keys in the API keys dashboard. Copy a new key when it is created: its secret is shown only once. Rotate a key to replace it, and revoke any key you no longer use. Requests with missing, invalid, or revoked keys return 401 unauthorized. Dashboard web sessions use an HTTP-only cookie. Use API keys for these server integrations; dashboard sessions do not authenticate the decrypt or validation endpoints.

Need a hand with your integration? Contact support.