Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this pageProducts used
Looking for more inspiration?Visit the
Error
Application error

21479: Unable to update Status for subaccount, subaccount has been closed.

Twilio API Documentation and Error CodesAPI
Twilio Identity Access Management DocumentationIAM

Description

description page anchor

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.

Possible causes

possible-causes page anchor
  • Your request targets a subaccount whose current status is closed.
  • You tried to change a closed subaccount back to active. Only suspended subaccounts can be restored by updating Status to active.
  • Your application may send a follow-up status update for an AccountSid that was already closed earlier in your workflow.
  • Fetch the Account resource for the target AccountSid and confirm its current status before retrying the request. If the subaccount is closed, 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 Status to active.
  • 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:

1
curl -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.

Additional resources

additional-resources page anchor