Change API Key Status
curl --request POST \
--url https://sendazi.com/api/v1/api-keys/{uuid}/change-status<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sendazi.com/api/v1/api-keys/{uuid}/change-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://sendazi.com/api/v1/api-keys/{uuid}/change-status"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://sendazi.com/api/v1/api-keys/{uuid}/change-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://sendazi.com/api/v1/api-keys/{uuid}/change-status")
.asString();const url = 'https://sendazi.com/api/v1/api-keys/{uuid}/change-status';
const options = {method: 'POST'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://sendazi.com/api/v1/api-keys/{uuid}/change-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 1,
"uuid": "f2ed33fd-e4fe-435e-8536-f5f98a155c37",
"key": "pk_*********************************",
"status": "inactive",
"last_used_at": "2026-01-15T10:00:00.000000Z",
"created_at": "2026-01-01T00:00:00.000000Z"
},
"message": "API key disabled successfully."
}
{
"success": true,
"data": {
"id": 1,
"uuid": "f2ed33fd-e4fe-435e-8536-f5f98a155c37",
"key": "pk_*********************************",
"status": "active",
"last_used_at": "2026-01-15T10:00:00.000000Z",
"created_at": "2026-01-01T00:00:00.000000Z"
},
"message": "API key enabled successfully."
}
{
"success": false,
"message": "API key not found."
}
API Keys
Change API Key Status
Enable or disable an API key
POST
https://sendazi.com/api/v1
/
api-keys
/
{uuid}
/
change-status
Change API Key Status
curl --request POST \
--url https://sendazi.com/api/v1/api-keys/{uuid}/change-status<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sendazi.com/api/v1/api-keys/{uuid}/change-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://sendazi.com/api/v1/api-keys/{uuid}/change-status"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://sendazi.com/api/v1/api-keys/{uuid}/change-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://sendazi.com/api/v1/api-keys/{uuid}/change-status")
.asString();const url = 'https://sendazi.com/api/v1/api-keys/{uuid}/change-status';
const options = {method: 'POST'};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://sendazi.com/api/v1/api-keys/{uuid}/change-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 1,
"uuid": "f2ed33fd-e4fe-435e-8536-f5f98a155c37",
"key": "pk_*********************************",
"status": "inactive",
"last_used_at": "2026-01-15T10:00:00.000000Z",
"created_at": "2026-01-01T00:00:00.000000Z"
},
"message": "API key disabled successfully."
}
{
"success": true,
"data": {
"id": 1,
"uuid": "f2ed33fd-e4fe-435e-8536-f5f98a155c37",
"key": "pk_*********************************",
"status": "active",
"last_used_at": "2026-01-15T10:00:00.000000Z",
"created_at": "2026-01-01T00:00:00.000000Z"
},
"message": "API key enabled successfully."
}
{
"success": false,
"message": "API key not found."
}
The unique identifier (UUID) of the API key
Disabled API keys cannot be used for authentication. You can re-enable them at any time.
{
"success": true,
"data": {
"id": 1,
"uuid": "f2ed33fd-e4fe-435e-8536-f5f98a155c37",
"key": "pk_*********************************",
"status": "inactive",
"last_used_at": "2026-01-15T10:00:00.000000Z",
"created_at": "2026-01-01T00:00:00.000000Z"
},
"message": "API key disabled successfully."
}
{
"success": true,
"data": {
"id": 1,
"uuid": "f2ed33fd-e4fe-435e-8536-f5f98a155c37",
"key": "pk_*********************************",
"status": "active",
"last_used_at": "2026-01-15T10:00:00.000000Z",
"created_at": "2026-01-01T00:00:00.000000Z"
},
"message": "API key enabled successfully."
}
{
"success": false,
"message": "API key not found."
}
Was this page helpful?
⌘I
