Update a sim-group
curl --request PUT \
--url https://api.spenza.com/api/v1.1/sim-groups/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spendLimit": 1,
"dataQuota": 1,
"currency": "<string>"
}
'import requests
url = "https://api.spenza.com/api/v1.1/sim-groups/{name}"
payload = {
"spendLimit": 1,
"dataQuota": 1,
"currency": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({spendLimit: 1, dataQuota: 1, currency: '<string>'})
};
fetch('https://api.spenza.com/api/v1.1/sim-groups/{name}', 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/sim-groups/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'spendLimit' => 1,
'dataQuota' => 1,
'currency' => '<string>'
]),
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/sim-groups/{name}"
payload := strings.NewReader("{\n \"spendLimit\": 1,\n \"dataQuota\": 1,\n \"currency\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.spenza.com/api/v1.1/sim-groups/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"spendLimit\": 1,\n \"dataQuota\": 1,\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spenza.com/api/v1.1/sim-groups/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spendLimit\": 1,\n \"dataQuota\": 1,\n \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"name": "Sales Team",
"spendLimit": 1500,
"dataQuota": 100,
"currency": "USD",
"dataUnit": "GB"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "One or more fields failed validation.",
"details": {
"validationErrors": [
"dataUnit must be one of the following values: KB, MB, GB"
]
}
}
}{
"success": false,
"error": {
"code": "SIM_GROUP_NOT_FOUND",
"message": "We couldn't find a sim-group with that name on your account."
}
}SIM Groups
Update a sim-group
PUT
/
api
/
v1.1
/
sim-groups
/
{name}
Update a sim-group
curl --request PUT \
--url https://api.spenza.com/api/v1.1/sim-groups/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spendLimit": 1,
"dataQuota": 1,
"currency": "<string>"
}
'import requests
url = "https://api.spenza.com/api/v1.1/sim-groups/{name}"
payload = {
"spendLimit": 1,
"dataQuota": 1,
"currency": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({spendLimit: 1, dataQuota: 1, currency: '<string>'})
};
fetch('https://api.spenza.com/api/v1.1/sim-groups/{name}', 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/sim-groups/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'spendLimit' => 1,
'dataQuota' => 1,
'currency' => '<string>'
]),
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/sim-groups/{name}"
payload := strings.NewReader("{\n \"spendLimit\": 1,\n \"dataQuota\": 1,\n \"currency\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.spenza.com/api/v1.1/sim-groups/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"spendLimit\": 1,\n \"dataQuota\": 1,\n \"currency\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spenza.com/api/v1.1/sim-groups/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spendLimit\": 1,\n \"dataQuota\": 1,\n \"currency\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"name": "Sales Team",
"spendLimit": 1500,
"dataQuota": 100,
"currency": "USD",
"dataUnit": "GB"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "One or more fields failed validation.",
"details": {
"validationErrors": [
"dataUnit must be one of the following values: KB, MB, GB"
]
}
}
}{
"success": false,
"error": {
"code": "SIM_GROUP_NOT_FOUND",
"message": "We couldn't find a sim-group with that name on your account."
}
}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.
Example:
"a1b2c3d4-idem-key-001"
Path Parameters
Exact match, case-sensitive. Not renamable.
Example:
"Sales Team"
Body
application/json
Response
Updated.
⌘I

