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.

Update Account by ID

Updates an account 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/:id.xml

Parameters

id

required

string

Set to the account’s id with .xml appended. For example, 123456.xml. If you don’t know the account’s id, use the Get Accounts API call to return all accounts and their id values.

address1

string

*

address2

string

*

city

string

*

homepage

string

*

name

string

Set to the company, customer, or organization name.

phone

string

Set to the phone number of the account owner.

state

string

*

zip

string

*

Sample Response

This request generates no response.
<error>
  <title>No such account</title>
  <message>No account found by id 59344</message>
</error>

Sample cURL Request

Try it out with a test account first: Start off with using this cURL request with a test OneLogin account and API key. Once you’ve familiarized yourself with the API’s behavior, switch over to using your production OneLogin account and API key.

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

curl —v -u {api_key}:x -X PUT -H "Content-Type: application/xml" \
-d '<account>
    <name>{name}</name>
    <address1>{address1}</address1>
    <address2>{address2}</address2>
    <city>{city}</city>
    <state>{state}</state>
    <zip>{zip}</zip>
    <phone>{zip}</phone>
    <homepage>{homepage}</homepage>
</account>' \
https://api.onelogin.com/api/v1/accounts/{account_id}.xml

Postman Collection

Try it out with a test account first: Start off with using this Postman Collection with a test OneLogin account and API key. Once you’ve familiarized yourself with the API’s behavior, switch over to using your production OneLogin account and API key.

Replace sample variables indicated by { } in the sample request body with your actual values. Also, be sure to set Postman-specific environment variables indicated by {{ }}.

Download for the Accounts API