Create Accounts
You do not have to use the Sign up API operation if you want to only create an account for a end user.
In this guide, you will learn:
- How to create an account through API
Step 1. Generate an OAuth token
See Create an OAuth token for details.
Step 2. Create a new account using the "Create an account" operation
The following cURL code sample creates an account with the following information:
- Account's currency is USD
- Account's name is "Zuora Test Account"
- Bill-to contact is John Smith
curl --location --request POST 'https://rest.zuora.com/v1/accounts' \
--header 'Authorization: Bearer f57342a3f39e4c1e9ee8ecd06a53dd40' \
--header 'Content-Type: application/json' \
--data-raw '{
"additionalEmailAddresses": [
"contact1@example.com",
"contact2@example.com"
],
"autoPay": false,
"billCycleDay": 0,
"billToContact": {
"address1": "1051 E Hillsdale Blvd",
"city": "Foster City",
"country": "United States",
"firstName": "John",
"lastName": "Smith",
"state": "CA",
"workEmail": "smith@example.com",
"zipCode": "94404"
},
"currency": "USD",
"name": "Zuora Test Account",
"notes": "This account is for demo purposes."
}'
If you do not sepcify the sold-to contact information, Zuora will set it the same as the bill-to contact automatically.
Step 3. Verify the result
After the process is done, you can verify the result in the Zuora UI or through the GET API operations for the Account object.
To verify the result through the Zuora UI, you can find the account you just created displayed at the top of the All Accounts page by navigating to Customers > Accounts in the Zuora UI.
To verify the result through the API, See Retrieve Object Information for details.