{"tools":[{"type":"function","function":{"name":"auth","description":"Sign up or sign in to email59. Pass email to have a 6-digit code emailed, then call again with email and otp to get a session key (a new email is signed up with 200 free emails a day). Or pass api_key to swap an API key for a session key. Send the key as the HTTP header 'Authorization: Bearer <session_key>'.","parameters":{"type":"object","properties":{"email":{"type":"string","description":"Email address."},"otp":{"type":"string","description":"The 6-digit code from the email."},"api_key":{"type":"string","description":"An e59_live_ API key, instead of email."}}}}},{"type":"function","function":{"name":"get_pricing","description":"Free daily emails (renewed every day), email credits per dollar, and the packs on sale. No sign-in needed.","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"get_account","description":"The signed-in account: email, daily_limit, sent_today, remaining_today, credits_remaining, resets_at.","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"update_account","description":"Set the name, company or brand (the look of every email the account sends) on the account.","parameters":{"type":"object","properties":{"name":{"type":"string"},"company":{"type":"string"},"brand":{"type":"object","description":"name (header band), color (#rrggbb), logo_url and url (https), address (footer line). An empty name clears it.","properties":{"name":{"type":"string"},"color":{"type":"string"},"logo_url":{"type":"string"},"url":{"type":"string"},"address":{"type":"string"}}}}}}},{"type":"function","function":{"name":"send_email","description":"Send one transactional email (receipt, code, alert, notice) to one recipient. No promotions or newsletters; from your own kid-safe mailbox also no bad language or sexual content and English text only. Otherwise it is refused with content_not_allowed and uses no allowance. Every send is read before it goes out: sexual content, phishing or pure marketing is refused with content_refused, sends must be a few seconds apart (sending_too_fast), and either pauses sending for 3 minutes (sending_paused). It goes out as HTML in a branded template with a text part; give text, html or both. Uses 1 email of today's allowance. Many recipients at once: send_campaign.","parameters":{"type":"object","properties":{"from":{"type":"string","description":"Name before the @ (e.g. hello). The domain is always email59.com. Optional."},"to":{"type":"string","description":"Recipient address."},"subject":{"type":"string"},"text":{"type":"string","description":"Plain-text body. Give text, html or both."},"html":{"type":"string","description":"HTML body."},"reply_to":{"type":"string","description":"Optional. One address of your own (not at email59.com) where answers should go. Without it the email says replies are not received."},"category":{"type":"string","enum":["transactional","marketing"],"description":"Default transactional. marketing is closed (marketing_not_allowed)."},"list_id":{"type":"string","description":"Marketing only: your name for the audience."},"template":{"type":"string","enum":["basic","code","notice","report","letter"],"description":"Layout. basic (default), code (one-time code, give code), notice (heading and one button), report (wide tables), letter (personal)."},"heading":{"type":"string"},"preheader":{"type":"string","description":"Preview text shown after the subject."},"button_text":{"type":"string"},"button_url":{"type":"string"},"code":{"type":"string","description":"The code for template code."},"brand":{"type":"object","description":"This email's look; the account's brand otherwise.","properties":{"name":{"type":"string"},"color":{"type":"string"},"logo_url":{"type":"string"},"url":{"type":"string"},"address":{"type":"string"}}}},"required":["to","subject"]}}},{"type":"function","function":{"name":"send_campaign","description":"Closed: email59 carries no marketing email, so this answers marketing_not_allowed. Marketing email to up to 1,000 recipients; the unsubscribe link is added for you. Invalid, role, blocked or unsubscribed recipients are skipped and cost nothing; each accepted recipient uses 1 email of today's allowance. A campaign that doesn't fit what's left today is refused whole.","parameters":{"type":"object","properties":{"from":{"type":"string","description":"Name before the @ (e.g. hello). The domain is always email59.com. Optional."},"subject":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"list_id":{"type":"string","description":"Your name for this audience, used for unsubscribes."},"recipients":{"type":"array","items":{"type":"string"},"description":"Recipient addresses (max 1,000)."}},"required":["subject","recipients"]}}},{"type":"function","function":{"name":"check_email","description":"Free deep check of an email address, no sign-in needed: format, provider username rules, disposable and role addresses, and the domain's MX, SPF, DMARC, DKIM, MTA-STS, TLS-RPT and BIMI records. Returns a report with a score (0-99, likelihood the address is real) and a verdict (likely_valid, risky, likely_invalid, unknown). Gmail, Outlook and other big providers skip DNS. No email is sent.","parameters":{"type":"object","properties":{"email":{"type":"string","description":"Email address."}},"required":["email"]}}},{"type":"function","function":{"name":"check_list","description":"List check for a mailing list: up to 1,000 different addresses a call, as emails or the text of a CSV (the column headed email). One status each: valid, risky, role, disposable, no_mx or invalid, with a reason, plus counts per status. Format, provider rules and one MX lookup per domain; no email is sent. Daily limit per account; the answer's quota shows what is left today.","parameters":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"},"description":"Addresses to check."},"csv":{"type":"string","description":"Or a CSV file's text with an email column."}}}}},{"type":"function","function":{"name":"validate_email","description":"Check an address before sending. Verdicts: ok, invalid, no_mx, disposable, role.","parameters":{"type":"object","properties":{"email":{"type":"string","description":"Email address."}},"required":["email"]}}},{"type":"function","function":{"name":"block","description":"Block an email address or a whole domain for this account. Sends to it are refused.","parameters":{"type":"object","properties":{"kind":{"type":"string","enum":["email","domain"]},"value":{"type":"string","description":"The address or domain."},"reason":{"type":"string"}},"required":["kind","value"]}}},{"type":"function","function":{"name":"unblock","description":"Remove an email address or domain from the blocklist.","parameters":{"type":"object","properties":{"kind":{"type":"string","enum":["email","domain"]},"value":{"type":"string"}},"required":["kind","value"]}}},{"type":"function","function":{"name":"list_blocklist","description":"The account's blocked addresses and domains.","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"add_unsubscribe","description":"Record an opt-out. Campaigns to that list (or every list, if list_id is empty) skip the address.","parameters":{"type":"object","properties":{"email":{"type":"string","description":"Email address."},"list_id":{"type":"string","description":"Empty = every list."}},"required":["email"]}}},{"type":"function","function":{"name":"buy_pack","description":"Start buying a pack (pack_5 = $5, pack_10 = $10, pack_50 = $50; each $1 adds 3,636 email credits, which don't renew and last until used, plus a purchase fee of 5% or at least $0.50 at checkout; GET /v1/pricing has the totals). Returns a checkout_url for a person to pay; the credits arrive once the payment clears. First show the person the refund policy and terms from GET /v1/policy; pass agree=true and its version only after they agree.","parameters":{"type":"object","properties":{"pack_id":{"type":"string"},"agree":{"type":"boolean","description":"The person agreed to the refund policy and terms (GET /v1/policy)"},"policy_version":{"type":"string","description":"version from GET /v1/policy"}},"required":["pack_id","agree","policy_version"]}}},{"type":"function","function":{"name":"order_status","description":"Status of an order from buy_pack: pending or paid.","parameters":{"type":"object","properties":{"order_id":{"type":"integer"}},"required":["order_id"]}}},{"type":"function","function":{"name":"create_api_key","description":"Create a long-lived API key (max 10 per account). It is shown only once. mode 'test' makes an e59_test_ key for staging and CI: its sends are accepted and stored, never delivered, and use no allowance.","parameters":{"type":"object","properties":{"label":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"Default live."}}}}},{"type":"function","function":{"name":"list_test_messages","description":"Emails sent with a test key (e59_test_...), newest first: accepted, stored, never delivered. Pass id for one email with its html and text (a verify_start code is in there), or to to filter by recipient.","parameters":{"type":"object","properties":{"id":{"type":"string","description":"A test email id (test_...). Optional."},"to":{"type":"string","description":"Only emails to this address. Optional."},"limit":{"type":"integer","description":"Default 50, at most 100."}}}}},{"type":"function","function":{"name":"list_api_keys","description":"The account's API keys (ids and labels, never the keys themselves).","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"verify_start","description":"Email a one-time verification code to an address (sign-up, sign-in, confirming an email). email59 makes the code, sends it, limits resends and expires it; the code is never returned to you. Returns an id. Uses 1 email of today's allowance. A new code to the same address replaces the one waiting there. Then call verify_check with what the person typed.","parameters":{"type":"object","properties":{"to":{"type":"string","description":"The address to verify."},"app_name":{"type":"string","description":"Your app's name, shown in the subject and body. Optional."},"from":{"type":"string","description":"Name before the @; the domain is always email59.com. Default verify."},"code_length":{"type":"integer","description":"Digits in the code, 4 to 10. Default 6."},"expires_in":{"type":"integer","description":"Seconds the code works, 60 to 3600. Default 600."}},"required":["to"]}}},{"type":"function","function":{"name":"verify_check","description":"Check a code from verify_start. Give to (checks the newest code sent there) or id, and code. Returns valid true or false and a status: approved, wrong_code, expired, too_many_attempts (5 wrong codes lock it), already_used, replaced or not_found. A right code works once. Uses no allowance.","parameters":{"type":"object","properties":{"to":{"type":"string","description":"The address the code was sent to."},"id":{"type":"string","description":"Or the id from verify_start."},"code":{"type":"string","description":"The code the person typed."}},"required":["code"]}}}]}