Skip to content

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

Package listing

@kody/intercom

src/create-article.ts

11 lines · 466 B · TypeScript
import { createArticle, parseCreateArticle } from './articles.ts'

/**
 * Create an Intercom article. Requires `confirm: true`, or use `dryRun: true`.
 * @example
 * import createArticle from 'kody:@kody/intercom/create-article'
 * const preview = await createArticle({ title: 'Reset your password', dryRun: true })
 */
export default async function createArticleEntrypoint(params: Record<string, unknown> = {}) {
	return createArticle(parseCreateArticle(params))
}