Rotate team API key
curl --request POST \
--url https://app.nudgen.net/api/v1/settings/team-api-keys/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.nudgen.net/api/v1/settings/team-api-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.nudgen.net/api/v1/settings/team-api-keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"apiKey": {
"id": "<string>",
"name": "<string>",
"keyPrefix": "<string>",
"scopes": [
"campaigns:trigger"
],
"lastUsedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"key": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}API reference
Rotate team API key
Owner or admin only. Rotating invalidates the previous key immediately and returns the new raw key once. Revoked or expired keys cannot be rotated.
POST
/
api
/
v1
/
settings
/
team-api-keys
/
{id}
Rotate team API key
curl --request POST \
--url https://app.nudgen.net/api/v1/settings/team-api-keys/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.nudgen.net/api/v1/settings/team-api-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.nudgen.net/api/v1/settings/team-api-keys/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"apiKey": {
"id": "<string>",
"name": "<string>",
"keyPrefix": "<string>",
"scopes": [
"campaigns:trigger"
],
"lastUsedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"key": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Was this page helpful?