Voice & SMS
Twilio mock API
Stateful Twilio replica: Programmable Messaging and Voice (messages, calls, incoming numbers), Verify (services, verifications, checks), Lookups and signed status callbacks.
At a glance
- Operations
- 264
- Stateful operations
- 18
- Stateful resources
- 6
- Webhook events
- 4
- Vendor API version
- 2010-04-01 (Core), Verify v2, Lookups v2
- Verification
- Spec-verified
How it works
Use Twilio without calling Twilio Inc.
- Install the mock from the library into a workspace. It runs as a virtual service.
- Point your client's base URL at the virtual service instead of the vendor.
- Authenticate the way you already do. The mock accepts the same credential shape:
Authorization: Basic QUMwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMTptb2NrdG9rZW4wMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OQ== State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| Messages | 5 |
| Calls | 5 |
| Incoming phone numbers | 3 |
| Account | 1 |
| Verify | 5 |
| Lookups | 1 |
Webhooks
Events your handlers can receive
- message.sent
- message.delivered
- call.ringing
- call.completed
Deliveries are signed with the twilio scheme, so your verification code runs unchanged.
Coverage
264 operations
18 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 244 |
| Calls | 5 |
| Messages | 5 |
| Verify | 5 |
| Incoming phone numbers | 3 |
| Account | 1 |
Verification
Spec-verified
Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.
4 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the Twilio Inc. API description, licensed under MIT.
- Twilio Inc. API documentation
- Source specification
- Source specification
- Source specification
Each collection holds up to 1 MiB of objects per Account SID/Auth Token pair; writes beyond that are dropped (x-maxoperf-vs-state: capacity). Point the api.twilio.com, verify.twilio.com and lookups.twilio.com hosts at this one mock host. The AccountSid in a path is not compared with the Basic-auth user. Date fields are ISO 8601 instead of RFC 2822. Magic numbers: From +15005550006 is valid, From +15005550001 fails with 21212, To +15005550001 with 21211, To +15005550009 with 21614. Verification code 123456 approves. Status callbacks are signed with X-Twilio-Signature using the Auth Token from the Basic header.
MaxoPerf is not affiliated with, endorsed by, or sponsored by Twilio Inc. Twilio is a trademark of its owner.