DELETE api/v1/admin/accounts/{id}/children/{childrenID}

Deactivates an account by making it inaccessible by the user. All the data like addressbooks, reports, etc will still be kept in case account is reactivated (Can only be done by contacting 2sms). You also have an option to cancel pending messages, transfer sub accounts to master account or delete all the child accounts that are below the sub account you are deleting. Note: you can only perform one of the folowing: move sub accounts to the new master account or deactivate all of the sub accounts below. You cannot do both. If you choose to do both, then delete all sub accounts will be prioritized. Only top level account can perform such operation at this time.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
childrenID

Child account ID

globally unique identifier

Required

id

string

None.

Body Parameters

SubAccountDeleteOptions
NameDescriptionTypeAdditional information
CancelPendingMessages

Cancel pending messages

boolean

Required

TransferSubsChildAccounts

Transfer subs to master account

boolean

Required

DeleteSubsChildAccounts

Delete all the sub accounts that are below the account you are deleting

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "CancelPendingMessages": true,
  "TransferSubsChildAccounts": true,
  "DeleteSubsChildAccounts": true
}

application/xml, text/xml

Sample:
<SubAccountDeleteOptions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CancelPendingMessages>true</CancelPendingMessages>
  <TransferSubsChildAccounts>true</TransferSubsChildAccounts>
  <DeleteSubsChildAccounts>true</DeleteSubsChildAccounts>
</SubAccountDeleteOptions>

Response Information

Resource Description

ResponseOfObject
NameDescriptionTypeAdditional information
Error

Error

None.

ResponseData

ResponseDataOfObject

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>