๐Ÿ“ฎ POST /api/v1/gsc/command-requests/

Creates a CommandRequest for an arbitrary command.

๐Ÿงพ Request body

Fields (see apps/api/v1/gsc/serializers.py):

  • command โ€” one of:
    • check_domain_safety
    • send_appeal
    • get_account_domains
  • payload โ€” JSON (depends on the command)
  • account_email โ€” Google account email (must exist in DB)
  • headless โ€” boolean (default: false)
  • callback_url โ€” optional URL

๐Ÿ“ฆ Response

{
  "id": 123,
  "command": "check_domain_safety",
  "account_email": "user@example.com",
  "status": "NEW"
}

๐Ÿ’ป curl example

curl -X POST "http://localhost:8000/api/v1/gsc/command-requests/" \
  -H "Content-Type: application/json" \
  -H "AUTHORIZATION: Bearer <AUTHORIZATION_TOKEN>" \
  -d '{
    "command": "check_domain_safety",
    "payload": {"domain": "example.com"},
    "account_email": "user@example.com",
    "headless": true,
    "callback_url": "https://example.com/callback"
  }'