Delete user
curl --request DELETE \
--url https://studio.edgeimpulse.com/v1/api/users/{userId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"password": "<string>",
"totpToken": "<string>"
}
'import requests
url = "https://studio.edgeimpulse.com/v1/api/users/{userId}"
payload = {
"password": "<string>",
"totpToken": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', totpToken: '<string>'})
};
fetch('https://studio.edgeimpulse.com/v1/api/users/{userId}', 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://studio.edgeimpulse.com/v1/api/users/{userId}",
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([
'password' => '<string>',
'totpToken' => '<string>'
]),
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://studio.edgeimpulse.com/v1/api/users/{userId}"
payload := strings.NewReader("{\n \"password\": \"<string>\",\n \"totpToken\": \"<string>\"\n}")
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://studio.edgeimpulse.com/v1/api/users/{userId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"totpToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/users/{userId}")
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 = "{\n \"password\": \"<string>\",\n \"totpToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": "<string>"
}Delete user
Delete a user. This function is only available through a JWT token, and can only remove the current user.
DELETE
/
api
/
users
/
{userId}
Delete user
curl --request DELETE \
--url https://studio.edgeimpulse.com/v1/api/users/{userId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"password": "<string>",
"totpToken": "<string>"
}
'import requests
url = "https://studio.edgeimpulse.com/v1/api/users/{userId}"
payload = {
"password": "<string>",
"totpToken": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', totpToken: '<string>'})
};
fetch('https://studio.edgeimpulse.com/v1/api/users/{userId}', 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://studio.edgeimpulse.com/v1/api/users/{userId}",
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([
'password' => '<string>',
'totpToken' => '<string>'
]),
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://studio.edgeimpulse.com/v1/api/users/{userId}"
payload := strings.NewReader("{\n \"password\": \"<string>\",\n \"totpToken\": \"<string>\"\n}")
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://studio.edgeimpulse.com/v1/api/users/{userId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"password\": \"<string>\",\n \"totpToken\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://studio.edgeimpulse.com/v1/api/users/{userId}")
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 = "{\n \"password\": \"<string>\",\n \"totpToken\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"error": "<string>"
}Authorizations
ApiKeyAuthenticationJWTAuthenticationJWTHttpHeaderAuthenticationOAuth2
Path Parameters
User ID
Body
application/json
User's current password. Required if the user has a password set.
TOTP Token. Required if a user has multi-factor authentication with a TOTP token enabled. If a user has MFA enabled, but no totpToken is submitted; then an error starting with "ERR_TOTP_TOKEN IS REQUIRED" is returned. Use this to then prompt for an MFA token and re-try this request.
Was this page helpful?
⌘I