Delete Organization - Mem0
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Delete Organization
Python
import requests
url = "https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/"
headers = {"Authorization": "Token <api-key>"}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
JavaScript
const options = {method: 'DELETE', headers: {Authorization: 'Token <api-key>'}};
fetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
cURL
curl --request DELETE \
--url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/ \
--header 'Authorization: Token <api-key>'
Go
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Token <api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Token <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Java (Unirest)
HttpResponse<String> response = Unirest.delete("https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/")
.header("Authorization", "Token <api-key>")
.asString();
Ruby
require 'uri'
require 'net/http'
url = URI("https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body
Response Codes
200
Organization deleted successfully!403
Unauthorized404
Organization not found
Sample JSON Responses
{
"message": "Organization deleted successfully!"
}
{
"message": "Unauthorized"
}
{
"message": "Organization not found"
}
Authorizations
Authorizationstring
header
required
API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'
Path Parameters
- org_id
string
required
Unique identifier of the organization to delete.
Example
Delete an organization with the given organization ID.