Clients
Remove client user
Soft-deletes a user from the client workspace. Cannot remove the last admin. Returns 200 with the updated client (mirrors the internal controller).
DELETE
/
public
/
api
/
v1
/
clients
/
{clientPublicId}
/
users
/
{userPublicId}
Remove client user
curl --request DELETE \
--url https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}', 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.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}Autorizações
Resposta
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Opções disponíveis:
active, past_due, canceled, trialing, pending_onboarding, suspended Show child attributes
Show child attributes
Esta página foi útil?
Anterior
Update client userUpdates a user's name and role within the client workspace. Cannot demote the last admin.
Próximo
⌘I
Remove client user
curl --request DELETE \
--url https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}', 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.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/users/{userPublicId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}{
"createdAt": "2023-11-07T05:31:56Z",
"creditsBalance": 123,
"creditsUsedThisPeriod": 123,
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"extraCreditsBalance": 123,
"nextCreditRenewalAt": "2023-11-07T05:31:56Z",
"pendingInvitations": [
{
"createdAt": "2023-11-07T05:31:56Z",
"email": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"pendingPlan": {
"currency": "<string>",
"effectiveAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"plan": {
"billingIntervalMonths": 123,
"creditsIncluded": 123,
"currency": "<string>",
"name": "<string>",
"priceCents": 123,
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seatsLimit": 123,
"unlimitedCredits": true,
"users": [
{
"completedOnboarding": true,
"email": "<string>",
"lastSeenAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>"
}
],
"usersCount": 123,
"workspaceName": "<string>"
}
