SendGrid mock API
Stateful SendGrid replica: v3 Mail Send with signed-style event webhook payloads, dynamic templates and versions, Marketing contacts and lists, suppressions and event webhook settings.
At a glance
- Operations
- 90
- Stateful operations
- 47
- Stateful resources
- 6
- Webhook events
- 3
- Vendor API version
- v3
- Verification
- Spec-verified
How it works
Use SendGrid without calling Twilio Inc. (SendGrid)
- 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: Bearer SG.MockApiKey.0123456789abcdefghijklmnopqrstuvwxyz State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| Mail send | 1 |
| Templates | 9 |
| Marketing contacts | 7 |
| Marketing lists | 7 |
| Suppressions | 16 |
| Event webhook | 7 |
Webhooks
Events your handlers can receive
- processed
- delivered
- bounce
Deliveries are unsigned: SendGrid signs the Event Webhook with ECDSA (P-256); not reproduced
Coverage
90 operations
47 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 43 |
| Suppressions | 16 |
| Templates | 9 |
| Event webhook | 7 |
| Marketing contacts | 7 |
| Marketing lists | 7 |
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.
3 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the Twilio Inc. (SendGrid) API description, licensed under MIT.
- Twilio Inc. (SendGrid) API documentation
- Source specification
- Source specification
- Source specification
- Source specification
- Source specification
- Source specification
Each collection holds up to 1 MiB of objects per API key; writes beyond that are dropped (x-maxoperf-vs-state: capacity). Mail send never delivers anything: it emits processed then delivered event webhooks (bounce instead of delivered when the first recipient is bounce@...) to every enabled event webhook, and the per-event toggles are stored but not enforced. Contact and list changes apply immediately instead of asynchronously. DELETE /marketing/contacts?ids= handles up to five comma-separated ids. Event webhook payloads are not ECDSA-signed.
MaxoPerf is not affiliated with, endorsed by, or sponsored by Twilio Inc. (SendGrid). SendGrid is a trademark of its owner.