---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/90011#article
headline: "90011: MessageSid is invalid"
url: https://www.twilio.com/docs/api/errors/90011
inLanguage: en
dateModified: 2026-06-09T11:00:42.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 90011: MessageSid is invalid

Log Type: APPLICATION

Log Level: ERROR

## Description

This error occurs when you send a `MessageSid` that does not match the expected format for a Message resource. Use a Twilio-generated Message SID with the `SM` or `MM` prefix followed by 32 hexadecimal characters.

### Possible causes

* The `MessageSid` value does not start with `SM` or `MM`.
* The SID is not 34 characters long.
* The SID contains characters outside the hexadecimal range `0-9` and `a-f`.
* You passed a SID for a different resource, such as `AC...` or `MG...`, instead of a Message SID.

### Possible solutions

* Copy the Message SID from the original message create response, a message fetch response, or the Messaging logs.
* Validate the SID format before you send the request. A valid Message SID matches `^(SM|MM)[0-9a-fA-F]{32}$`.
* Make sure the `MessageSid` parameter contains a Twilio-generated Message SID, not another Twilio resource SID.
* If you need to inspect an existing message, fetch it from the Messages resource by using the correct Message SID.

#### Additional resources

* [Messages resource](/docs/messaging/api/message-resource)
* [Programmable Messaging Logs](/docs/messaging/features/messaging-logs)
* [What is a String Identifier (SID)?](/docs/glossary/what-is-a-sid)
