Get a SIM's current service state
curl --request GET \
--url https://api.spenza.com/api/v1.1/sims/{iccid}/service-state \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spenza.com/api/v1.1/sims/{iccid}/service-state"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spenza.com/api/v1.1/sims/{iccid}/service-state', 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/sims/{iccid}/service-state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spenza.com/api/v1.1/sims/{iccid}/service-state"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spenza.com/api/v1.1/sims/{iccid}/service-state")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spenza.com/api/v1.1/sims/{iccid}/service-state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"iccid": "8901260853182965429",
"serviceState": {
"voice": true,
"sms": true,
"data": null
},
"updatedAt": "2026-08-10T12:00:00.000Z"
}
}SIMs
Get a SIM's current service state
Get the SIM’s current voice/SMS service state, as last persisted by a
PATCH to this same endpoint. This is always a fast, cached read —
it never calls the operator live and never charges the action fee
PATCH does.
serviceState.voice/.sms are null until the line’s state has
been toggled at least once via PATCH. .data is always null
today, since no operator can report it. updatedAt is null until
the first toggle, then reflects the most recent one.
GET
/
api
/
v1.1
/
sims
/
{iccid}
/
service-state
Get a SIM's current service state
curl --request GET \
--url https://api.spenza.com/api/v1.1/sims/{iccid}/service-state \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.spenza.com/api/v1.1/sims/{iccid}/service-state"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.spenza.com/api/v1.1/sims/{iccid}/service-state', 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/sims/{iccid}/service-state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spenza.com/api/v1.1/sims/{iccid}/service-state"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spenza.com/api/v1.1/sims/{iccid}/service-state")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spenza.com/api/v1.1/sims/{iccid}/service-state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"iccid": "8901260853182965429",
"serviceState": {
"voice": true,
"sms": true,
"data": null
},
"updatedAt": "2026-08-10T12:00:00.000Z"
}
}
