See api-docs Menu

v1-v3 APIs have been deprecated

Don't worry, these APIs are deprecated, but they won't be shut off until 2017, at the earliest. Questions? Contact devsupport@onelogin.com.

All new development with APIs should use the newest version of our API: /1. API /1 is based on RESTful principles, is secured by OAuth 2.0, and provides JSON messages, search, pagination, sorting, and filtering.

Get Accounts

Gets all accounts under a reseller account. This API can be used by reseller accounts only.

For a description of each element in the Account resource, see Account Resource.

Resource URL

https://api.onelogin.com/api/v1/accounts.xml

Sample Response

<accounts type="array">
  <account>
    <address1 nil="true"></address1>
    <address2 nil="true"></address2>
    <city nil="true"></city>
    <country>US</country>
    <created-at>2015-03-24T12:14:29-07:00</created-at>
    <homepage nil="true"></homepage>
    <id>123456</id>
    <name>Allen Bean Co.</name>
    <notes></notes>
    <phone nil="true"></phone>
    <remotetoken>1x1xxx111xx11xx1xx1xxx1x1xx1111111111x11</remotetoken>
    <state nil="true"></state>
    <updated-at>2015-03-24T12:14:30-07:00</updated-at>
    <zip nil="true"></zip>
  </account>
  <!-- clip -->
  <account>
    <address1>111 Main Street</address1>
    <address2>Suite 222</address2>
    <city>Everytown</city>
    <country>US</country>
    <created-at>2015-03-24T10:37:30-07:00</created-at>
    <homepage>www.blytheindustries.com</homepage>
    <id>654321</id>
    <name>Blythe Industries</name>
    <notes></notes>
    <phone>5555551212</phone>
    <remotetoken>1x1xxx111xx11xx1xx1xxx1x1xx1111111111x11</remotetoken>
    <state>CA</state>
    <updated-at>2015-03-24T11:46:13-07:00</updated-at>
    <zip>11111</zip>
  </account>
</accounts>

Sample cURL Request

Be sure to replace placeholder values surrounded by { } with actual values.

curl -u {api_key}:x -X GET https://api.onelogin.com/api/v1/accounts.xml

Postman Collection

Be sure to set Postman-specific environment variables indicated by {{ }}.

Download for the Accounts API