๐ฎ POST /api/v1/gsc/check-domain-safety/
Creates a CommandRequest for check_domain_safety.
๐งพ Request body
domainโ a domainaccount_emailโ optional- if omitted, the account is selected via
DomainAccountMapping
- if omitted, the account is selected via
callback_urlโ optional
๐ Domain notes
If account_email is omitted, the domain must exist in DomainAccountMapping.
The mapping stores root domains only (no subdomains).
Additionally, the domain is validated on the server:
- normalized to lowercase
- format validated with a regex
- DNS resolvability checked via
socket.gethostbyname
If the domain does not resolve from the service environment, the request is rejected by API validation.
๐ป curl example
curl -X POST "http://localhost:8000/api/v1/gsc/check-domain-safety/" \
-H "Content-Type: application/json" \
-H "AUTHORIZATION: Bearer <AUTHORIZATION_TOKEN>" \
-d '{
"domain": "example.com",
"callback_url": "https://example.com/callback"
}'