domains


In this context the term domain(s) is interchangeable site(s). An Account my have multiple sites under their account. However each site is tied to 1 primary domain name and may have multiple domain aliases resolving to it. The endpoint handles the creation and such for client sites.


Available HTTP and Response Types
DELETE GET POST PUT | JSON

10 Methods


  • DELETE
    https://api.pagely.com/ v1 / domains /single

    Available To Partner Account

    Description

    Removes a site and all associated objects.

    Sample Response


      Required Params

      id int
  • GET
    https://api.pagely.com/ v1 / domains /validate

    Available To Partner Account

    Description

    See if a domain already exists in our system. This should be used with client side form validation prior to submitting a full domain record with the PUT command. It also checks for a well formed domain, ie no illegal characters.

    curl -H “X-API-KEY: <key>” https://api.pagely.com/v1/domains/validate/?domain=foo.com

    Sample Response

    {"result":2,"message":"That domain is available"}

      Required Params

      domain string www.domain.com
  • GET
    https://api.pagely.com/ v1 / domains /single

    Available To Partner Account

    Description
    No Description

    Sample Response


      Required Params

      id int

      Optional Params

      inc_actions bool
      inc_aliases bool include aliases in result
      inc_backups bool include available backups in result
      inc_dns bool include dns records in result
      inc_messages bool
      inc_usage bool include usage stats in result
      show_backup bool include available backups in result
  • GET
    https://api.pagely.com/ v1 / domains /all

    Available To Partner Account

    Description

    Get a list of domains/sites.

    curl -H “X-API-KEY:<key>” https://api.pagely.com/v1/domains/all?account_id=3890&inc_usage=1&inc_aliases=1

    Sample Response

    {"result":2,"count":1,"limit":25,"offset":0,"objects":[{"id":"4760","active":"1","account_id":"3890","pool_id":"3","directory":"dom4760","file_node":"s01","backup_node":"bs01","multisite":"0","multisite_type":"","use_ssl":"0","domain":"domain.com","aliases":"","status":"a","platform":"wordpress","version":"current","queue_id":"6800","dns_enabled":"0","ftp_enabled":"0","email_enabled":"0","email_type":"google","site_username":"------------","site_password":"----------------------","site_email":"xxxxxxxxx@yahoo.com","file_username":"ftp---------------","file_password":"","database":"db_dom4760","sql_id":"3","sql_username":"db_dom4760","sql_password":"--------","profile_id":"0","promo_id":"0","maid":"0","backup":"0","usage":"0","cron":"0","deleted":"0","date_maid":"0","date_backup":"0","date_usage":"1345428391","date_cron":"1345434515","date_deleted":"0","date_added":"1344909635","date_updated":"1345434515","maid_uid":"","backup_uid":"","usage_uid":"LjLLRmOGyIJHiKdJaZqHNe34R94ojDF0zsOs8QOe","cron_uid":"iYScgCsrEfC24srmZQPypdbjrrRJtvvNYWMTFtvP"}]}

      Optional Params

      account_id int
      domain string search on specific domain
      domain_id int
      inc_aliases bool include aliases in result
      inc_deleted bool include deleted domain in result
      inc_dns bool include dns records in result
      inc_promocode bool include promo code used if any
      inc_usage bool include usage stats in result
      limit int 25
      offset int 0
      order_by string id
      order_dir string DESC
      reseller_id int
      s string search on
  • GET
    https://api.pagely.com/ v1 / domains /backups

    Available To Partner Account

    Description

    Retrieve a list of available backups. The backups_post method is then used to generate a download link for a given backup.

    Sample Response


      Required Params

      id int
  • POST
    https://api.pagely.com/ v1 / domains /backups

    Available To Partner Account

    Description

    Retrieve a private link to download a backup. These links expire after a period of time.

    Sample Response


      Required Params

      date string unix timestamp
      id int domain id
      type string sql|file
  • POST
    https://api.pagely.com/ v1 / domains /transfer

    Available To Partner

    Description

    Transfer a site to another account you control. Moves subscriptions, purchases, and invoices etc. as well.

    Sample Response


      Required Params

      account_id int target account id
      id int domain id
  • POST
    https://api.pagely.com/ v1 / domains /action

    Available To Partner Account

    Description

    Preform some action on site such as:

    • Resetting active plugins on a whitescreened site with ?id=1&action=reset_options&plugins=1
    • Enable FTP access with ?id=1&action=enable_ftp
    • Launch a backup task with ?id=1&action=backup
    • Disable a site for lack of payment or some other reason with ?id=1&action=disable

    Sample Response


      Required Params

      id int

      Optional Params

      action string options:[ 'enable', 'disable', 'enable_dns', 'disable_dns', 'flush_dns', 'flush_cache', 'enable_ftp', 'disable_ftp', 'flush_ftp', 'enable_email', 'disable_email', 'version', 'pool', 'file_node', 'reset_primarydomain', 'reset_platform', 'reset_options', 'resend_email', 'backup' ]
      apikey bool for reset_options action only
      plugins bool for reset_options action only
      themes bool for reset_options action only
      url bool for reset_options action only
      user bool for reset_options action only
  • POST
    https://api.pagely.com/ v1 / domains /single

    Available To Partner Account

    Description

    Typically used to reset the login and password of a WordPress user.

    Sample Response


      Required Params

      id int
      site_email string
      site_username string
  • PUT
    https://api.pagely.com/ v1 / domains /single

    Available To Partner Account

    Description

    Creates a new site for specified account. Pass the promo_code on creation if supplied.

    Sample Response


      Required Params

      acount_id int
      domain string
      plan_id int
      platform string wordpress
      site_email string
      site_username string login username for platform

      Optional Params

      dns_enabled bool must conform to plan allowances
      file_node int not avail to partners
      ftp_enabled bool must conform to plan allowances
      multisite bool must conform to plan allowances
      multisite_type string subdomain|subfolder
      password string random generated if not supplied
      pool_id int not avail to partners
      promo_id string id of promocode
      promocode string the promocode
      sql_id int not avail to partners
      version string current