Recipe: provision an eSIM + webhooks
A complete integration in one flow: set up webhooks, provision an eSIM, and watch its events arrive. Runs on
the sandbox with an ig_test_ key — no spend, no NDA.
1. Register a webhook endpoint
Section titled “1. Register a webhook endpoint”Store the returned whsec_ secret (shown once) — you’ll verify signatures with it.
curl -X POST https://api.sandbox.interglobe.io/v1/webhook_endpoints \ -H "Authorization: Bearer $IG_KEY" -H "Content-Type: application/json" \ -d '{ "url": "https://your.app/webhooks/interglobe", "enabled_event_types": ["*"] }'2. Provision an eSIM
Section titled “2. Provision an eSIM”curl -X POST https://api.sandbox.interglobe.io/v1/esims \ -H "Authorization: Bearer $IG_KEY" -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" -d '{ "product_id": "prod_eu_5gb" }'3. Fire a test event, then read the log
Section titled “3. Fire a test event, then read the log”curl -X POST https://api.sandbox.interglobe.io/v1/events/test \ -H "Authorization: Bearer $IG_KEY" -H "Content-Type: application/json" \ -d '{ "type": "esim.provisioned", "data": { "iccid": "8944..." } }'
curl https://api.sandbox.interglobe.io/v1/events -H "Authorization: Bearer $IG_KEY"4. Verify the delivery
Section titled “4. Verify the delivery”In your handler, verify the signature over the raw body — see Webhooks.
For AI agents
Section titled “For AI agents”This exact workflow ships as an MCP skill. Point your agent at the InterGlobe MCP server
with an ig_test_ key and run the provision_esim_with_webhooks prompt — it drives create_webhook_endpoint
→ provision_esim → send_test_event → list_events for you.