API Documentation

Automate your AyazHost account — list domains and orders, open tickets — with a simple REST API.

Authentication

Send your API key as a Bearer token in the Authorization header. Create and revoke keys from My Account → API Access.

curl https://ayazhost.com/api/v1/me \
  -H "Authorization: Bearer <YOUR_API_KEY>"

Example

{
  "ok": true,
  "id": 1,
  "name": "Your Name",
  "email": "you@example.com"
}

Endpoints

  • GET/api/v1/me

    Check who the API key belongs to.

    curl https://ayazhost.com/api/v1/me \
      -H "Authorization: Bearer <YOUR_API_KEY>"
  • GET/api/v1/domains

    List the domains registered under your account.

    curl https://ayazhost.com/api/v1/domains \
      -H "Authorization: Bearer <YOUR_API_KEY>"
  • GET/api/v1/orders

    List your orders with items, totals and status.

    curl https://ayazhost.com/api/v1/orders \
      -H "Authorization: Bearer <YOUR_API_KEY>"
  • GET/api/v1/tickets

    List your support tickets, or open a new one.

    curl https://ayazhost.com/api/v1/tickets \
      -H "Authorization: Bearer <YOUR_API_KEY>"
  • POST/api/v1/tickets

    List your support tickets, or open a new one.

    curl -X POST https://ayazhost.com/api/v1/tickets \
      -H "Authorization: Bearer <YOUR_API_KEY>" \
      -H "Content-Type: application/json" \
      -d '{"subject": "My site is down", "message": "…", "priority": "high"}'

Rate limit

60 requests per minute per API key. When limited, the API answers with HTTP 429.

{
  "ok": false,
  "error": "Rate limit exceeded (60 requests per minute per key)."
}