Skip to main content

Getting Started with the API

This guide helps you connect to the Domain Trust API for the first time. It is written for both **non-technical users ** (step-by-step instructions) and technical developers (with examples).


1. Authentication Basics

Domain Trust uses API Keys for authentication.
You must include your API key in the Authorization header:

-H "Authorization: Bearer YOUR_API_KEY"

Getting an API Key

  • Log in via the /api/auth/login endpoint with your email and password.
  • Alternatively, an administrator can create an API key for your organization.
  • Once created, keys cannot be retrieved again, so store them securely.

2. Making Your First Request

Try retrieving the version of the API to confirm everything works:

curl -H "Authorization: Bearer $AUTH_TOKEN" https://domain-trust.globalcyberalliance.org/api/version

Example response:

{
"version": "2.0.6"
}

3. Submitting Domains

To submit domains, use a POST request to /api/domains. Example:

curl -H "Authorization: Bearer $AUTH_TOKEN" -H "Content-Type: application/json" -d '{
"domains": [
{
"domain": "sub.domain.tld",
"abuseType": "phishing",
"activity": "active",
"classification": "possibly-malicious",
"source": "self-reported"
}
]
}' -X POST "https://domain-trust.globalcyberalliance.org/api/domains"

4. Exploring Domains

Retrieve details about a domain:

curl -H "Authorization: Bearer $AUTH_TOKEN" "https://domain-trust.globalcyberalliance.org/api/domains/domain.tld"