Skip to main content
DELETE
/
rest
/
v1
/
accounts
Delete Account
curl --request DELETE \
  --url https://onlyautomator.com/rest/v1/accounts \
  --header 'Authorization: <api-key>' \
  --header 'apikey: <apikey>'
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The 'fanId' parameter is required.",
    "details": {
      "field": "fanId",
      "issue": "Required field missing or invalid format"
    }
  }
}

Delete Account(s)

Deletes one or more account records that match the specified filters. You must provide a filter, typically id=eq.{accountId}, to specify which record(s) to delete.
This operation is irreversible. Be absolutely sure about your filter criteria before executing a delete request, especially without a precise id=eq.{value} filter.

Example Usage

// Delete a specific account by ID
const deleteSpecificAccount = async (accountId) => {
  const { error } = await supabase
    .from('accounts')
    .delete()
    .eq('id', accountId); // Filter to delete only this specific account

  if (error) {
    console.error('Error deleting account:', error);
    throw error;
  }
  console.log(`Account ${accountId} deleted successfully.`);
  return { success: true };
};

Authorizations

Authorization
string
header
required

Supabase JWT token, prefix with 'Bearer '. Also requires 'apikey' header.

Headers

apikey
string
required

Supabase API Key (anon or service_role)

Query Parameters

id
string
required

Filter by ID (e.g., id=eq.UUID)

Response

Account deleted successfully