Delete API Key

Delete an API key by ID. You cannot delete the API key that is currently being used for authentication.

DELETE/api-keys/{api_key_id}

Resend Compatibility: Compatible

Requires a full_access API key.

Path Parameters

api_key_idstringrequired

The ID of the API key to delete.

Response Fields

objectstring

Always "api_key".

idstring

The API key ID.

deletedboolean

Always true.

curl -X DELETE 'https://api.postflare.app/api-keys/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  -H 'Authorization: Bearer re_xxxxxxxxx'
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.apiKeys.remove(
  'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
);

Response

Response
{
  "object": "api_key",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "deleted": true
}