Skip to content

Managing Contact Methods

Contact methods are created and managed through the beeps web UI at Settings > Profile. Your signup email is automatically added as a verified contact method.

The SDK and API provide read and delete access for programmatic management.

const result = await client.contactMethod.create({
transport: "sms",
value: "+15555550100",
});

Or via the API:

POST /v0/contact-methods
{ "transport": "sms", "value": "+15555550100" }

userId is optional everywhere on this page — it defaults to the user who created the access token, which is what you want when managing your own contact methods (beeps contact-method add in the CLI). Creating an SMS method sends the verification text automatically; reply YES to verify. Re-send it with client.contactMethod.sendVerification(id) or POST /v0/contact-methods/:id/send-verification.

const methods = await client.contactMethod.list({
userId: "usr_alice",
});
console.log(`Found ${methods.length} contact methods`);
methods.forEach((method) => {
console.log(`- ${method.transport}: ${method.value}`);
console.log(` Verified: ${method.verified}`);
});
const methods = await client.contactMethod.list({
userId: "usr_alice",
});
const emailMethods = methods.filter((m) => m.transport === "email");
const smsMethods = methods.filter((m) => m.transport === "sms");
console.log(`Emails: ${emailMethods.length}`);
console.log(`SMS: ${smsMethods.length}`);
const result = await client.contactMethod.delete("cm_abc123", {
userId: "usr_alice",
});
console.log("Deleted successfully:", result.success);
const result = await client.contactMethod.deleteSafe("cm_abc123", {
userId: "usr_alice",
});
if (result.error) {
console.error("Failed to delete:", result.error.message);
} else {
console.log("Deleted:", result.data.success);
}
type ContactMethod = {
id: string;
userId: string;
transport: string;
value: string;
verified: boolean;
createdAt: string;
updatedAt: string;
deletedAt: string | null;
};
type ListContactMethodsParams = {
userId: string;
};
type DeleteContactMethodParams = {
userId: string;
};

No one receiving notifications? See Troubleshooting - No One Is Notified.