Users
Revoke user consent
Revoke consent for a user. Stored credentials are deleted and the affected devices stop receiving pulls and pushes. Pass a deviceIds array to scope the revocation; omit it to revoke every device under the user.
DELETE
/
users
/
{userId}
/
consent
curl
curl --request DELETE \
--url 'https://api.amps.ai/users/user_abc123/consent' \
--header 'x-api-key: amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'content-type: application/json' \
--data '{}'const response = await fetch('https://api.amps.ai/users/user_abc123/consent', {
method: 'DELETE',
headers: {
'x-api-key': 'amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx',
'content-type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await response.json();import requests
url = 'https://api.amps.ai/users/user_abc123/consent'
headers = {
'x-api-key': 'amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx',
'content-type': 'application/json',
}
payload = {}
response = requests.delete(url, headers=headers, json=payload)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.amps.ai/users/{userId}/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.amps.ai/users/{userId}/consent"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.delete("https://api.amps.ai/users/{userId}/consent")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amps.ai/users/{userId}/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true,
"userId": "user_abc123",
"revokedDeviceCount": 2,
"revokedDeviceIds": [
"device_abc123",
"device_xyz789"
]
},
"meta": {
"requestId": "req_8a2Bf3kP",
"environment": "sandbox",
"timestamp": "2026-06-02T12:00:00.000Z",
"latencyMs": 12
}
}Authorizations
Path Parameters
The unique identifier for the user.
Example:
"user_abc123"
Body
application/json
Response
Consent revoked successfully.
Always true for success responses.
Show child attributes
Show child attributes
Metadata attached to every response: the request identifier, the serving environment, the build timestamp, and the server-side latency.
Show child attributes
Show child attributes
⌘I
curl
curl --request DELETE \
--url 'https://api.amps.ai/users/user_abc123/consent' \
--header 'x-api-key: amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'content-type: application/json' \
--data '{}'const response = await fetch('https://api.amps.ai/users/user_abc123/consent', {
method: 'DELETE',
headers: {
'x-api-key': 'amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx',
'content-type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await response.json();import requests
url = 'https://api.amps.ai/users/user_abc123/consent'
headers = {
'x-api-key': 'amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx',
'content-type': 'application/json',
}
payload = {}
response = requests.delete(url, headers=headers, json=payload)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.amps.ai/users/{userId}/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.amps.ai/users/{userId}/consent"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.delete("https://api.amps.ai/users/{userId}/consent")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.amps.ai/users/{userId}/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"success": true,
"userId": "user_abc123",
"revokedDeviceCount": 2,
"revokedDeviceIds": [
"device_abc123",
"device_xyz789"
]
},
"meta": {
"requestId": "req_8a2Bf3kP",
"environment": "sandbox",
"timestamp": "2026-06-02T12:00:00.000Z",
"latencyMs": 12
}
}