← Back to blog

How to use the API

The DecryptAds REST API is documented at api.decryptads.com/docs. This is a quick walkthrough for your first request with curl or Postman.

1. Get a token

Sign in to the app, open Account → API keys (/apikeys), create a token, and copy it — it is shown only once.

2. Pick a base URL

Use https://api.decryptads.com/api/ as the prefix for requests. Example: GET https://api.decryptads.com/api/me

3. Send the token

Add either header to every request:

4. Try it in curl

Check that authentication works:

curl -sS \
  -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.decryptads.com/api/me"

Look up a hostname:

curl -sS \
  -H "X-API-Key: YOUR_TOKEN" \
  "https://api.decryptads.com/api/analytics/investigate/example.com"

5. Try it in Postman

  1. New request → paste a URL from the docs.
  2. Authorization → Bearer Token → paste your token (or add X-API-Key under Headers).
  3. Send.

You can import swagger.json into Postman to browse all endpoints.

For AI assistants, see Using DecryptAds with MCP.