DELETE
/
rest
/
v1
/
accounts
Delete Account
curl --request DELETE \
  --url https://onlyautomator.com/rest/v1/accounts \
  --header 'apikey: <api-key>'
This response does not have an example.

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

apikey
string
header
required

Supabase API Key (anon or service_role)

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