Self-contained API users management API docs

The Self-contained API users management API allows self-contained API users to manage the domains they have access to. To access the domain's data, use the standard API. Note that you can only access data of verified domains.

Authentication

Authentication is done by sending the API key in the X-API-KEY header, same as when using the standard API.

Endpoints

/domains/

Allowed methods: GET, PUT, DELETE

Make sure to always include the trailing slash (/domains/)!

GET

Returns the verified and unverified domains associated with the API user.

Example:

#!/usr/bin/env python3

import requests

print(requests.get("https://selfcontained.hackedlist.io/domains/", headers={"X-API-KEY": "YOUR-KEY-HERE"}).json())

# {'verified': [], 'unverified': ['example.com']}

PUT

Adds new unverified domains to the API user.

Example:

#!/usr/bin/env python3

import requests

print(requests.get("https://selfcontained.hackedlist.io/domains/", headers={"X-API-KEY": "YOUR-KEY-HERE"}).json())

# {'verified': [], 'unverified': []}

print(requests.put("https://selfcontained.hackedlist.io/domains/", headers={"X-API-KEY": "YOUR-KEY-HERE"}, json=["example.com"]).json())

# {'verified': [], 'unverified': ['example.com']}

DELETE

Removes domains from the API user (both verified and unverified).

Example:

#!/usr/bin/env python3

import requests

print(requests.get("https://selfcontained.hackedlist.io/domains/", headers={"X-API-KEY": "YOUR-KEY-HERE"}).json())

# {'verified': [], 'unverified': ['example.com']}

print(requests.delete("https://selfcontained.hackedlist.io/domains/", headers={"X-API-KEY": "YOUR-KEY-HERE"}, json=["example.com"]).json())

# {'verified': [], 'unverified': []}

/token

Allowed methods: GET

There are two ways to perform the verification using the token obtained from this endpoint.

Method 1: DNS verification
Add a TXT record with the following content to your DNS provider.

cywetadns-domain-verification=YOUR-TOKEN-HERE

Method 2: HTML tag verification
Add the meta tag to the main page of your site. Your site must support https for this method to work.

<meta name="cywetadns-domain-verification" content="YOUR-TOKEN-HERE">

GET

Returns the verification token.

Example:

#!/usr/bin/env python3

import requests

print(requests.get("https://selfcontained.hackedlist.io/token/", headers={"X-API-KEY": "YOUR-KEY-HERE"}).json())

# {'token': 'YOUR-TOKEN-HERE'}