Required role: | SystemAdministrator |
PATCH | /accounts/{accountId} |
---|
"use strict";
export class EntityInfo {
/** @param {{id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The ID of the object */
id;
/**
* @type {string}
* @description The date the object was created */
dateCreated;
/**
* @type {string}
* @description The date the object was last modified */
dateLastModified;
/**
* @type {string}
* @description The user that created this object */
createdBy;
/**
* @type {string}
* @description The user that last modified this object */
lastModifiedBy;
}
export class BillingItem {
/** @param {{baseCost?:number,rawUnitMultiplier?:number,unitCost?:number,allowance?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
baseCost;
/** @type {number} */
rawUnitMultiplier;
/** @type {number} */
unitCost;
/** @type {number} */
allowance;
}
export class BillingSettings {
/** @param {{base?:BillingItem,localNumbers?:BillingItem,tollFreeNumbers?:BillingItem,inboundVoiceCalls?:BillingItem,outboundVoiceCalls?:BillingItem,inboundFaxes?:BillingItem,outboundFaxes?:BillingItem,inboundSmsMessages?:BillingItem,outboundSmsMessages?:BillingItem,aiInsights?:BillingItem,aiLiveMinutes?:BillingItem}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BillingItem} */
base;
/** @type {BillingItem} */
localNumbers;
/** @type {BillingItem} */
tollFreeNumbers;
/** @type {BillingItem} */
inboundVoiceCalls;
/** @type {BillingItem} */
outboundVoiceCalls;
/** @type {BillingItem} */
inboundFaxes;
/** @type {BillingItem} */
outboundFaxes;
/** @type {BillingItem} */
inboundSmsMessages;
/** @type {BillingItem} */
outboundSmsMessages;
/** @type {BillingItem} */
aiInsights;
/** @type {BillingItem} */
aiLiveMinutes;
}
export class AccountInfo extends EntityInfo {
/** @param {{name?:string,parentAccountId?:string,twilioAccountSid?:string,ancestorIds?:string[],maxPhoneNumbers?:number,isBYOA?:boolean,trustHubProfileSid?:string,logoId?:string,logoUri?:string,billingSettings?:BillingSettings,id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description The name of this account */
name;
/**
* @type {string}
* @description The ID of this account's parent */
parentAccountId;
/**
* @type {string}
* @description The twilio account SID */
twilioAccountSid;
/**
* @type {string[]}
* @description The ancestors of this account. Useful for breadcrumbs */
ancestorIds;
/**
* @type {number}
* @description The max number of phone numbers this account can have */
maxPhoneNumbers;
/**
* @type {boolean}
* @description This account is BYOA */
isBYOA;
/**
* @type {string}
* @description TrustHub Profile Sid */
trustHubProfileSid;
/**
* @type {string}
* @description The ID of the logo file */
logoId;
/**
* @type {string}
* @description The URI of the logo file */
logoUri;
/**
* @type {BillingSettings}
* @description The billing settings for this account */
billingSettings;
}
export class PatchAccount {
/** @param {{accountId?:string,name?:string,maxPhoneNumbers?:number,logoId?:string,billingSettings?:BillingSettings}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The ID of the account you want to update */
accountId;
/**
* @type {string}
* @description The new name for the account */
name;
/**
* @type {?number}
* @description The max number of phone numbers this account can have */
maxPhoneNumbers;
/**
* @type {string}
* @description The ID of the file to use for a logo on the dashboard */
logoId;
/**
* @type {BillingSettings}
* @description Updated billing settings for this account */
billingSettings;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /accounts/{accountId} HTTP/1.1
Host: team.evovoice.io
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"accountId":"String","name":"String","maxPhoneNumbers":0,"logoId":"String","billingSettings":{"base":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"localNumbers":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"tollFreeNumbers":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundVoiceCalls":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundVoiceCalls":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundFaxes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundFaxes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundSmsMessages":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundSmsMessages":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"aiInsights":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"aiLiveMinutes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0}}}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"name":"String","parentAccountId":"String","twilioAccountSid":"String","ancestorIds":["String"],"maxPhoneNumbers":0,"isBYOA":false,"trustHubProfileSid":"String","logoId":"String","logoUri":"String","billingSettings":{"base":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"localNumbers":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"tollFreeNumbers":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundVoiceCalls":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundVoiceCalls":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundFaxes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundFaxes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"inboundSmsMessages":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"outboundSmsMessages":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"aiInsights":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0},"aiLiveMinutes":{"baseCost":0,"rawUnitMultiplier":0,"unitCost":0,"allowance":0}},"id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}