Managing partner accounts at UpCloud
This guide explains how to manage partner accounts at UpCloud using the Partner API. As an UpCloud partner, you can create and manage accounts for your end users. We'll cover how to perform these operations using both the command-line tool (upctl) and direct API calls.
Note that use of this feature is available only to accounts provisioned as partner accounts. Please contact your account representative for further details.
Prerequisites
- A partner account with access to the Partner API.
- For API calls, you need
curlinstalled. - For command-line operations, you need
upctlinstalled & configured, see Installing the UpCloud CLI to get started.
Listing partner accounts
You can view all accounts associated with your partner account using either the CLI tool or API.
Using upctl
upctl partner account listUsing the API
export UPCLOUD_API_USERNAME=your-api-username
export UPCLOUD_API_PASSWORD=your-api-password
curl -X GET \
-u "$UPCLOUD_API_USERNAME:$UPCLOUD_API_PASSWORD" \
https://api.upcloud.com/1.3/partner/accountsCreating partner accounts
You can create new accounts that will be linked to your partner account's invoicing. There are two ways to create accounts:
- Basic account creation (username and password only)
- Full account creation (including contact details)
Using upctl
Basic account creation:
upctl partner account create --username newuser --password superSecret123By default, the account is created with the contact details of the partner account.
Full account creation with contact details:
upctl partner account create \
--username newuser \
--password superSecret123 \
--first-name "New" \
--last-name "User" \
--company "Example Ltd" \
--country FIN \
--phone "+358.91111111" \
--email "[email protected]"Phone number in international format, country code and national part separated by a period.
Using the API
Basic account creation:
curl -X POST \
-u "$UPCLOUD_API_USERNAME:$UPCLOUD_API_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"username": "newuser",
"password": "superSecret123"
}' \
https://api.upcloud.com/1.3/partner/accountsFull account creation with contact details:
curl -X POST \
-u "$UPCLOUD_API_USERNAME:$UPCLOUD_API_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"username": "newuser",
"password": "superSecret123",
"contact_details": {
"first_name": "New",
"last_name": "User",
"company": "Example Ltd",
"country": "FIN",
"phone": "+358.91111111",
"email": "[email protected]"
}
}' \
https://api.upcloud.com/1.3/partner/accountsRequirements and limitations
See the Partner API documentation for more information about the available fields, requirements and limitations.
