Skip to content

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.

Store the returned whsec_ secret (shown once) — you’ll verify signatures with it.

Terminal window
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": ["*"] }'
Terminal window
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" }'
Terminal window
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"

In your handler, verify the signature over the raw body — see Webhooks.

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_endpointprovision_esimsend_test_eventlist_events for you.