Error
Application error
21479: Unable to update Status for subaccount, subaccount has been closed.
API
IAM
This error occurs when you try to update a subaccount after its Status has already been set to closed. Closing a subaccount is permanent. A closed subaccount cannot be reopened, it cannot make or receive calls or send or receive SMS messages, and Twilio releases the phone numbers assigned to it when the subaccount is closed.
- Your request targets a subaccount whose current
statusisclosed. - You tried to change a closed subaccount back to
active. Only suspended subaccounts can be restored by updatingStatustoactive. - Your application may send a follow-up status update for an
AccountSidthat was already closed earlier in your workflow.
- Fetch the Account resource for the target
AccountSidand confirm its currentstatusbefore retrying the request. If the subaccount isclosed, do not retry the status update. - If you need to stop activity temporarily, suspend the subaccount instead of closing it. You can restore a suspended subaccount by updating
Statustoactive. - Use another active account for future requests if the original subaccount is closed. Closed accounts cannot be reopened.
- Before you close a subaccount, transfer any phone numbers you need to keep to your main account or another related subaccount. Closing a subaccount releases its phone numbers.
To check a subaccount's status before retrying an update:
1curl -G "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json" \2-u "$TWILIO_API_KEY:$TWILIO_API_SECRET"
Use the target subaccount SID in the request URL and authenticate with a Main API key associated with your main account. Standard API keys can't access Account resources.
Check the status property in the response. If it is closed, do not retry the Status update.