curl --request POST \
--url https://api.spenza.com/api/v1.1/esim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"imei": "356938035643809",
"simId": "BIB009A",
"planId": "AT&T 5GB",
"email": "jane@example.com",
"activateNow": true,
"scheduleDate": "2023-11-07T05:31:56Z",
"zipcode": "10011"
}
'import requests
url = "https://api.spenza.com/api/v1.1/esim"
payload = {
"imei": "356938035643809",
"simId": "BIB009A",
"planId": "AT&T 5GB",
"email": "jane@example.com",
"activateNow": True,
"scheduleDate": "2023-11-07T05:31:56Z",
"zipcode": "10011"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
imei: '356938035643809',
simId: 'BIB009A',
planId: 'AT&T 5GB',
email: 'jane@example.com',
activateNow: true,
scheduleDate: '2023-11-07T05:31:56Z',
zipcode: '10011'
})
};
fetch('https://api.spenza.com/api/v1.1/esim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spenza.com/api/v1.1/esim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'imei' => '356938035643809',
'simId' => 'BIB009A',
'planId' => 'AT&T 5GB',
'email' => 'jane@example.com',
'activateNow' => true,
'scheduleDate' => '2023-11-07T05:31:56Z',
'zipcode' => '10011'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spenza.com/api/v1.1/esim"
payload := strings.NewReader("{\n \"imei\": \"356938035643809\",\n \"simId\": \"BIB009A\",\n \"planId\": \"AT&T 5GB\",\n \"email\": \"jane@example.com\",\n \"activateNow\": true,\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"zipcode\": \"10011\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.spenza.com/api/v1.1/esim")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"imei\": \"356938035643809\",\n \"simId\": \"BIB009A\",\n \"planId\": \"AT&T 5GB\",\n \"email\": \"jane@example.com\",\n \"activateNow\": true,\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"zipcode\": \"10011\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spenza.com/api/v1.1/esim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"imei\": \"356938035643809\",\n \"simId\": \"BIB009A\",\n \"planId\": \"AT&T 5GB\",\n \"email\": \"jane@example.com\",\n \"activateNow\": true,\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"zipcode\": \"10011\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"transactionId": "64f1a2b3c4d5e6f7a8b9c0d1",
"statusEndpoint": "/api/v3/transactions/64f1a2b3c4d5e6f7a8b9c0d1"
}
}Provision an eSIM, optionally with a plan
Provision an eSIM. Omit planId for a bare eSIM (SIM-only provisioning
is only supported for the SpenzaJ carrier family today — other carriers
return 501 on the SIM-only path); include planId to also activate a
plan in the same operation. Always asynchronous — 202 with a
transactionId/statusEndpoint to poll. On completion, result is
{ mdn, iccid, qrCode } (or { orderId } if those aren’t available).
curl --request POST \
--url https://api.spenza.com/api/v1.1/esim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"imei": "356938035643809",
"simId": "BIB009A",
"planId": "AT&T 5GB",
"email": "jane@example.com",
"activateNow": true,
"scheduleDate": "2023-11-07T05:31:56Z",
"zipcode": "10011"
}
'import requests
url = "https://api.spenza.com/api/v1.1/esim"
payload = {
"imei": "356938035643809",
"simId": "BIB009A",
"planId": "AT&T 5GB",
"email": "jane@example.com",
"activateNow": True,
"scheduleDate": "2023-11-07T05:31:56Z",
"zipcode": "10011"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
imei: '356938035643809',
simId: 'BIB009A',
planId: 'AT&T 5GB',
email: 'jane@example.com',
activateNow: true,
scheduleDate: '2023-11-07T05:31:56Z',
zipcode: '10011'
})
};
fetch('https://api.spenza.com/api/v1.1/esim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spenza.com/api/v1.1/esim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'imei' => '356938035643809',
'simId' => 'BIB009A',
'planId' => 'AT&T 5GB',
'email' => 'jane@example.com',
'activateNow' => true,
'scheduleDate' => '2023-11-07T05:31:56Z',
'zipcode' => '10011'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.spenza.com/api/v1.1/esim"
payload := strings.NewReader("{\n \"imei\": \"356938035643809\",\n \"simId\": \"BIB009A\",\n \"planId\": \"AT&T 5GB\",\n \"email\": \"jane@example.com\",\n \"activateNow\": true,\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"zipcode\": \"10011\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.spenza.com/api/v1.1/esim")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"imei\": \"356938035643809\",\n \"simId\": \"BIB009A\",\n \"planId\": \"AT&T 5GB\",\n \"email\": \"jane@example.com\",\n \"activateNow\": true,\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"zipcode\": \"10011\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spenza.com/api/v1.1/esim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"imei\": \"356938035643809\",\n \"simId\": \"BIB009A\",\n \"planId\": \"AT&T 5GB\",\n \"email\": \"jane@example.com\",\n \"activateNow\": true,\n \"scheduleDate\": \"2023-11-07T05:31:56Z\",\n \"zipcode\": \"10011\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"transactionId": "64f1a2b3c4d5e6f7a8b9c0d1",
"statusEndpoint": "/api/v3/transactions/64f1a2b3c4d5e6f7a8b9c0d1"
}
}Authorizations
Bearer token obtained from POST /api/v1.1/auth/token.
Headers
Any string unique to this logical request. On a retry with the same key
and the same request body, the original response is replayed verbatim
(with an Idempotency-Replayed: true response header) instead of the
action repeating. Reusing the key with a different body or on a
different route returns 409 IDEMPOTENCY_KEY_REUSED. A replay attempted
while the original call is still in flight returns 409 CONFLICT.
Optional — omit it and the endpoint behaves exactly as it would otherwise.
"a1b2c3d4-idem-key-001"
Body
Device IMEI — exactly 15 digits, Luhn-valid.
"356938035643809"
SIM provisioning product name.
"BIB009A"
Optional plan product name — activates a plan in the same operation.
"AT&T 5GB"
Shorthand for user.email. If omitted with no planId, the eSIM is provisioned unassigned.
"jane@example.com"
No server-enforced default despite historical docs claiming true — omitting it is forwarded as-is to the provisioning job rather than coerced.
Only meaningful with planId; forces activateNow=false when set.
5-digit US ZIP, overrides number provisioning ZIP.
"10011"
Used to create the user if one doesn't exist for the resolved email.
Show child attributes
Show child attributes
Response
Accepted — poll statusEndpoint.

