Twilio Compatibility and Migration
Migrate supported Twilio integrations to TextGrid and understand API compatibility, SDK configuration, and TextGrid-specific features
TextGrid’s core API is designed for compatibility with Twilio integrations. Supported operations use familiar endpoint paths, request fields, and JSON and XML response structures.
Compatibility covers account retrieval, subaccount creation, supported phone-number operations, messaging, voice, and phone-number lookups. It does not extend to every Twilio product, endpoint, or option.
API hosts and credentials
For supported core API operations, use:
https://api.textgrid.com/2010-04-01Phone-number lookups use a separate host:
https://lookups.textgrid.com/v1Replace your Twilio credentials with your TextGrid Account SID and Auth Token. Use TextGrid resource identifiers when retrieving or updating accounts, messages, calls, and phone numbers.
TextGrid supports HTTP Basic Auth using the Account SID as the username and Auth Token as the password. See Getting Started for authentication instructions.
API version dates
The date component in the core API path does not select different TextGrid behavior. For example, using 2020-01-01 instead of 2010-04-01 does not change the operation.
Use 2010-04-01 for consistency with the API Reference.
Using Twilio SDKs
Compatible Twilio SDKs can continue to handle supported operations when configured to use TextGrid’s API host and credentials.
The configuration method depends on the SDK and version. Some allow a custom API base URL; others require a custom HTTP client that changes the destination host.
When configuring your SDK:
- Point core API requests to
api.textgrid.com. - Configure Lookup requests separately to use
lookups.textgrid.com. - Use your TextGrid Account SID and Auth Token.
- Preserve the endpoint path and query parameters.
- Check the API Reference for supported operations, fields, and request formats.
If the SDK setting expects only a host, do not include /2010-04-01; the SDK may already add that path.
TextGrid provides additional endpoints and response properties that Twilio SDK models may not expose. Use direct HTTP requests when you need those features or fields.
Sending messages
Use a TextGrid sending phone number in the from field.
A Twilio MessagingServiceSid cannot replace the sending number. If your existing integration selects senders through a Twilio Messaging Service, update it to supply the appropriate TextGrid number.
Before sending, confirm that the number is enabled for the intended traffic and that any required registration and campaign attachment are complete.
See Sending SMS and MMS and A2P 10DLC Registration.
JSON and XML responses
Supported paired routes return JSON when the URL ends in .json and XML when that suffix is omitted.
Removing .json changes the response format; it does not mean the request body should be XML. Use the request format documented for each endpoint.
This convention does not apply to every TextGrid endpoint. See Response Formats for details and XML field names.
Webhook verification
Update callback URLs and signature verification as part of your migration.
TextGrid signs webhooks using your account’s Webhook Secret and sends the signature in the X-TextGrid-Signature header. Follow TextGrid’s verification procedure rather than assuming an existing Twilio signature validator will work unchanged.
See Verifying Webhook Signatures, Messaging Webhooks, and Voice Webhooks.
Message statuses and errors
Review how your application reads message results.
Retrieved message records can include both the state and a description in status, such as:
failed - 'To' number invalidDelivery callbacks provide the state in MessageStatus and SmsStatus, with additional details in SmsStatusDetail when available.
Do not assume every retrieved status is a single keyword or that every failure includes error_code or error_message.
See Delivery Status Reference and Error Code Reference.
Migration checklist
Before switching production traffic:
- Replace API hosts and credentials.
- Update resource identifiers and sending numbers.
- Confirm number capabilities, messaging access, and required registration.
- Configure incoming-message, delivery-status, and voice callback URLs.
- Implement TextGrid webhook signature verification.
- Test the operations and options your application uses.
- Check message-status handling, error handling, and access to any TextGrid-specific response fields.
TextGrid is an independent service and is not affiliated with, sponsored by, or endorsed by Twilio.
Updated 14 days ago