Delete is an async function that requires the id of the record to delete. Some resources don't support deletion, but instead give you accessed to a soft delete through the status field in the edit method.

The only argument is the id of the record to delete, in this example we delete a member.

import { TSGhostAdminAPI } from "@ts-ghost/admin-api";
const api = new TSGhostAdminAPI(
const result = await api.members.delete("edHks74hdKqhs34izzahd45");
if (!result.success) {
  throw new Error("Failed to delete Member");


The response will not contain any data since Ghost API just return a 204 empty response. You will have to check the discriminator success to know if the deletion was successful or not.

// return from the `delete` method
const result: {
    success: true;
} | {
    success: false;
    errors: {
        message: string;
        type: string;