Skip to main content
PUT
/
managed_accounts
/
{managed_account_token}
Update managed account
curl --request PUT \
  --url https://api.vantage.sh/v2/managed_accounts/{managed_account_token} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "contact_email": "<string>",
  "access_credential_tokens": [
    "<string>"
  ],
  "billing_rule_tokens": [
    "<string>"
  ],
  "email_domain": "<string>",
  "msp_billing_profile_token": "<string>",
  "payment_terms_days": 123,
  "include_managed_account_integrations": true,
  "billing_information_attributes": {
    "id": 123,
    "token": "<string>",
    "company_name": "<string>",
    "country_code": "<string>",
    "address_line_1": "<string>",
    "address_line_2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postal_code": "<string>",
    "billing_email": [
      "<string>"
    ]
  },
  "business_information_attributes": {
    "id": 123,
    "token": "<string>",
    "metadata": {
      "custom_fields": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ]
    }
  }
}
'
import requests

url = "https://api.vantage.sh/v2/managed_accounts/{managed_account_token}"

payload = {
"name": "<string>",
"contact_email": "<string>",
"access_credential_tokens": ["<string>"],
"billing_rule_tokens": ["<string>"],
"email_domain": "<string>",
"msp_billing_profile_token": "<string>",
"payment_terms_days": 123,
"include_managed_account_integrations": True,
"billing_information_attributes": {
"id": 123,
"token": "<string>",
"company_name": "<string>",
"country_code": "<string>",
"address_line_1": "<string>",
"address_line_2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"billing_email": ["<string>"]
},
"business_information_attributes": {
"id": 123,
"token": "<string>",
"metadata": { "custom_fields": [
{
"name": "<string>",
"value": "<string>"
}
] }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
contact_email: '<string>',
access_credential_tokens: ['<string>'],
billing_rule_tokens: ['<string>'],
email_domain: '<string>',
msp_billing_profile_token: '<string>',
payment_terms_days: 123,
include_managed_account_integrations: true,
billing_information_attributes: {
id: 123,
token: '<string>',
company_name: '<string>',
country_code: '<string>',
address_line_1: '<string>',
address_line_2: '<string>',
city: '<string>',
state: '<string>',
postal_code: '<string>',
billing_email: ['<string>']
},
business_information_attributes: {
id: 123,
token: '<string>',
metadata: {custom_fields: [{name: '<string>', value: '<string>'}]}
}
})
};

fetch('https://api.vantage.sh/v2/managed_accounts/{managed_account_token}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vantage.sh/v2/managed_accounts/{managed_account_token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'contact_email' => '<string>',
'access_credential_tokens' => [
'<string>'
],
'billing_rule_tokens' => [
'<string>'
],
'email_domain' => '<string>',
'msp_billing_profile_token' => '<string>',
'payment_terms_days' => 123,
'include_managed_account_integrations' => true,
'billing_information_attributes' => [
'id' => 123,
'token' => '<string>',
'company_name' => '<string>',
'country_code' => '<string>',
'address_line_1' => '<string>',
'address_line_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'postal_code' => '<string>',
'billing_email' => [
'<string>'
]
],
'business_information_attributes' => [
'id' => 123,
'token' => '<string>',
'metadata' => [
'custom_fields' => [
[
'name' => '<string>',
'value' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.vantage.sh/v2/managed_accounts/{managed_account_token}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"access_credential_tokens\": [\n \"<string>\"\n ],\n \"billing_rule_tokens\": [\n \"<string>\"\n ],\n \"email_domain\": \"<string>\",\n \"msp_billing_profile_token\": \"<string>\",\n \"payment_terms_days\": 123,\n \"include_managed_account_integrations\": true,\n \"billing_information_attributes\": {\n \"id\": 123,\n \"token\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country_code\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"billing_email\": [\n \"<string>\"\n ]\n },\n \"business_information_attributes\": {\n \"id\": 123,\n \"token\": \"<string>\",\n \"metadata\": {\n \"custom_fields\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.vantage.sh/v2/managed_accounts/{managed_account_token}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"access_credential_tokens\": [\n \"<string>\"\n ],\n \"billing_rule_tokens\": [\n \"<string>\"\n ],\n \"email_domain\": \"<string>\",\n \"msp_billing_profile_token\": \"<string>\",\n \"payment_terms_days\": 123,\n \"include_managed_account_integrations\": true,\n \"billing_information_attributes\": {\n \"id\": 123,\n \"token\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country_code\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"billing_email\": [\n \"<string>\"\n ]\n },\n \"business_information_attributes\": {\n \"id\": 123,\n \"token\": \"<string>\",\n \"metadata\": {\n \"custom_fields\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.vantage.sh/v2/managed_accounts/{managed_account_token}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"access_credential_tokens\": [\n \"<string>\"\n ],\n \"billing_rule_tokens\": [\n \"<string>\"\n ],\n \"email_domain\": \"<string>\",\n \"msp_billing_profile_token\": \"<string>\",\n \"payment_terms_days\": 123,\n \"include_managed_account_integrations\": true,\n \"billing_information_attributes\": {\n \"id\": 123,\n \"token\": \"<string>\",\n \"company_name\": \"<string>\",\n \"country_code\": \"<string>\",\n \"address_line_1\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"billing_email\": [\n \"<string>\"\n ]\n },\n \"business_information_attributes\": {\n \"id\": 123,\n \"token\": \"<string>\",\n \"metadata\": {\n \"custom_fields\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n }\n}"

response = http.request(request)
puts response.read_body
{
  "token": "acct_dd2fdf6564b60319",
  "name": "New Name",
  "contact_email": "newguy@acme.com",
  "parent_account_token": "acct_bb022aecd1125ada",
  "access_credential_tokens": [
    "accss_crdntl_686904ffd39a4618"
  ],
  "billing_rule_tokens": [],
  "email_domain": null
}
{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}
{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

managed_account_token
string
required

Body

application/json

Update a Managed Account.

name
string

The name of the Managed Account.

contact_email
string

The contact email address for the Managed Account.

access_credential_tokens
string[]

Access Credential (aka Integrations) tokens to assign to the Managed Account.

billing_rule_tokens
string[]

Billing Rule tokens to assign to the Managed Account, in their desired execution order. Tokens must be ordered by execution group: AWS transforms, then COST inserts, then COST transforms, then monthly post-transform inserts. Within a group any order is accepted and persisted as-is. Submitting a list whose cross-group ordering does not match the pipeline returns a 400.

email_domain
string

Email domain to associate with this Managed Account for SSO.

msp_billing_profile_token
string

Token of the MSP billing profile to use for this managed account (MSP invoicing accounts only).

payment_terms_days
integer<int32>

Number of days until payment is due after invoice date (MSP invoicing accounts only). Defaults to 10.

include_managed_account_integrations
boolean

Whether to include managed account's own integrations in invoice cost calculations (MSP invoicing accounts only). Defaults to false.

billing_information_attributes
object

Billing address and contact information (MSP invoicing accounts only)

business_information_attributes
object

Business information and custom fields (MSP invoicing accounts only)

Response

ManagedAccount model

token
string
required
name
string
required
contact_email
string
required
parent_account_token
string
required

The token for the parent Account.

access_credential_tokens
string[]
required

The tokens for the Access Credentials assigned to the Managed Account.

billing_rule_tokens
string[]
required

The tokens for the Billing Rules assigned to the Managed Account, in the order they will execute against this account's cost data.

email_domain
string | null

Email domain associated with this Managed Account for SSO.

msp_billing_profile_token
string | null

Token of the MSP billing profile used for this managed account (MSP invoicing accounts only)

payment_terms_days
integer<int32> | null

Number of days until payment is due after invoice date (MSP invoicing accounts only)

include_managed_account_integrations
boolean | null

Whether to include managed account's own integrations in invoice cost calculations (MSP invoicing accounts only)

billing_information_attributes
object
business_information_attributes
object