Regenerate API key
curl --request POST \
--url https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate', 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.rafftechnologies.com/api/v1/api-keys/{id}/regenerate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.rafftechnologies.com/api/v1/api-keys/{id}/regenerate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.rafftechnologies.com/api/v1/api-keys/{id}/regenerate")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key_prefix": "raff_17d70fcf",
"is_active": true,
"secret": "raff_17d70fcf7e7510968a4c19279b25707f088f1cc5ad8b74210341d8e470b5bb7a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "public",
"expires_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_name": "<string>",
"role_slug": "<string>",
"project_accesses": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_name": "<string>",
"role_slug": "<string>"
}
],
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}API Keys
Regenerate API Key
Rotate an API key — issues a new secret value and immediately invalidates the previous secret. The key keeps its name, scope, role, and expiration.
The full new secret is returned once in secret. Update your secret store immediately.
POST
/
api
/
v1
/
api-keys
/
{id}
/
regenerate
Regenerate API key
curl --request POST \
--url https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate', 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.rafftechnologies.com/api/v1/api-keys/{id}/regenerate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.rafftechnologies.com/api/v1/api-keys/{id}/regenerate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.rafftechnologies.com/api/v1/api-keys/{id}/regenerate")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/api-keys/{id}/regenerate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key_prefix": "raff_17d70fcf",
"is_active": true,
"secret": "raff_17d70fcf7e7510968a4c19279b25707f088f1cc5ad8b74210341d8e470b5bb7a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scope": "public",
"expires_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_name": "<string>",
"role_slug": "<string>",
"project_accesses": [
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_name": "<string>",
"role_slug": "<string>"
}
],
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}Last modified on May 8, 2026
⌘I