See api-docs Menu

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


Have a Question?

Found a problem or a bug? Submit a support ticket.

Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.

Have a product idea or request? Share it with us in our Ideas Portal.