PUT api/v1/admin/accounts/{id}

This method updates an existing account specified by the account Id in the URL. The system will check that the user has permission to update the account and that the account Id is valid. This method does not use all of the parameters of the Account model below. This method uses the following: Address, ContactNumber, Disclaimer, EmailAddress, FirstName, LanguageID, LastName, Logo, LogoName, Name, SMSPassword, SMSUsername, TimeZone, TwoFactorEnabled, Website

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The Id of the account to update its details.

globally unique identifier

Required

Body Parameters

Either xml or json request.

TwoSms.CustomerPortalRole.API.Admin.Accounts.Account
NameDescriptionTypeAdditional information
ID

The unique identifier for the account.

globally unique identifier

None.

AccountID

The unique identifier for the parent account.

globally unique identifier

None.

Address

The address of the account.

string

None.

AnyTimeBalance

The anytime balance of the account.

decimal number

None.

ContactNumber

The contact number for the account.

string

Required

Matching regular expression pattern: ^(?=.*?\d.*?\d.*?\d.*?\d.*?\d)([+]?)([\d\s\(\)-]{5,20})$

PhoneNumber

The contact number for the account.

string

Matching regular expression pattern: ^(?=.*?\d.*?\d.*?\d.*?\d.*?\d)([+]?)([\d\s\(\)-]{5,20})$

DateCreated

The date the account was created

date

None.

DateModified

The date the account was last modified

date

None.

Disclaimer

The text that is displayed at the bottom of the advanced messages.

string

None.

EmailAddress

The main email address for the account.

string

Required

Matching regular expression pattern: ^([0-9a-zA-Z]([-.\w']*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w']*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$

Defaultheader

The name of the default header

string

None.

LanguageID

The default language Id for the account.

globally unique identifier

None.

LanguageName

The name of the language

string

None.

Location

The country of the account.

string

None.

Logo

Base64 encoded string containing the logo that is displayed on advanced messages

string

None.

LogoName

The name of the logo file that is displayed on the web interface

string

None.

Name

The company name of the account.

string

None.

OffPeakBalance

The off peak balance of the account.

decimal number

None.

Preferences

Determines how the UI of SMS+ plus is displayed for this account. Provide a list of all preferences you wish to set on the account. Any preferences set previously will be overwritten with the preferences set on the request.

Collection of TwoSms.CustomerPortalRole.API.Admin.Accounts.AccountPreferences

None.

SCIMEnabled

Determines if SCIM has been enabled on the account.

boolean

None.

SMSPassword

The password the account's 2sms account.

string

Required

SMSUsername

The username for the account's 2sms account.

string

Required

TimeZone

The default time zone for the account.

string

Required

TwoFactorEnabled

Determines if two factor authentication has been enabled on the account.

boolean

None.

URL

string

None.

Website

The URL of the website for the account.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "ID": "873cb78f-fb1e-4d33-9565-b1b2247fc72e",
  "AccountID": "d5c8049c-0b9a-47aa-8ee8-89ea27047b68",
  "Address": "sample string 2",
  "AnyTimeBalance": 1.1,
  "ContactNumber": "sample string 3",
  "PhoneNumber": "sample string 4",
  "DateCreated": "2024-04-25T09:28:13.5555075+00:00",
  "DateModified": "2024-04-25T09:28:13.5555075+00:00",
  "Disclaimer": "sample string 6",
  "EmailAddress": "sample string 8",
  "FirstName": "sample string 10",
  "Defaultheader": "sample string 11",
  "LanguageID": "a0cf02c8-86ee-40f0-a416-41df880c7aa6",
  "LanguageName": "sample string 13",
  "LastName": "sample string 14",
  "Location": "sample string 15",
  "Logo": "sample string 16",
  "LogoName": "sample string 18",
  "Name": "sample string 19",
  "OffPeakBalance": 1.1,
  "Preferences": [
    0,
    0
  ],
  "SCIMEnabled": true,
  "SMSPassword": "sample string 21",
  "SMSUsername": "sample string 22",
  "TimeZone": "sample string 23",
  "TwoFactorEnabled": true,
  "URL": "sample string 24",
  "Website": "sample string 26"
}

application/xml, text/xml

Sample:
<Account xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ID>873cb78f-fb1e-4d33-9565-b1b2247fc72e</ID>
  <AccountID>d5c8049c-0b9a-47aa-8ee8-89ea27047b68</AccountID>
  <Address>sample string 2</Address>
  <AnyTimeBalance>1.1</AnyTimeBalance>
  <ContactNumber>sample string 3</ContactNumber>
  <PhoneNumber>sample string 4</PhoneNumber>
  <DateCreated>2024-04-25T09:28:13.5555075+00:00</DateCreated>
  <DateModified>2024-04-25T09:28:13.5555075+00:00</DateModified>
  <Disclaimer>sample string 6</Disclaimer>
  <DisclaimerRemove>true</DisclaimerRemove>
  <EmailAddress>sample string 8</EmailAddress>
  <Enabled>true</Enabled>
  <FirstName>sample string 10</FirstName>
  <Defaultheader>sample string 11</Defaultheader>
  <LanguageID>a0cf02c8-86ee-40f0-a416-41df880c7aa6</LanguageID>
  <LanguageName>sample string 13</LanguageName>
  <LastName>sample string 14</LastName>
  <Location>sample string 15</Location>
  <Logo>sample string 16</Logo>
  <LogoRemoved>true</LogoRemoved>
  <LogoName>sample string 18</LogoName>
  <Name>sample string 19</Name>
  <OffPeakBalance>1.1</OffPeakBalance>
  <Preferences>
    <AccountPreferences>ALL</AccountPreferences>
    <AccountPreferences>ALL</AccountPreferences>
  </Preferences>
  <SCIMEnabled>true</SCIMEnabled>
  <SMSPassword>sample string 21</SMSPassword>
  <SMSUsername>sample string 22</SMSUsername>
  <TimeZone>sample string 23</TimeZone>
  <TwoFactorEnabled>true</TwoFactorEnabled>
  <URL>sample string 24</URL>
  <Users>
    <AccountUserInfo>
      <UserID>eb844709-5fd2-48bf-a72b-9649db2b9fd6</UserID>
      <Name>sample string 2</Name>
      <PermissionLevel>STANDARD_USER</PermissionLevel>
    </AccountUserInfo>
    <AccountUserInfo>
      <UserID>eb844709-5fd2-48bf-a72b-9649db2b9fd6</UserID>
      <Name>sample string 2</Name>
      <PermissionLevel>STANDARD_USER</PermissionLevel>
    </AccountUserInfo>
  </Users>
  <Validated>true</Validated>
  <Website>sample string 26</Website>
</Account>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'TwoSms.CustomerPortalRole.API.Admin.Accounts.Account'.

Response Information

Resource Description

Status message of the request

TwoSms.CustomerPortalRole.API.Misc.ResponseOfSystem.Object
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfSystem.Object

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {}
  }
}

application/xml, text/xml

Sample:
<ResponseOfObject xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail />
  </ResponseData>
</ResponseOfObject>