← Email Sequence Builder
Your token

Email Sequence Builder API

Planning a sequence, the template drafts, the checks and the Markdown, CSV and calendar downloads all run free in the browser and need no API. The API is for the one metered step: send the planned sequence and your notes about the product, and get every email back written in your voice.

Base URL: https://api.skillsafe.ai/v1/app-api. Every response is {"data": ...} or {"error": {"code", "message"}}; read error.code and error.message rather than the HTTP status alone.

The task field

Send "task" first. This app has one job:

taskWhat it doesReply
writeWrites every email in sequence.emails, one per entry with the same n and in the same order, from your notes only. Facts it does not have stay as [bracketed] placeholders; it adds no figures, customers, deadlines or urgency that your notes do not give.{"task":"write","summary","emails":[{"n","subject","preview","body","cta"}],"warnings":[...],"questions":[...]}

Input fields

FieldTypeMeaning
taskstring"write". Required.
productstringWhat the emails are about. Required.
actionstringThe one action the sequence asks for, as a verb phrase. Required.
factsstringYour notes: what it does, who it is for, results or quotes you may use, your offer and any real deadline. The page sends at most 5,000 characters, keeping the start and the end. Required.
sequencestringJSON text: label, trigger, goal, exit and emails, each {"n","name","day","kind","words","cta","segment"}. Required.
audiencestringWho receives the emails, or "".
senderstringThe name to sign with; "[Your name]" if you have none yet.
voicestringA sample of your own writing to match its tone, or "".

The reply

job.output.output is JSON text in the shape above. Each body starts with Hi {first_name},; the page swaps in your email tool's merge tag. The page puts each email back in the slot with the same n, ignores numbers it did not plan, keeps the template for any email that is missing, and checks every email again: subject and preview length, a preview that repeats the subject, web addresses in the body, and figures or urgency your notes do not support. If the balance ran low, truncated is true and the object may stop early; the emails that arrived whole are kept.

Worked examples

task: write - a welcome sequence for an invoicing app

Input (input.json):

{
  "task": "write",
  "product": "Tallybird",
  "action": "send your first invoice",
  "audience": "freelance designers",
  "sender": "Maya",
  "facts": "Tallybird is invoicing for freelancers. You make an invoice from a template, send it by email, and Tallybird chases late payments with polite reminders on its own.\nFree for up to 3 clients. Pro is $9 a month for unlimited clients, and new accounts get Pro free for 14 days with no card needed.\nQuote we may use: \"I stopped chasing invoices by hand.\" - Priya Nair, illustrator (she said yes).\nMost useful feature people miss: recurring invoices for retainer clients.",
  "voice": "Hey, Maya here. I built Tallybird after a year of chasing my own late invoices. Short emails, no fluff, promise.",
  "sequence": "{\"label\":\"Welcome sequence (after signup)\",\"trigger\":\"Someone signs up for Tallybird\",\"goal\":\"Send your first invoice\",\"exit\":[\"Goal reached: stop this sequence and move them to onboarding\",\"They unsubscribe\",\"They join a sequence that sends more often\"],\"emails\":[{\"n\":1,\"name\":\"Welcome\",\"day\":0,\"kind\":\"transactional\",\"words\":\"up to 125\",\"cta\":\"Send your first invoice\",\"segment\":\"\"},{\"n\":2,\"name\":\"Quick win\",\"day\":1,\"kind\":\"educational\",\"words\":\"up to 300\",\"cta\":\"Send your first invoice\",\"segment\":\"\"},{\"n\":3,\"name\":\"Story: why we built it\",\"day\":3,\"kind\":\"story\",\"words\":\"up to 500\",\"cta\":\"Send your first invoice\",\"segment\":\"\"},{\"n\":4,\"name\":\"Social proof\",\"day\":5,\"kind\":\"story\",\"words\":\"up to 500\",\"cta\":\"Send your first invoice\",\"segment\":\"\"},{\"n\":5,\"name\":\"Overcome an objection\",\"day\":7,\"kind\":\"educational\",\"words\":\"up to 300\",\"cta\":\"Send your first invoice\",\"segment\":\"\"},{\"n\":6,\"name\":\"Core feature\",\"day\":9,\"kind\":\"educational\",\"words\":\"up to 300\",\"cta\":\"Try [feature]\",\"segment\":\"\"},{\"n\":7,\"name\":\"Conversion\",\"day\":12,\"kind\":\"transactional\",\"words\":\"up to 125\",\"cta\":\"Send your first invoice\",\"segment\":\"\"}]}"
}

Reply:

{
  "task": "write",
  "summary": "Seven welcome emails for Tallybird that move freelance designers to send their first invoice, using your quote and plan details.",
  "emails": [
    {
      "n": 1,
      "subject": "Welcome to Tallybird: your account is ready",
      "preview": "Make an invoice from a template, send it by email, and let polite reminders handle late payments for you.",
      "body": "Hi {first_name},\n\nHey, Maya here. Thanks for signing up for Tallybird.\n\nThe next step is to send your first invoice. Pick a template, add your client, and send it by email.\n\nTallybird chases late payments with polite reminders on its own, so you do not have to.\n\nTalk soon,\nMaya",
      "cta": "Send your first invoice"
    },
    {
      "n": 2,
      "subject": "A quick win: send your first invoice from a template",
      "preview": "Choose a layout, add the client, and email it off. Tallybird takes over from there, including the awkward reminder emails.",
      "body": "Hi {first_name},\n\nThe fastest way to see Tallybird work is to send a real invoice to a client you already have.\n\nHere are three steps:\n\n1. Pick an invoice template.\n2. Add your client and what you charged.\n3. Send it by email.\n\nAfter that, Tallybird chases late payments with polite reminders on its own. You can get back to design work.\n\nIt is free for up to 3 clients, so you can start with the clients you have today.\n\nSpeak soon,\nMaya",
      "cta": "Send your first invoice"
    },
    {
      "n": 3,
      "subject": "Why I built Tallybird after chasing late invoices",
      "preview": "Writing awkward follow-up emails to clients got old fast, so the reminders became something the tool does on its own.",
      "body": "Hi {first_name},\n\nHey, Maya here. I built Tallybird after chasing my own late invoices.\n\n[A short moment from that time that you are happy to share.]\n\nI wanted invoices to go out from a template, and the polite reminders to happen on their own. That is what Tallybird does now.\n\nIf you freelance as a designer, you probably know the feeling. Send your first invoice and let the reminders do the chasing.\n\nTalk soon,\nMaya",
      "cta": "Send your first invoice"
    },
    {
      "n": 4,
      "subject": "What illustrator Priya Nair says about Tallybird",
      "preview": "She agreed to let me share her words. They are short, and they cover not chasing late payments by hand any more.",
      "body": "Hi {first_name},\n\nPriya Nair is an illustrator who uses Tallybird. She said:\n\n\"I stopped chasing invoices by hand.\"\n\nThat is what the polite reminders are for. Tallybird sends them on its own, so you can get on with your design work.\n\n[What Priya's invoicing used to look like, only if she is happy for you to share it.]\n\nSend your first invoice and see how the reminders work for you.\n\nTalk soon,\nMaya",
      "cta": "Send your first invoice"
    },
    {
      "n": 5,
      "subject": "Not sure yet? Tallybird is free for up to 3 clients",
      "preview": "New accounts get 14 days of Pro, no card needed, so you can try the whole thing without any commitment.",
      "body": "Hi {first_name},\n\nIf you are holding off, I get it. Nobody needs another tool they have to pay for before it proves itself.\n\nTallybird is free for up to 3 clients, so you can send your first invoices without paying anything.\n\nIf you want more room later, Pro is $9 a month for unlimited clients. New accounts get Pro free for 14 days with no card needed.\n\nSend your first invoice and see if it saves you the chasing.\n\nTalk soon,\nMaya",
      "cta": "Send your first invoice"
    },
    {
      "n": 6,
      "subject": "The feature most people miss: recurring invoices",
      "preview": "If you have a retainer client, there is no need to rebuild that same invoice by hand every time it is due.",
      "body": "Hi {first_name},\n\nMost people miss this feature: recurring invoices for retainer clients.\n\nIf you have a client on a retainer, you can set the invoice up as recurring instead of building it again by hand.\n\nThat means less admin for you, and Tallybird's polite reminders still handle late payments on their own.\n\n[How often a recurring invoice can repeat, if you want to say.]\n\nSet up a recurring invoice for a retainer client and see how it feels.\n\nTalk soon,\nMaya",
      "cta": "Set up recurring invoices"
    },
    {
      "n": 7,
      "subject": "Ready to send your first Tallybird invoice?",
      "preview": "Pro is free for 14 days on new accounts with no card needed, so the polite reminders can prove themselves on a real client.",
      "body": "Hi {first_name},\n\nThis is the last email in this welcome series.\n\nIf you have not sent your first invoice yet, now is a good time. Make it from a template, email it, and let Tallybird chase late payments politely on its own.\n\nNew accounts get Pro free for 14 days with no card needed. [The date your Pro trial ends, if you want to mention it.]\n\nSend your first invoice and see how it goes.\n\nTalk soon,\nMaya",
      "cta": "Send your first invoice"
    }
  ],
  "warnings": [
    "Email 3 needs a short moment from your own story.",
    "Email 4 has an optional bracket about Priya; fill it only with her approval.",
    "Email 6 does not say whether recurring invoices are Pro only; check that.",
    "Email 7 has a bracket for your trial end date."
  ],
  "questions": [
    "Are recurring invoices part of the free plan or Pro only?",
    "How often can a recurring invoice repeat?"
  ]
}

task: write - failed payment recovery

Input:

{
  "task": "write",
  "product": "Stride Club",
  "action": "update your card",
  "audience": "members",
  "sender": "Jess, Stride Club support",
  "facts": "Stride Club is a running coaching app: a weekly training plan and a coach who answers questions in the app.\nMonthly membership. If a payment fails we try again on day 3 and day 7.\nOn day 10 the account is paused: the training plan stops updating, but run history and saved routes are kept for 90 days.\nMembers update their card under Account, then Billing.",
  "voice": "",
  "sequence": "{\"label\":\"Failed payment recovery\",\"trigger\":\"A payment for Stride Club fails\",\"goal\":\"Update your card\",\"exit\":[\"The payment goes through: stop at once\",\"They cancel: stop at once\",\"A support issue is open: pause\"],\"emails\":[{\"n\":1,\"name\":\"Friendly notice\",\"day\":0,\"kind\":\"transactional\",\"words\":\"up to 125\",\"cta\":\"Update your card\",\"segment\":\"\"},{\"n\":2,\"name\":\"Reminder\",\"day\":3,\"kind\":\"transactional\",\"words\":\"up to 125\",\"cta\":\"Update your card\",\"segment\":\"\"},{\"n\":3,\"name\":\"Urgent\",\"day\":7,\"kind\":\"transactional\",\"words\":\"up to 125\",\"cta\":\"Update your card\",\"segment\":\"\"},{\"n\":4,\"name\":\"Final notice\",\"day\":10,\"kind\":\"transactional\",\"words\":\"up to 125\",\"cta\":\"Update your card\",\"segment\":\"\"}]}"
}

Reply:

{
  "task": "write",
  "summary": "Four failed-payment emails for Stride Club members, from a friendly notice to the day 10 pause, each leading to a card update.",
  "emails": [
    {
      "n": 1,
      "subject": "Your Stride Club payment did not go through",
      "preview": "This is most likely an expired card. Updating it under Account, then Billing is quick, and the weekly plan keeps going.",
      "body": "Hi {first_name},\n\nWe could not take your latest Stride Club membership payment. It is usually an expired card or an old billing detail, and easy to fix.\n\nOpen the app, go to Account, then Billing, and enter your current card. We will try the payment again on day 3 and day 7.\n\nIf you have questions, ask them in the app.\n\nThanks,\nJess, Stride Club support",
      "cta": "Update your card"
    },
    {
      "n": 2,
      "subject": "Reminder: we could not process your Stride Club card",
      "preview": "Our retry today failed. Update the details under Account, then Billing and the weekly plan carries on.",
      "body": "Hi {first_name},\n\nWe tried your Stride Club membership payment again today and it did not go through. These things happen, and a card that has expired is the usual reason.\n\nTo fix it, go to Account, then Billing, and add your current card.\n\nThanks,\nJess, Stride Club support",
      "cta": "Update your card"
    },
    {
      "n": 3,
      "subject": "Action needed on your Stride Club billing this week",
      "preview": "The latest retry failed. Unless the card details change, the account is paused on day 10 and the plan stops updating.",
      "body": "Hi {first_name},\n\nThe latest attempt to take your Stride Club membership payment failed. We will pause your account on day 10 if the payment still has not gone through.\n\nA pause means your training plan stops updating. Your run history and saved routes are kept for 90 days.\n\nYou can avoid it by going to Account, then Billing, and updating your card.\n\nThanks,\nJess, Stride Club support",
      "cta": "Update your card"
    },
    {
      "n": 4,
      "subject": "Your Stride Club membership is paused, run history is kept",
      "preview": "The training plan has stopped updating. Saved routes stay for 90 days, and the card can be updated under Account, then Billing.",
      "body": "Hi {first_name},\n\nWe could not take your Stride Club membership payment, so your account is now paused. This is the last email about it.\n\nYour training plan has stopped updating. Your run history and saved routes are kept for 90 days.\n\nWhen you are ready, go to Account, then Billing, and update your card.\n\nThanks,\nJess, Stride Club support",
      "cta": "Update your card"
    }
  ],
  "warnings": [
    "Check that the app really pauses the account on day 10 and that the card update fixes it.",
    "Confirm that replies and in-app questions reach support before you send."
  ],
  "questions": [
    "Does updating the card reactivate a paused account straight away?"
  ]
}

On the page, every written email lands in the plan with its send day and is checked again.

Errors

HTTPWhat to do
401The token is missing, expired or a guest token on a run. Get a personal token on the token page.
402The balance is below what the run reserves. Top up at skillsafe.ai/account/billing.
400The body is not a JSON object of the fields above.
429Wait and retry with the same Idempotency-Key.

Step 1 — a tiny client helper

One function that sends JSON and unwraps the {data, error} envelope.

BASE="https://api.skillsafe.ai/v1/app-api"
TOKEN="paste-your-token-here"   # from https://email-sequence-builder.skillsafe.ai/tokens.html
api() { # api METHOD PATH [JSON-BODY]
  curl -s -X "$1" "$BASE$2" -H "Content-Type: application/json" \
    ${TOKEN:+-H "Authorization: Bearer $TOKEN"} ${3:+--data "$3"}
}

Step 2 — a token

A guest token is enough for /me and /estimate. A run is metered, so it needs your personal token: sign in on the token page and copy it.

# a guest token (enough for /me and /estimate); a run needs your personal token from /tokens.html
TOKEN=$(curl -s -X POST "$BASE/guest" -H "Content-Type: application/json" -d '{"slug":"email-sequence-builder"}' | jq -r '.data.token')

Step 3 — who am I, and my balance

subject_type is guest or user; credits is the balance (1 credit = $0.0001).

api GET /me | jq '.data | {subject_type, credits}' 

Step 4 — price a run for free

/estimate charges nothing and starts no job. hold_credits is the amount reserved while a run is in flight, not the price; the run is charged what it uses.

# input.json: the run input object - {"task": "write", "product": "Tallybird", "action": "send your first invoice", "sender": "Maya", "facts": "Tallybird is invoicing for freelancers ...", "sequence": "{...}"}
api POST /estimate "$(cat input.json)" | jq '.data | {hold_credits, min_credits, model, model_alias, markup_bps, warnings}' 

Step 5 — run it and wait for the job

Send an Idempotency-Key derived from the input: a retry with the same key is never billed twice.

KEY="email-sequence-builder:write:$(shasum -a 256 input.json | cut -c1-16):a1"
JOB=$(curl -s -X POST "$BASE/run" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $KEY" --data @input.json | jq -r '.data.job_id')
while :; do
  J=$(api GET "/jobs/$JOB"); S=$(echo "$J" | jq -r '.data.status')
  case "$S" in succeeded|failed|cancelled) break;; esac; sleep 2
done
echo "$J" | jq -r '.data.output.output' > reply.json   # one JSON object: task, summary, emails, warnings, questions
echo "$J" | jq '.data | {charged_credits, truncated}' 

Step 6 — or stream it

/run-stream sends Server-Sent Events while the job runs and the finished job at the end.

# Server-Sent Events: tick/delta events while the job runs, then a final event with the job
curl -N -s -X POST "$BASE/run-stream" -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: email-sequence-builder:write:$(shasum -a 256 input.json | cut -c1-16):a1" --data @input.json