Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/intercom

src/create-contact.ts

11 lines · 462 B · TypeScript
import { createContact, parseCreateContact } from './contacts.ts'

/**
 * Create an Intercom contact. Requires `confirm: true`, or use `dryRun: true`.
 * @example
 * import createContact from 'kody:@kody/intercom/create-contact'
 * const preview = await createContact({ email: 'pat@example.com', dryRun: true })
 */
export default async function createContactEntrypoint(params: Record<string, unknown> = {}) {
	return createContact(parseCreateContact(params))
}