accounts


In our system each account is tied to a unique email address. An account may have multiple domains/sites, subscriptions, billing profiles, etc.  Accounts may be merged and/or delete by partners, and updated by account api-keys as well.


Available HTTP and Response Types
DELETE GET POST PUT | JSON

10 Methods


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

    Available To Partner

    Description

    Nukes the account and EVERYTHING else as well, domains, billing_profiles, etc. It all goes away.

    curl -X DELETE -H “X-API-KEY: <key>” https://api.pagely.com/v1/accounts/single -d “id=3831”

    Sample Response

    {"result":2,"id":"3831","message":"Sucessfully deleted"}

      Required Params

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

    Available To Partner

    Description

    This checks if a username or email exists in the system. Use this on your registration form to submit the input field for client side validation before submitting the whole form.  If found to exist, recommend the user login.

    1 and only 1 param is required and wil be validated.

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

    Sample Response

    {"result":3,"message":"That email address is already in use."}

      Optional Params

      email string
      username string
  • GET
    https://api.pagely.com/ v1 / accounts /single

    Available To Partner Account

    Description

    curl -H “X-API-KEY:<key>” https://api.pagely.com/v1/accounts/single?id=1212

    Sample Response

    {"id":"1212","reseller_id":"1","affiliate_id":"0","ink_id":"0","lang":"en","active":"1","name":"Ryan Seacrest","username":"ryan@idol.com","company_name":"","email":"ryan@idol.com","phone":"04111234411","twitter":"","def_profile_id":"0","def_pool_id":"0","auth_q":"smaiden","auth_q_answer":"","deleted":"0","emails_invoice":"0","emails_receipt":"0","date_deleted":"0","date_updated":"1344843307","date_added":"1344843307"}

      Required Params

      id int
  • GET
    https://api.pagely.com/ v1 / accounts /all

    Available To Partner

    Description

    curl -H “X-API-KEY:<key>” https://api.pagely.com/v1/accounts/all?active=1

    Password is a 1 way hash, auth_q answer is encrypted.

    Sample Response

    {"result":2,"count":25,"limit":25,"offset":0,"objects":[{"id":"4444","lang":"en","reseller_id":"1","ink_id":"0","def_profile_id":"0","def_pool_id":"0","affiliate_id":"0","active":"1","name":"Lucas Wade","username":"user@domain.com","password":"","company_name":"","email":"user@domain.com","phone":"5551212333","twitter":"","auth_q":"sbirth","auth_q_answer":"","deleted":"0","emails_invoice":"0","emails_receipt":"0","date_deleted":"0","date_added":"1345336428","date_updated":"1345336428"},{"id":"4445","lang":"en","reseller_id":"1","ink_id":"0","def_profile_id":"0","def_pool_id":"0","affiliate_id":"0","active":"1","name":"Tom Thumb","username":"tom@domain.com","password":"","company_name":"Thumb Communications","email":"tom@domain.com","phone":"5551111212","twitter":"","auth_q":"smaiden","auth_q_answer":"","deleted":"0","emails_invoice":"0","emails_receipt":"0","date_deleted":"0","date_added":"1345326610","date_updated":"1345326859"}]}

      Optional Params

      account_id int
      company_name string
      deleted bool
      email string
      inc_domains bool include domain list in results
      limit int
      name string
      offset int
      order_by string id
      order_dir string DESC
      reseller_id int
      s string search on
      status bool
      username string
  • POST
    https://api.pagely.com/ v1 / accounts /auth

    Available To Partner Account

    Description

    Used to validate an account username/password or auth_q/auth_q_answer pair. Note: ssocial is last 4 digits.

    Sample Response


      Required Params

      id int Not needed when called with Account API-KEY

      Optional Params

      auth_q string smaiden|sbirth|ssocial|shigh req with auth_q_answer
      auth_q_answer string req with auth_q
      password string req with username
      username string req with password
  • POST
    https://api.pagely.com/ v1 / accounts /single

    Available To Partner Account

    Description

    Update an account with 1 or more values.

    curl -H “X-API-KEY: <key>” https://api.pagely.com/v1/accounts/single -d “id=3931&username=mikebonkers12”

    Sample Response

    {"result":2,"id":"3931","object":{"id":"3931","lang":"en","reseller_id":"1","ink_id":"0","def_profile_id":"0","def_pool_id":"0","affiliate_id":"0","active":"1","name":"testfoo","username":"mikebonkers12","password":"","company_name":"company name","email":"testfoo@foo.com","phone":"5554441111","twitter":"footest","auth_q":"smaiden","auth_q_answer":"","deleted":"0","emails_invoice":"0","emails_receipt":"0","date_deleted":"0","date_added":"1346046393","date_updated":"1346048193"},"message":"Object has been updated."}

      Required Params

      auth_q_answer string
      id int

      Optional Params

      auth_q string smaiden|sbirth|ssocial|shigh
      company_name string
      email string
      lang string
      name string
      password string
      phone string
      twitter string
      username string
  • POST
    https://api.pagely.com/ v1 / accounts /action

    Available To Partner Account

    Description

    Perform an action on an Account such as resetting password or disabling.

    Sample Response


      Required Params

      action string enable|disable|reset_password
      id int
  • POST
    https://api.pagely.com/ v1 / accounts /merge

    Available To Partner

    Description

    Merge 1 account into another. This is useful if a partner has verified a user has created 2 accounts and wishes the domains, invoices etc from 1 to be fold into the second.  Both accounts must belong to the partner and the old account will be destroyed on successful merge.

    Sample Response


      Required Params

      new_id int Account ID of merge target
      old_id int Account ID of merge source
  • POST
    https://api.pagely.com/ v1 / accounts /session

    NOT AVAILABLE TO PARTNERS

    Description
    No Description

    Sample Response


      Required Params

      api-key string
      id int
  • PUT
    https://api.pagely.com/ v1 / accounts /single

    Available To Partner

    Description

    Add a new account to the system.

    Sample Response

    {"result":2,"id":1234,"object":{"id":"1234","lang":"en","reseller_id":"1","ink_id":"0","def_profile_id":"0","def_pool_id":"0","affiliate_id":"0","active":"1","name":"Mike Smith","username":"mike@domain.com","password":"da701553cf61dbdb0b40e4bf58f3d22e1006c015","company_name":"","email":"mike@domain.com","phone":"3332221111","twitter":"","auth_q":"smaiden","auth_q_answer":"test","deleted":"0","emails_invoice":"0","emails_receipt":"0","date_deleted":"0","date_added":"1345354455","date_updated":"1345354455"},"message":"Account has been created."}

      Required Params

      auth_q string smaiden|sbirth|ssocial|shigh
      auth_q_amswer string answer to auth_q
      email string
      name string
      phone string
      username string can be their email or something else

      Optional Params

      affiliate_id int
      company_name string
      lang string
      password string random will be generated if not supplied
      twitter string