curl --request POST \
--url https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate', 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.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"user_id": "9a7c5e3b-1d2f-4a6c-8e0b-3f5d7c9a1b2e",
"email": "[email protected]",
"name": "Alice",
"domain": "acme.com",
"state": "active",
"deactivated_at": "2023-11-07T05:31:56Z"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}Deactivate a managed account
Deactivates the account: in the same transaction its sessions and device codes are deleted and its personal tokens revoked, and from then on every login is refused and every credential it still presents is refused (401). It is a state, never a deleted row: no membership changes, and releasing the domain does not reactivate it. Your own account and a platform administrator’s are refused with 422; an account the organization does not manage is a 404. Deactivating a deactivated account returns it unchanged.
curl --request POST \
--url https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate', 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.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qumo-deploy.com/v1/organizations/{id}/managed-accounts/{userID}/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"user_id": "9a7c5e3b-1d2f-4a6c-8e0b-3f5d7c9a1b2e",
"email": "[email protected]",
"name": "Alice",
"domain": "acme.com",
"state": "active",
"deactivated_at": "2023-11-07T05:31:56Z"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}Authorizations
A personal access token (POST /v1/auth/tokens) or a machine
identity token (POST /v1/projects/{project_id}/identities/{identity_id}/tokens),
both prefixed qumo_pat_. A token's scopes cap what it can do; see
Scopes and permissions. A personal
token names no organization: on a route whose path names no project or
organization, pass ?organization_id=.
Path Parameters
The organization's id.
The managed account's user id.
Response
The account, deactivated.
An account the organization manages, because its email is at one of the organization's claimed domains (exact domain only).
"9a7c5e3b-1d2f-4a6c-8e0b-3f5d7c9a1b2e"
"Alice"
The organization's claimed domain the email is at.
"acme.com"
active, deactivated "active"