import { ChatATPClient } from "@chatatp/studio";
const client = new ChatATPClient({ apiKey: "chatatp_sk_..." });
const automation = await client.automations.create(7, {
name: "Daily follow-up",
prompt_text: "Review unresolved conversations and follow up.",
schedule_type: "daily",
schedule_config: { time: "09:00" },
timezone: "UTC",
});
const current = await client.automations.retrieve(automation.id);
await client.automations.pause(automation.id);
await client.automations.resume(automation.id);
await client.automations.runNow(automation.id);
const runs = await client.automations.runs(automation.id);
await client.automations.delete(automation.id);