Delete Account
curl --request DELETE \
--url https://api.lobstr.io/v1/accounts/{account_hash} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/accounts/{account_hash}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/accounts/{account_hash}', 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.lobstr.io/v1/accounts/{account_hash}",
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: <authorization>"
],
]);
$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.lobstr.io/v1/accounts/{account_hash}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.lobstr.io/v1/accounts/{account_hash}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/accounts/{account_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"deleted": true
}Account
Delete Account
Permanently remove a platform account from your Lobstr account
DELETE
/
v1
/
accounts
/
{account_hash}
Delete Account
curl --request DELETE \
--url https://api.lobstr.io/v1/accounts/{account_hash} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/accounts/{account_hash}"
headers = {"Authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/accounts/{account_hash}', 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.lobstr.io/v1/accounts/{account_hash}",
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: <authorization>"
],
]);
$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.lobstr.io/v1/accounts/{account_hash}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.lobstr.io/v1/accounts/{account_hash}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/accounts/{account_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"deleted": true
}This endpoint permanently removes a specific platform account using its hash ID. All associated cookies and configurations will be deleted.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYQuery Parameters
string
required
The unique identifier (hash) of the account to delete. Example:
d3e97f2cd33658f301bdbe807402ab30Response Field Explanations
string
The deleted account’s identifier. Example:
"d3e97f2cd33658f301bdbe807402ab30"string
Always “account”. Example:
"account"boolean
Confirmation of deletion. Always
true on success.This action is permanent and cannot be undone. Make sure no active squids are using this account before deletion.
Use Get Account Details first to check the squids array and see which squids depend on this account.
Deleting an account does not affect your squids, but they will fail to run if they require this account for authentication.
If you’re experiencing cookie issues, use Refresh Cookies instead of deleting and re-creating the account.
Code Examples
curl -X DELETE "https://api.lobstr.io/v1/accounts/d3e97f2cd33658f301bdbe807402ab30" \
-H "Authorization: Token YOUR_API_KEY"
import requests
account_hash = "d3e97f2cd33658f301bdbe807402ab30"
url = f"https://api.lobstr.io/v1/accounts/{account_hash}"
headers = {
"Authorization": "Token YOUR_API_KEY"
}
# First, check if any squids are using this account
details_response = requests.get(url, headers=headers)
account = details_response.json()['data'][0]
if account['squids']:
print("Warning: The following squids are using this account:")
for squid in account['squids']:
print(f" - {squid['name']}")
print("\nDeleting will cause these squids to fail.")
confirm = input("Continue? (y/n): ")
if confirm.lower() != 'y':
print("Cancelled.")
exit()
# Delete the account
response = requests.delete(url, headers=headers)
data = response.json()
if data.get('deleted'):
print(f"Account {data['id']} deleted successfully")
else:
print("Failed to delete account")
Response
200
{
"id": "d3e97f2cd33658f301bdbe807402ab30",
"object": "account",
"deleted": true
}
404
{
"detail": "Account not found."
}
⌘I