# Why a Twilio retry sends a second SMS and a second bill

DevFeed: [Why a Twilio retry sends a second SMS and a second bill](<https://devfeed.tech/articles/why-a-twilio-retry-sends-a-second-sms-and-a-second-bill-109716.md>)

Original publisher: [Read original article](<https://www.swytchcode.com/content/twilio-api-agent-sms>)

Author: Swytchcode Team

Published: 2026-10-30T19:02:52Z

Content type: article

Language: en

Sources: [Swytchcode](<https://devfeed.tech/sources/swytchcode.md>)

Topics: [twilio api](<https://devfeed.tech/topics/twilio-api.md>), [retry](<https://devfeed.tech/topics/retry.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-twilio](<https://devfeed.tech/tags/api-twilio.md>), [bill](<https://devfeed.tech/tags/bill.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [idempotency](<https://devfeed.tech/tags/idempotency.md>), [retry](<https://devfeed.tech/tags/retry.md>), [sms](<https://devfeed.tech/tags/sms.md>), [twilio](<https://devfeed.tech/tags/twilio.md>)

## AI overview

Twilio's Messages create endpoint has no idempotency key: each accepted POST creates a separate Message with its own SID, and can send and bill the same text again. A timeout leaves the first attempt's outcome unknown; check stored SIDs or Twilio's message list before retrying. Persist the SID, recipient, body hash, status, and num_segments, and avoid a replacement while the original is queued or sent. num_segments reflects how many parts one body uses, so longer or Unicode text can raise the cost even for a single create; a duplicate create incurs those segment charges again. The excerpt also recommends counting creates per recipient and limiting bulk sends. Destination prices vary, and callback properties vary by channel.

## Source excerpt

Twilio's Messages create has no idempotency key. A second POST is a second SMS with its own SID, and num_segments can bill that same body more than once.