Skip to main content
POST
/
unsubscribes
JavaScript
import Moonbase from '@moonbaseai/sdk';

const client = new Moonbase({
  apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});

const unsubscribe = await client.unsubscribes.create({ email: 'yoda@moonbase.ai' });

console.log(unsubscribe.created_at);
{
  "type": "unsubscribe",
  "email": "yoda@moonbase.ai",
  "created_at": "2025-02-17T16:00:00.000Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.moonbase.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Body

application/json

The email for the unsubscribe.

email
string
required

Response

Successful response.

A record of an unsubscribed email address.

type
string
required
Allowed value: "unsubscribe"
email
string<email>
required
created_at
string<date-time>
required