- Brand
- Apsis
- Category
- Marketing
- Primary Subcategory
- Email & SMS Lifecycle Marketing Automation
Integration details
Description
Apsis InVega turns ChatGPT into your marketing assistant. It connects ChatGPT to your Apsis data and marketing workflows, enabling you to analyse, create, personalise and execute campaigns directly from a conversation. Apsis InVega does the heavy lifting so you can focus on the marketing strategy and creativity. What you can have ChatGPT do with Apsis InVega - Create and send emails at scale - Analyse data across campaigns and combine with other data to uncover actionable insights - Find and build audiences through segmentation - Increase relevance with personalisation from insights obtained directly from your data - Measure and follow campaign performance and extract profiles to act on - Let ChatGPT do repetitive tasks to free your time Apsis InVega works with the Apsis One accounts you can already access, with your own permissions. Sending an email and deleting a contact ask for your confirmation first. An Apsis InVega account, provided by Apsis, is required.
- Integration type
- Plugin
- Verification status
- Not applicable
- Platform
- ChatGPT
- Primary Subcategory
- Email & SMS Lifecycle Marketing Automation
- Secondary Subcategories
- None listed
- Brand
- Apsis
- Access
- Account required
- First tracked
- 2026-12-05
- Tool count
- 69
- Market
- US
The Primary Subcategory used for this profile’s headline score.
Other Subcategories where the Integration is listed.
Not discoverable in ChatGPT yet
ChatGPT now suggests Plugins on its own when they match a user's request, but not every Plugin is being surfaced yet.We haven’t seen Apsis InVega suggested yet. Sign up and we’ll track it, and your Discoverability Score will appear here once ChatGPT starts surfacing it.
What discovery looks like

Get alerts for Apsis InVega
Get updates when Apsis InVega’s Discoverability Score or category rank changes.
Competing in ChatGPT Email & SMS Lifecycle Marketing Automation
View Category69 tools agents can invoke
In development: may change. Change the status of one Marketing Automation flow: pass `account` (from list_accounts), `section` (from list_sections; omit it and a sole section is used), the `flowId` from list_flows and an `action`. `activate` starts a draft, failed or stopped flow; `resume` restarts a paused one; `pause` stops everyone already inside where they are, and new profiles still enter the first step and wait there until the flow is resumed; `stop` ends entry, and people already inside stay where they are and stop moving on. A stopped flow needs `profiles`, which is the user's choice: `keep` leaves the profiles that went through it where they are, `remove` removes them from the flow; `profiles` is refused for any other move. `activate` and `resume` first run the flow's validation and are refused with the reasons when it fails, or when Marketing Automation's own check could not run. Where flow previews are on, `activate` and `resume` also need the `gateToken` preview_flow returned for this flow, on both calls. The agent makes the preview itself; the user only opens it. A flow changed since that preview, or a token over 1 hour old, is refused and needs a new preview. An account may have a limited number of flows built here live at once (active, activating, paused, pausing and stopping ones count; a flow frees its slot once it is stopped, pausing does not; draft, failed and stopped flows hold none); activating one more is refused with the list. A call without `confirm` writes nothing and returns what would change with a `confirmToken`; the same call with `confirm:true` and that token makes the change. A confirming call that returns `confirmed:"unknown"` means Marketing Automation hasn't confirmed the change yet; `get_flow` shows the status. A confirmToken is bound to the flow's status and last-update time and is not single-use otherwise. The account needs the Marketing Automation licence.
set_flow_status
Create a new custom profile attribute (a field on the profile) in a section. Reach for it when an import column has no attribute to map onto and the user wants to keep that column — without it the only option is dropping the column. Pass `account` and `section` (ids from list_accounts / describe_import_target), the `name` the user would recognise, and a `type`. It takes two calls. The first, without `confirm`, runs the near-duplicate check and writes nothing: it returns `{ confirmed:false, willCreate:{ name, type, section, typeIsFixed, folder, similarExisting? }, confirmToken, note }`, where `note` is written for the user and says what confirming would do and that nothing has been created yet. The second, with `confirm:true` and that `confirmToken`, creates the attribute. The token is bound to the account, the section and the exact inputs, `createAnyway` included, and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and creates nothing, and it repeats the near-duplicate check against the section as it is by then. A repeat confirming call with the same token is checked against the section again: what the first one created is by then a near-duplicate, so it is refused unless `createAnyway` was set, in which case it creates another one. A call from a client that does not know about `confirm` gets the first-call answer and creates nothing. This is close to irreversible: an attribute cannot be deleted, and hiding it later does not take effect in the Apsis One interface for at least an hour. Once created, its `type` is fixed, so a type that was inferred rather than given by the user is permanently what the section has. The display name is not: rename_attribute changes it, and renaming again changes it back. On a confirming call you get `{ created:true, attributeVersionId, name, type, discriminator, importReady, folder, note }`, where `folder` is the folder the attribute was filed in ("Custom Attributes"). That `attributeVersionId` maps directly into create_import's `attributeMappings` — describe_import_target does not need to look it up first, because it can take up to an hour to list a newly created attribute, and the attribute is already permitted for import. `{ created:false, reason:"similar-exists", candidates }` is a normal answer, not an error, and carries no token: an attribute that means the same thing already exists (names differing only in case, spaces, dots, dashes or underscores are treated as the same field). Mapping one of the `candidates` by its `attributeVersionId` avoids adding permanent clutter for everyone in the account; `createAnyway: true` makes the first call describe the create anyway, for a genuinely separate field, and the flag is part of what the token is bound to. `{ created:false, reason:"custom-folder-missing" }` is also a normal answer, carries no token and creates nothing: the account has no Custom Attributes folder to file the attribute in, which is a platform set-up problem that Apsis support can repair. The `type` follows what the data is, not what the file looks like: `string` for text (and for a CSV column of uncertain type), `integer`/`double` for numbers that may need comparing or sorting, `boolean` for yes/no, `One.instant` for a point in time, `One.legacy_date` for a plain calendar date. The type cannot be changed afterwards, which matters if the field may ever need segmenting on numerically or by date rather than as `string`. The confirming call's `note` carries the mapping instruction, the permanence warning, and a heads-up when the section is accumulating a lot of custom attributes.
create_attribute
Create a subscription — a thing people can opt in to, and the audience a campaign is sent to. Reach for it when the user wants to start collecting consent for something new. Pass `account` and `section`, the `name` the user would recognise, and the `folderId` it should be filed in (from list_subscriptions; create one first with create_subscription_folder if the section has none). The folder is fixed at creation: a subscription can never be moved to a different folder afterward, so the only fix for a mis-filed one is to hide it and start its consent collection over from zero. Creating a subscription at the top level is refused — it has to go in a folder. A `folderId` that was inferred rather than given by the user is permanently where the subscription lives, and an inferred `name` stays until rename_subscription changes it, which keeps the id and the consent. It takes two calls. The first, without `confirm`, reads the section's folders, runs the limit and near-duplicate checks and writes nothing: it returns `{ confirmed:false, willCreate:{ name, folder, folderId, folderIsFixed, similarExisting? }, confirmToken, note }`, where `note` is written for the user and says that nothing has been created yet. The second, with `confirm:true` and that `confirmToken`, creates the subscription. The token is bound to the account, the section and the exact inputs, `createAnyway` included, and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and creates nothing, and it repeats the checks against the section as it is by then. A repeat confirming call with the same token is checked against the section again: what the first one created is by then a near-duplicate, so it is refused unless `createAnyway` was set, in which case it creates another one. A call from a client that does not know about `confirm` gets the first-call answer and creates nothing. On a confirming call you get `{ created:true, subscriptionId, name, folder, discriminator, emailConsentAttributeId?, note }`. That `subscriptionId` is usable straight away — pass it to create_import's `subscriptions` to subscribe imported profiles, or to send_email_activity as the audience, with no need to call describe_import_target or describe_email_send first to find it. Nobody is subscribed yet, so a send to it right after creation reaches nobody. `{ created:false, reason:"similar-exists", candidates }` is a normal answer, not an error, and carries no token: a subscription in that same folder already means the same thing (names differing only in case, spaces, dots, dashes or underscores count as the same), so the existing `subscriptionId` is usually what was meant — consent collected against the wrong one of two look-alikes is a data problem, not a cosmetic one. `createAnyway: true` makes the first call describe a separate one regardless, once the user has seen the existing name and confirmed they want a separate subscription, and the flag is part of what the token is bound to. `note` on each of those results is written for the user. If the section is at or past its limit of 10 subscriptions (a section built in the Apsis One interface can hold many more), the call comes back as an error rather than a result, so there is no `note` — the error text itself is written for the user and names the two things that help: using one of the existing subscriptions, or hiding enough to get back under the limit, with how many that would be. It is a fixed limit, so retrying does not change the outcome.
create_subscription
Create a folder to file subscriptions in. Reach for it when the user wants to group what they collect consent against, or when there is no folder yet to put a new subscription in. Pass `account`, `section` and the `name`. Folders cannot be deleted, only hidden. Folders do not nest: every folder sits at the section's top level, so there is no parent to choose. It takes two calls. The first, without `confirm`, reads the section's folders, runs the limit and near-duplicate checks and writes nothing: it returns `{ confirmed:false, willCreate:{ name, level, similarExisting? }, confirmToken, note }`, where `note` is written for the user and says that nothing has been created yet. The second, with `confirm:true` and that `confirmToken`, creates the folder. The token is bound to the account, the section and the exact inputs, `createAnyway` included, and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and creates nothing, and it repeats the checks against the section as it is by then. A repeat confirming call with the same token is checked against the section again: what the first one created is by then a near-duplicate, so it is refused unless `createAnyway` was set, in which case it creates another one. A call from a client that does not know about `confirm` gets the first-call answer and creates nothing. On a confirming call you get `{ created:true, folderId, name, note }` — pass that `folderId` straight to create_subscription. `{ created:false, reason:"similar-exists", candidates }` carries no token and means a folder with a name that close already exists, which is usually what was meant; `createAnyway: true` makes the first call describe a separate one if the user confirms they want both, and the flag is part of what the token is bound to. A section can hold 10 folders. At the limit the call is refused and nothing is created — a fixed limit, so retrying does not change the outcome; the refusal text names what helps.
create_subscription_folder
Stop an import that is still running. Pass the `section` and `account` it belongs to (both are on every list_imports row and echoed by create_import), plus its `importId`. It takes two calls. The first, without `confirm`, reads the import's status and writes nothing: for a running import it returns `{ confirmed:false, willCancel:{ importId, section, importStatus, counts }, confirmToken, note }`, where `note` is written for the user and says that nothing has been cancelled yet. That read carries no file name; list_imports rows do. The second, with `confirm:true` and that `confirmToken`, cancels. The token is bound to the account, the section and the exact inputs and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and cancels nothing. A call from a client that does not know about `confirm` gets the first-call answer and cancels nothing. This is not an undo: cancelling stops the remaining rows, every profile already imported stays imported, and the import cannot be resumed — finishing the file needs a new import. A confirming call's `note` states what actually happened and `counts` says what had already landed. For an import that is already cancelled, finished, failed or expired, the first call reports it without a token, with nothing changed; a confirming call still needs a valid token, and once verified reports the same — `status:"cancelled", alreadyCancelled:true` for a cancelled one, and `status:"not_cancelled"` with a `reason` (`already_finished`, `already_failed` or `already_expired`) and its counts for one that finished, failed or expired, rather than a retry target. If the id is unknown in that section, list_imports finds the right one.
cancel_import
Calls off a send that is booked and has not gone out, returning the email to a draft. Takes `activityId` from list_email_activities and the account it lives in (`account` is optional — omit only if the user has a single account). An automated email (`type: "automated_email"` in list_email_activities) has no send of its own: its flow sends it, and this tool refuses one. It takes two calls. The first, without `confirm`, writes nothing and returns `{ confirmed:false, willCancel:{ activityId, subject?, stateBefore, sendAt?:{ local, timezone }, audience:{ subscriptions:[{ subscriptionId, name }], segments? } }, note, account }`. `audience` is read from the email: subscription names come from the section's subscription listing and fall back to the id when that listing can't be read or doesn't include it, and `segments` is present only when the email carries a segment narrowing, with names where they could be resolved. `note` is written for the user and says what would be cancelled and that nothing has changed yet. The second, with `confirm:true`, cancels. Where `willCancel.sendAt` is present it also needs `sendAtLocal` and `sendAtTimezone`, the two values from it. The email is read again and the booked time recomputed, so a confirming call whose values are missing or differ from the booked time is refused with `{ activityId, cancelled:false, status:"confirmation_required", reason:"send_time_not_confirmed", note, willCancel }` and cancels nothing. An email with no booked time (its `sendType` is not a schedule) has no `sendAt`: `confirm:true` alone confirms it, and passing either field is refused. A call from a client that does not know about `confirm` gets the first-call answer and cancels nothing. The state is read afresh on the confirming call, so an email that has changed since the first call and can no longer be cancelled returns that outcome instead. Outcomes where nothing would be cancelled answer on the first call too, with no confirm step: an email that is already a draft comes back with `alreadyCancelled:true`, and a draft is never written, even one still carrying a leftover scheduled time, which stays recorded on the draft and which the `note` mentions, so calling again is harmless. It also cancels a `paused` or `unscheduled` email; `paused` usually means someone held it in Apsis One rather than that the assistant booked it. duplicate_email_activity is not an alternative route to the same outcome — duplicating a booked activity leaves the original booked, so the campaign would go out twice. A send that has already started (`queued`, `processing`, `exporting`, `sent`) is not an error: the result is `status:"not_cancelled"` with a `reason`, nothing changes, and a retry returns the same thing. The cancel window closes at the booked moment and the scheduler runs every 60 seconds, so a cancel inside the final minute is a race that can be lost. A confirming call returns { activityId, cancelled, status, alreadyCancelled?, reason?, reasonCode?, stateBefore?, stateAfter?, subject?, wasScheduledFor?, note, account }. `stateBefore` is what was cancelled and `stateAfter` is what the read-back saw: `scheduled` was a send booked through the assistant, `paused` was one held in Apsis One. On `status:"not_cancelled"`, `reasonCode` is the branchable form of `reason` — `"too-late"` (the send is already under way), `"not-cancellable"` (the activity is in a state a booked send cannot be cancelled from), or `"state-unreadable"` (the email's state could not be read at all, so it was left untouched rather than risk making a sent campaign sendable again). `note` is written for the user and states what actually happened, including where the read-back may not have caught up yet. After a cancel the email is a draft again: edit_email_activity accepts it, and it can be sent or booked for a new time, which is how rescheduling works — there is no reschedule tool.
cancel_scheduled_send
In development: may change. Changes a draft flow InVega made: its name, goal, entry limit, subscriptions or time zone, a step's title, and the settings of a trigger, wait, check, update or end step. Pass `flowId` (from list_flows) and `changes`, at most 40: `{flow: {name?, goal?, goalBy?, entryLimit?, subscriptions?, timeZone?}}` (one at most; `subscriptions` is the whole new set of subscriptions, all from one folder, and replaces the saved one; `subscription`, one id, is deprecated and still accepted) and `{node: <nodeId from get_flow>, title?, settings?}` (a step at most once; `settings` is the step or trigger as plan_flow's spec writes it). The change lines say "step N": that is the `step` get_flow shows next to the `nodeId`. A trigger's `constraints.times` of a step is how many times the event must happen before it counts; it is not the entry limit, which is the flow's `settings.profileLimit`. A first call changes nothing: it returns `changes` (each `target`, `field`, `before`, `after`), `validation` (`newProblems` refuse the change, `alreadyThere` are problems the flow had before), a `confirmToken` and, when the change is already true, `Nothing to change`. A second call with the same `changes`, `confirm: true` and that `confirmToken` saves them. Refused, with nothing saved: a flow that isn't in that section, wasn't made by InVega, was deleted or isn't a draft; `settings` on an api or tags trigger, or on an Email step (settings there are refused as "Steps can't be added, removed or rewired"; only the `title` of either can change); a time zone change without the trigger's schedule restated, or with no saved time zone for a schedule change; an email whose subscriptions couldn't be read, subscriptions on a flow with no email step, or subscriptions from two folders; an assistant-written goal not restated when the flow's behaviour changes; an email whose subscriptions differ from the flow's; and steps added, removed or rewired (a revised plan makes a new draft with plan_flow). The account needs the Marketing Automation licence.
edit_flow
Change an existing segment's name and/or its conditions (who it targets), in place — the segment keeps its identity and everything already using it keeps pointing at it. A conditions edit does mint a new version of the segment upstream, including when the conditions you send are identical to the ones stored, so repeating an edit is not free even though the result looks unchanged. Supply at least one of `name` or `aql`; a name-only rename leaves the conditions untouched, and vice-versa. A segment is a live filter, not a snapshot: it is re-evaluated at send time, so changing its conditions also changes who any email already using it will reach, including anything scheduled but not yet sent. That is normal and supported — it is how a marketer fixes or widens an audience for a send that hasn't gone out yet. Where the marketer instead wants a different audience for a new campaign, a separate segment leaves the existing one working for whatever already uses it. A rename changes nothing about who is targeted. Conditions are replaced in full, not edited in place: the conditions passed are the complete new audience. describe_segment returns the segment's current conditions as an AQLContainer, and describe_segment_target gives the attributes, events and operators for any condition added to it. An edit is a whole-audience replacement rather than a patch: what is sent replaces what is stored, and a condition left out of it is gone. The conditions are an AQLContainer, never AQL text. The conditions are validated before persisting (a backend-invalid query is refused before anything is saved), exactly like create_segment. A conditions change is two steps. Without `confirm` nothing is saved: the result is a preview carrying the segment's current audience and the new one in plain words, the profile count of each, `changes` (`kept`, `removed` and `added`, each condition in plain words, present when the current conditions can be described) and a `confirmToken`. The save is the same call with `confirm: true` and that token. The token is bound to the segment, the name and the conditions of the preview, and it is refused when any of them differ, when it expired, or when the segment was changed after the preview (a best-effort check, since a read straight after a write can lag it). A segment whose current conditions cannot be described can still be edited: the preview then says so, gives its current size, and the edit replaces its conditions as a whole. A name-only edit is one call with no preview. This edits only name and conditions — there is no description to edit, and you cannot move a segment to another account (a segment id from a different account simply isn't found). When conditions were edited, the result carries an `audienceDescription` — a plain-language rendering of the new conditions, already in the marketer's own words, and re-describing the conditions instead throws that rendering away. A name-only edit returns no `audienceDescription`, since conditions didn't change, and it can also be absent on a conditions edit whenever it could not be rendered, which leaves plain words of the caller's own. This tool's result is for relaying to a non-technical marketer: what reaches them, whether it is `audienceDescription` verbatim or wording of your own, contains no operators, parentheses, comparison symbols (>, <, =, ≠, !=), field types or precedence rules. Returns the segment's id (unchanged). A segment has at least one condition: an `aql` with none is refused.
edit_segment
Edit an existing draft email activity in place — change its subject, its preheader (inbox preview text) and/or its full HTML body (and, when you resend the html, the link click-tracking) — instead of creating a new activity. Pass `activityId` (from create_email_activity) and the `account` it lives in (`account` is optional — omit only if the user has a single account; with several, omitting is refused). Supply at least one of `subject`, `preheader`, `html`, or `trackLinks`; only the fields you pass are changed. A preheader edit is only possible on an email the assistant created (the preheader lives in the email's content, same as the html) — refused with a plain explanation on an Apsis One-authored email, where only the subject can be changed. Removing a preheader is not supported yet — a blank value is refused rather than guessed at, so leave the field out to keep the current one. `html` is a full-body replacement: send the complete new HTML (exactly as for create_email_activity — links are re-wired automatically, and the View-in-browser | Unsubscribe footer is re-added), it does not patch part of the body. Re-wiring replaces the activity's links rather than editing them: new ones are created and the previous ones removed, so link ids change on every html edit. `trackLinks` only takes effect together with `html` (resend the html to change tracking); passing it alone is refused. At most 100 web-address/tracked links per email (the same URL repeated in several anchors counts once per occurrence, not once overall) — an html carrying more is refused naming the count found. Only drafts can be edited — a scheduled/sent activity is refused. An automated email, the kind a flow step sends, follows its flows instead of that rule: it can be changed while it is a draft or active, but only while each flow using it is a draft, paused or stopped: a flow in any other state (running, starting, being paused or stopped, finished, cancelled, failed) refuses the change, because a live one would reach the next people entering it at once; the refusal names every flow using the email, and for a live flow says that the change is possible once the flow is paused, which set_flow_status does. A flow that is a draft, paused or stopped doesn't stop it, an email in no flow can be changed, and the email's own state stays as it was. An automated email the assistant didn't create is refused on every field, the subject included. A draft cannot be deleted here; an unwanted one can be renamed through its subject and left unsent. The check reads the activity's state, so an activity whose response carries no state at all is not refused; do not rely on this as a guarantee that a live campaign cannot be reached. If the email has rich/multi-block content built in the Apsis UI (not a single assistant-authored HTML block), the html edit is refused so it isn't flattened. Editing changes the content, so any earlier preview_email_activity or send_test_email_activity review is invalidated: a send needs a fresh `reviewToken`, which only a new preview or test-send mints. Returns { notApplied?, activityId, account, section, edited, trackLinks?, orphanLinksNote?, links?, previewUrl?, previewNote?, images?, imagesNote?, flows? } where `flows` is present on an automated email that is in a flow, as `{ flowId, name, status }` each, and `edited` lists the fields believed to have been applied — subject and preheader are read back after writing rather than assumed from a successful write, but that read-back fails open: if it cannot be performed the field is still listed, so `edited` means "verified, or unverifiable", not "verified". `notApplied` is present only when a subject or preheader change was requested but read back as unchanged — each entry is `{ field, reason }` with `reason` written for the user and naming its own remedy, which is never a retry: the same call already failed silently once. On an HTML edit, `images` reports where the new body's images can be reached from (`{ remoteHosts, expiring, unreachable }`, with `remoteHosts` also listing stylesheet-link and style `url()` hosts, which `styleHosts` marks as ones Apsis cannot host) — use it to confirm a hosted-URL swap actually landed, and if `remoteHosts` is still non-empty, `imagesNote` is the offer to host the rest, written for the user; on a yes, hosting is `host_email_images_from_url` followed by one more `edit_email_activity`. `orphanLinksNote` is informational, not a fault: cleanup of the previous body's old links can be cut short by the call running out of time, or an individual delete can fail on its own — either way those old links are harmless and unreferenced by the new body, so no action is needed. A metadata-only edit — subject and/or preheader — reads no body, so it reports neither. `previewUrl` shows the draft as it now stands, which is what someone who has just changed their email is looking for; it comes back on every edit without having to be asked for. Where a preview host is configured but the link could not be made just now, `previewNote` is present in its place, and the edit itself has been applied: preview_email_activity returns the link. (Sending still needs a fresh `reviewToken` from preview_email_activity or send_test_email_activity; this link alone does not satisfy the send gate.)
edit_email_activity
Report an import's current status and counts — `total` rows found, `successful` imported, `unsuccessful` failed, `updated`, `skipped` — and follow it to completion unless told not to. Pass the `section` and `account` the import was created in (both echoed by create_import) — carry them across your calls; omit `account` only if the user has a single account. `status` is one of `uploading`, `queued`, `parsing`, `processing`, `ready`, `failed`, `cancelled`, `expired`: `uploading` until the file lands in S3, then `queued`/`parsing`/`processing`, ending at `ready` (or `failed`/`cancelled`/`expired`). The result echoes the resolved `account`/`section` alongside the counts, plus `awaitingUpload`, `timedOut` and `waitedSeconds`. When rows were skipped the result carries a `note` stating what that means: `skipped` on its own reads like a failure when it usually is not — skipped rows are people already in the account that the import was set to leave alone, and/or rows with no usable email address, and with updating switched off a single count can cover both. This call reports counts, not rows: when `unsuccessful` or `skipped` is non-zero and which rows and why matters — a malformed address reads exactly like a locked profile in a count — get_import_report (once the import has finished) has the row-level breakdown. A `statusReason` on a failed import is upstream's own explanation. When the reason names missing columns the accompanying `note` matters more than the raw text: nothing at all was imported, because a column name in the mapping does not match the file's heading exactly. If the import used a per-row subscribing column, these counts say nothing about whether anyone was actually subscribed: a row that received no consent is still counted as imported. Passing back the `subscribedBefore` array create_import returned adds a `subscribing` array once the status is `ready` — one entry per subscription with `before`/`after`/`delta` counts and a `verdict`. There is no verdict on a `failed`, `cancelled` or `expired` import. That is not the same as nothing having been imported: a cancel stops the remaining rows and keeps the ones already written, which `successful` counts, so a cancelled import's subscribing may have partly happened and is unconfirmed either way. `increased` means the after-count is strictly higher than the before-count, which is consistent with the subscribing having worked, but it is not proof it did — anything else changing consent on that subscription in the same window (another import, an API caller, a person opting in through a form) moves the same number, so it is evidence rather than proof. `inconclusive` means the delta is zero or negative, which is not a failure report: the subscriber count can lag the import by a few minutes, so it reads as too early to tell rather than as the subscribing having failed. Omitting `subscribedBefore` leaves the result with no `subscribing` at all, which the `note` states rather than leaving silent. create_import does not always have a baseline to give: when its own count was unavailable it returns a `note` instead, and count_subscribed is then the manual equivalent of the same comparison. This check is itself a diagnostic under a fixed ~10s budget and never holds the call open for it — when the count cannot be read in that time the result carries no `subscribing`, and the `note` says the check was unavailable, distinct from `inconclusive`. Calling this immediately after create_import returns at once with `awaitingUpload:true` while the file has not arrived, and blocks only once the file is being processed — up to ~45s of waiting plus at most ~10s for the subscribing check, returning as soon as a terminal status is reached. `timedOut:true` means the import is still processing. `awaitingUpload:true` means the user has not opened the upload link yet, which is not a failed import. Pass `wait:false` for an immediate snapshot instead. If the `importId` is not at hand — an earlier conversation, or context no longer held — list_imports finds it without guessing or asking for an id that was never shown.
get_import_status
Read-only pre-flight for an email activity: reports whether it can be sent. Returns { canSend, exportValid, links: { unresolved, sample }, rulebook: { valid, warnings }, images, account }. `canSend` is true only when `exportValid` is (the hard gate — the audience/export must resolve to sendable profiles) and `links.unresolved` is 0: `links` counts links in the email that resolve to nothing (typically a copy whose links were not copied with it), with up to five of their ids in `sample`, and send_email_activity refuses such an email outright — there is no acknowledgement for it. Rulebook messages such as "Missing unsubscribe link" are surfaced as overridable warnings, not blockers. `images` says where the images in the content that would send can be reached from: `remoteHosts` are hosts Apsis does not control (Apsis can host them: `host_email_images_from_url` takes the whole set in one call, then one `edit_email_activity` swaps the `src`s; stylesheet-link and style `url()` hosts are listed too, marked in `styleHosts`, and those cannot be hosted), `expiring` are URLs that will stop working (these do gate a send), and `unreachable` are sources only the author can see. Image findings never change `canSend` — a customer's own CDN is a perfectly good host, so `remoteHosts` is a suggestion, never a blocker. Note: a missing unsubscribe link is GDPR-critical — send_email_activity will require an explicit second re-confirmation before it ships such a campaign. Mutates nothing. Pass the `account` the activity lives in (`account` is optional — omit only if the user has a single account; with several, omitting is refused). Note: a freshly created draft has no audience (subscriptions) yet, so `canSend` is typically false until an audience is set.
validate_email_activity
Returns the conventions for working with these tools: how an audience's conditions are agreed and described before a segment is built, where a saved segment's targeting comes from, and how accounts, segments and emails are named. Reads nothing from any account and changes nothing.
get_conversation_guide
Duplicate an existing email activity into a new draft (the platform copies the content server-side, so the `##…##` personalization is preserved exactly — unlike rebuilding from a preview). An activity can only be sent once, so a copy is how the same content goes out again, and how an existing email becomes the template for a new one. An automated email (`type: "automated_email"` in list_email_activities) belongs to its flow, and this tool refuses to copy one. Pass `activityId` (from list_email_activities / create_email_activity) and the `account` it lives in (`account` is optional — omit only if the user has a single account). Optional `name` renames the copy; omit it and the copy is named "<original> (clone)". Renaming is a second write after the copy exists, so if this tool errors having been given a `name`, do not assume nothing was created — the copy may exist under the default "(clone)" name; list the section's emails before duplicating again. Any source state can be duplicated (a sent one included). It takes two calls. The first, without `confirm`, reads the source email and writes nothing: it returns `{ confirmed:false, willCreate:{ source:{ activityId, name, state, sentAt? }, name, audience, from?, folder? }, confirmToken, note }`. The second, with `confirm:true` and that `confirmToken`, makes the copy and returns the shape below. The token is bound to the account and the exact inputs and expires in 1 hour; a missing, expired or altered token is refused and nothing is copied. A repeat confirming call with the same token makes another copy. A call from a client that does not know about `confirm` gets the first-call answer and copies nothing. On the confirming call it returns { folder?:{ filed, location? | note? }, linkIntegrity:{ ok, unresolvedLinks, sample?, note? }, activityId, name?, audience:{subscriptionIds,segments?}, from?, account } — `folder` is present only on an account that uses folders, where the Drafts list and search show only emails filed in a folder: `filed:true` means the copy is in the main Drafts list (`location:"root"`), which is not next to the original when the original sits in a subfolder; `filed:false` means the copy exists but may not show in Drafts or search yet, so a second duplicate would only be a second copy, and `note` says so, written for the user. `from` is absent when the source carried no sender, and a send without one is refused, so the copy needs a sender supplied before it can go out. `linkIntegrity` says whether every link in the copy resolves: `ok:true` is a healthy copy; `ok:false` means some links (possibly the unsubscribe link) point nowhere, so the copy cannot be sent — send_email_activity refuses it — and `note` is the remedy, written for the user; `ok:null` means the check could not run, and send re-checks. The copy arrives pre-aimed at the same audience — subscriptions and any segment narrowing (the backend clone copies `segmentation` too) — and sender as the original, echoed in `audience`/`from`. The copy carries that audience and sender only as stored values: send_email_activity writes its own `from`, `subscriptionIds` and `segments` over them, so a send of the copy without the same `segments` goes to the whole subscription, not the narrowed audience. `audience` and `from` here are the values that reproduce the original's aim, and the send review-token does not cover the audience. The copy is a fresh activity: it must be previewed/test-sent on its own to get a new reviewToken (a token from the original is refused as wrong-target). The copy inherits the original's assistant-authored status — a duplicate of an assistant-created email stays assistant-editable; a duplicate of an Apsis One email does not.
duplicate_email_activity
Count how many profiles in a section are currently subscribed to one subscription — opted in or double opted in. An import's own counts say nothing about whether consent was created — a row that got no consent is still reported as imported — so a subscribing import is only verifiable against this count. In the import flow that comparison is not this tool's job: create_import captures the before-count itself and returns it as `subscribedBefore`, and get_import_status does the after-count and reports a `subscribing` verdict from it. This tool is the manual fallback for the case where create_import could not read the count and said so in its `note`: calling it once before the upload and once after gives the same comparison. This number lags recent changes by a few minutes — it is not live. Straight after an import it can still show the old figure even though the subscribing worked, so an unchanged number reads as too early to tell — never proof that nothing happened. Nothing here can tell a count that is merely lagging from one that will never move: the platform reports no time at which an import finished, so there is no interval after which an unchanged count becomes evidence of failure. The number counts everyone subscribed to that subscription, not just the people in a given file, which is why the difference between two readings is the meaningful figure rather than either reading alone — and even the difference is evidence rather than proof, since anything else changing consent at the same time moves it too. Also usable on its own to answer "how many people are subscribed to X": the result carries a subscription and a count of people, and nothing else — no consent state, no attributes, no query — because that is all it is built from. On success the result is `{ subscriptionId, subscriptionName, profileCount, account, section }`. If it cannot count — an unknown subscription, or one that exposes no consent data — the call fails with an error rather than returning a number; that error never means nobody is subscribed. Two input requirements are stricter here than elsewhere on this surface: `section` must be the numeric section id, not the discriminator most other tools accept, and `subscriptionId` must be digits only.
count_subscribed
In development: may change. Creates a Marketing Automation flow as a draft from a spec plan_flow planned. The call takes the same `account`, `section` and `spec` that plan_flow planned, plus the `planToken` plan_flow returned: a missing, expired or mismatched token is refused and nothing is created, and any difference in the spec counts as a mismatch. Each call with a valid token creates another flow, so after a call that timed out, list_flows shows whether the draft appeared before calling again. The flow is made from a blank draft and its steps are given positions. Every email step is written empty and then given its email by a change to that step, so Marketing Automation copies nothing: an automated email that is in no flow is used as it is, and any other email Apsis InVega made is first copied into a new automated email for the flow's subscriptions, at most five copies at a time and only while the call has time left. A step with only a `brief` stays empty and keeps the brief as its name. A check on one of the flow's own emails is written with that email's id. No email is activated or sent, and the flow stays a draft that starts for nobody; it can't be switched on while a step is empty. It is checked with Marketing Automation's own check and with the checks of `get_flow`'s `validation` before the call answers, with one difference: `get_flow` reports an empty email step and a draft email as problems, and this call reports them as `nextSteps`, which don't make `valid` false. A flow holds at most 10 email steps, so one call makes at most that many copies. Returns `{ flowId, account, section, name, status, automatedEmails, unattachedEmails?, validation, note }`: `section` is the section's id, `automatedEmails` are the emails the steps send, as `{activityId, name, step, way, copiedFrom?}` with `way` `as-is` or `copy`, `unattachedEmails` are emails made or chosen for a step that the flow doesn't send, as `{activityId, name, step}`, and `validation` is `{valid, problems, notChecked, nextSteps}` with each problem by `step` where it has one. `nextSteps` are `{step, message}`, of three kinds: an email step that has no email yet, an email made or chosen that isn't attached to its step, and an automated email that is still a draft; each names the tool for it: create_email_activity with the flow and step or attach_automated_email for a step, and send_email_activity to activate a draft. They are not problems, and a flow with only next steps is valid. If a copy or the steps can't be written, the unfinished draft is deleted, since it can't run and has nothing to keep, and the error says no flow was created; the copies already made stay as drafts that no flow uses and send nothing, and their ids are in `unattachedEmails`. If the delete fails or there's no time for it, the error carries `flowId`. A later failure, such as a step that couldn't be given its email, keeps the draft, and the result names what isn't ready. Nothing is retried.
create_flow
In development: may change. Creates a form as a draft from a spec the user agreed to. The call takes the same `account`, `section` and `spec` that plan_form planned, plus the `planToken` plan_form returned: a missing, expired or mismatched token is refused and nothing is created, and any difference in the spec, a colour in the look included, counts as a mismatch. Each call with a valid token creates another form, so after a call that timed out, look for the draft with list_forms before creating again. The form is built from a blank draft: the identifier field and the fields in the plan's order, the consent, the hidden values, the language, the look, what happens after a submit and the validation messages, and it is checked with the form editor's own validator before the call answers. The attributes the form fills are made writable for it first, without a question to the user. Returns `{ formId, previewUrl?, hostedUrl?, lookKeys, note }`. `previewUrl` opens the draft in a browser and needs JavaScript. `hostedUrl` is the form's public address, which serves nothing until the form is published and isn't shown to the user before then. `lookKeys.dropped` lists each look key the form's elements have no property for, as `{ element, key, reason }`, and is empty when none; plan_form named the same list before the form was made. The form is not published, and it can't be deleted for good. If a step fails after the draft exists, the answer is an error that carries `formId`, `done` and `notDone`: nothing is undone and nothing is retried, so the draft stays as far as it got.
create_form
Creates a draft email from custom HTML, saved as a single raw-HTML element. The draft is not sent. Before planning, unless the user said which, ask whether it is an email sent to an audience or an automated email sent by a flow; the kind of email is asked, not assumed. The call requires the `planToken` returned by plan_email_activity for the same account, `section`, `subject`, `preheader`, `html` and `trackLinks`; a call without a valid one is refused and creates nothing. Each call with a valid token creates another draft. The subject and the preheader are the user's choice, and both stay editable on the draft afterwards through edit_email_activity. With `automated: { subscriptions }`, as planned, the draft is an automated email for those subscriptions: it is not filed with the emails sent to an audience, and the result echoes `automated`. A flow step takes it by its `activityId`. With `automated.flowId` and `automated.nodeId`, as planned, the step is checked again before anything is written, the email is created with all of the flow's subscriptions and put on that step, and the result carries `attached` and `step: { flowId, nodeId }`: `attached:false` means the email was created as a draft in no flow, and `note` says why. Neither the flow's status nor the email's state is changed. Returns `{ activityId, account, section, trackLinks, links, previewUrl?, previewNote?, images, imagesNote? }`, where `links` summarizes the wired web-address links as `{ id, url, tracked, hasDataTags }`, plus a `note` when the draft could not be filed into its folder. `images` reports where the email's images can be reached from, as `{ remoteHosts, expiring, unreachable }`. `remoteHosts` lists hosts Apsis does not control, including the hosts of stylesheet links and of `url()`s in styles (`styleHosts` names the ones only styling reaches, which Apsis cannot host), and none of them blocks a send. When it is non-empty, `imagesNote` carries the offer to host them, written for the user. Hosting is host_email_images_from_url followed by one edit_email_activity to swap the `src`s, and doing that on the draft is cheaper than at send time, when the same edit invalidates the review token. `previewUrl` links to the draft as built. It is absent when the environment has no preview host configured, a case preview_email_activity handles explicitly. Where a preview host is configured but the link could not be made just now, `previewNote` is present in its place: the draft is saved either way, and preview_email_activity returns the link. It is not a review for sending: the `reviewToken` a send requires comes from preview_email_activity or send_test_email_activity.
create_email_activity
In development: may change. Edits a draft or taken-down form this server built, in one call. A draft takes exactly one of `spec` (replace the whole form) or `change` (one small change, the rest of the form untouched); a taken-down form takes a `change` only, one field at a time, or is published as it is. `change` is `{ kind: "rename", key, label }`: it sets the visible label of a text, email, phone, number, date or textarea field named by `key` (`summary.fields[].key` from preview_form), keeps its key, mapping and a required field's `*`, and changes nothing else; a dropdown, tick or consent field is refused, and a `key` the form doesn't have is refused with the keys it has. The result carries `changed`. `{ kind: "remove", key }` takes a field off the form in two calls: the first writes nothing and returns `willRemove` and a `confirmToken`; the second repeats the same change with `confirm: true` and that token. The last field, a consent, terms or the submit button, and the only email or mobile field are refused. `{ kind: "add", field, before?, after? }` adds one field item (text, email, phone, number, date, textarea, dropdown, radio or checkbox, as plan_form takes it, without a `key`) next to the field named by `before` or `after`, or after the last field; it gets its key from its label or attribute, and a field the form already has under that key is refused. A consent or terms field can't be added this way. Pass `account` (from list_accounts), `section` (from list_sections; omit it and a sole section is used silently), `formId` (from list_forms) and, for a draft replace, `spec`, the whole form as it should now be, in plan_form's vocabulary: whatever the spec leaves out is gone from the form, except a consent tick's wording, which a tick the spec gives no wording keeps from the draft, unless it is the only tick and its wording is only the subscription's name. Only a draft or a taken-down form with `isEngineManaged` can be edited: a live form, a deleted one and a form built in Apsis One are refused, with nothing changed. The form's name stays as it was made, so `spec.name` must be its current name. Every field that stays carries the `key` it has (`summary.fields[].key` and `hiddenValues[].name` from preview_form): a field without a `key` is new, named from its label or attribute, so the same spec run again gives the same names, but a form made earlier may have named it differently; a `key` the form doesn't have is refused. Every hidden value the form has must stay a hidden field with its `key` (its value can change): an edit can't remove one or turn it into a visible field, and is refused before any write if it tries. A changed label keeps the key, so the form's submissions stay comparable. There is no token: the call checks the spec as plan_form does and refuses with every problem at once before it changes anything. It then clears the form, makes the attributes it fills writable without a question to the user, and builds the form as create_form does; its options are not touched except what happens after a submit and the profile check, and Manage consents and every other stored setting stay as they are. Returns `{ formId, name, status, previewUrl?, summary?, lookKeys, removed, consentChanges?, images?, note }`: `status` is `draft` or `taken down`, as the form was; `summary` is the form as preview_form describes it, and `lookKeys.dropped` is as create_form returns it. `removed` lists the fields the draft had that the new spec leaves out, each as `{ key, label? }`, the label being absent when the draft had none to read; text, image, spacer and line items have no `key` and are not listed. `consentChanges`, on a spec edit, lists what the edit changed in the consent and the profile policy against the draft, each entry one of `{ what: "subscriptions", added, dropped }` (by subscription name), `{ what: "consent text", subscription, before, after }`, `{ what: "consent required", before, after }` and `{ what: "profile policy", before, after }`, and is `[]` when nothing differs; on a draft an earlier edit left part-built, an entry whose before cannot be read is left out; a consent the spec drops is in `removed` instead. An `image` item's address is classified as plan_form classifies it, and a link that expires is refused; `images`, present when the spec has image items, is `{ remoteHosts, expiring, unreachable }`, and when `remoteHosts` is not empty the note opens with an offer to host those images at Apsis, after which the edit is made again with the hosted addresses. A draft stays a draft and a taken-down form stays taken down: nothing is live until publish_form, and a live form is not edited here. If a step fails after the form was cleared, the answer is an error that carries `formId`, `done`, `notDone`, `consentChanges` (what the edit changes, against the form as it was) and, when the spec has a consent, `consentTexts` (the wording each tick was to get, by subscription name): nothing is undone and nothing is retried, so the form stays as far as it got, and calling edit_form again with the same spec, with `consentTexts` as its `consent.subscriptionTexts`, completes it with that wording.
edit_form
Permanently erase one profile and all its data. Pass `account` (from list_accounts), `section` (from list_sections, or omit if the account has a single one), and `identifier` — the whole unique identifier value, exactly as the person gave it (typically a full email address). Two steps. Called without `confirm`, it deletes nothing and returns `{ outcome:"resolved", attributes, irreversible, accountWide, deleteToken, … }`; the `attributes` are there because they are the only way to tell whether this is the right person. Calling again with `confirm:true` and the `deleteToken`, repeating the same `identifier` and `section`, performs the deletion. Three facts about a deletion are invisible from the user's side. It is irreversible. It removes the person from the whole account rather than just this section, which is what a `warning` field marks. And where `crmTied` is true, `crmWarning` explains that the profile has a CRM id, so the next CRM update recreates it unless the record is anonymised in the CRM first — without that, the deletion does not stick. A request to stop receiving email is not a deletion request, and erasing someone is not a way to satisfy one. Erasure is not a side effect of another task either — it is only ever the task itself. One profile per call: `identifier` is a single value and there is no batch form, so a request like "here are 30 addresses, clean this up" resolves into one call per person, each with its own confirmation. `outcome` is the discriminator. `resolved` means nothing has happened yet. `deleted` means it is done. `refused` means nothing was deleted and carries a `reasonCode` plus a `message`, which is written for the user. Two reason codes carry more than the message. `reasonCode:"ambiguous"` means the identifier matches more than one person and nothing can be deleted from it; there is no way to pick a candidate here, so only a narrower identifier resolves it. `reasonCode:"not-in-section"` means they exist but have no data in this section, so there is nothing to show that would confirm identity, and a section where they do have data is where a lookup succeeds.
delete_profile
Find one profile in a section by a complete unique identifier (e.g. a full email address). Pass `account` (from list_accounts), `section` (from list_sections, or omit if the account has a single one), and `identifier` — the whole value, exactly as the person gave it. There is no partial or substring match: a value that only partly matches comes back as `not-found`, never a wider search. This is exact-match lookup only — it does not show every attribute, subscription or consent event for a profile; that is a separate capability. Read the `outcome` field first. `found` gives the section's default attributes (labelled by name) and a `profileRef`: the profile's reference, normally its export key (the id in the profile's address in Apsis One) and, for a profile that has none yet, the identifier that was looked up. It is carried verbatim into any later tool that acts on this profile. `ambiguous` means the identifier matches more than one person, and `mustAskUser` is true. Nothing here identifies which candidate was meant: they matched the same identifier equally, so an apparently likelier one is an appearance rather than evidence. Each candidate carries its own attributes and `profileRef`. `not-found` means no profile matches. `not-in-section` means the person exists but has no data in the section you asked about — not that they don't exist. `locked` is reported as transient, not as a not-found. `attributes` is an optional list of up to 10 attribute ids, as `describe_segment_target` lists them for the same section; the result then also carries each requested attribute that has a value, labelled by name, and `requestedAttributes` lists what was asked for, so a requested attribute missing from `attributes` has no value for that person. Those values are the person's personal data.
lookup_profile
Get an upload link for an image the user wants in an email or a form, so it can be hosted by Apsis and referenced by `<img src="...">` in an email, or by the `url` of an `image` item in a form. Nothing is uploaded from here: the link goes to the user, they pick the file, and their own browser sends it straight to storage — the bytes never pass through this server, the model's context or its sandbox. Pass `account` (from list_accounts) to choose where to host it — carry it across your calls; omit only if the user has a single account. `content_type` must be the image's MIME type (image/png, image/jpeg, or image/gif). `label` is a short purpose ("header banner") that names the link, so several links in one message stay distinguishable. `origin` is required and says who supplied the image — "user" if they already have the file, "web" if you found it online (then `source_url` is required too, so the link message can tell them where to download it), "generated" if you produced it, including a file you converted or resized from their original. Returns `{ upload_id, uploadLink, expiresInSeconds, account }`. Sequence: create_email_image_upload → the user uploads → finalize_email_image_upload. The upload is the user's to perform: the link goes to them, they pick the file, and their own browser sends it straight to storage, so the bytes never pass through this server, the model's context or its sandbox. Only the final message of a turn is reliably visible. Chat clients collapse a turn's intermediate steps behind a summary ("Worked for 48s"), so anything said in an earlier message of the same turn is likely never read — which is why a conversion that was performed, which file belongs in which slot, and any question still outstanding all belong beside the link rather than before it. Supported formats are PNG, JPEG and GIF. Each upload slot is signed for one type and cannot be changed once minted, so the format has to be settled before a link exists. Emails need those three anyway: WebP and AVIF do not render in Outlook. `content_type` follows the file name: .png is image/png, .jpg and .jpeg are image/jpeg, .gif is image/gif. The unsupported formats are .webp, .avif, .heic, .bmp, .tiff and .svg. A link signed for image/jpeg carrying WebP bytes is accepted by storage and then refused at finalize, which costs the user the whole trip. Converting such a file to PNG or JPEG is local work and needs no network. The disguised case matters as much: a file named .jpg can still hold WebP bytes, which is what saving from Google Images produces, and the upload page checks the bytes, so a format mismatch it reports is authoritative over the file name. The size limit is 5 MB, enforced by the signed upload policy rather than by this server, so an over-size file cannot be uploaded at all and storage refuses it with an error the user cannot act on. A phone photo is usually over it. Emails also load faster with smaller images, so around 1200px wide is a sensible target. For several local images, create_email_image_uploads presigns the whole set and returns one link, so the user visits a single page and picks every file there. Pick order is what pairs the files to the slots, and the link message spells that order out, so `images` goes in the order the files should be picked. One link per image is the fallback where that tool is unavailable. The bytes are not needed. A copy attached to the chat can be read for alt text, but an attachment is not the upload — only the link uploads. An attachment says nothing about the format. What is shown is a picture, not the file the user will pick: its real bytes and its name are both invisible, so seeing an image is not evidence that it is a PNG or a JPEG. Attachments in a chat are frequently WebP, which is the case that most often ends in a refused upload. What resolves it is the format each file actually is, or the format each slot was signed for, stated in the same message as the link, where the user can correct it before uploading. A web image does not need uploading: any `http(s)` image is accepted as it stands, so it can go into the email with its own URL and give the user a finished, previewable email immediately. Hosting it at Apsis is an improvement rather than a precondition, and the reason is that Apsis cannot control another site — the image may be blocked or changed after the send, and each open tells that site who the recipients are. Plain `http` is accepted here, but many mail clients block or warn on it, so an `http`-only image is worth hosting rather than merely offering to host. The link message already contains the ordered list with each slot's format, so restating it in other words can only contradict or lose it. (Observed: an assistant-written "choose these in this order: , , , ." that rendered four commas and no names.) What it cannot know is the part worth adding — which converted file goes with which slot. A slot carrying neither a `label` nor a `source_url` asks the user to find a file they cannot identify. Where the image was the model's choice — found on the web, or generated — the user has nothing to pick until they can get it, and `source_url` on that slot is what puts the download location into the link message. A generated image still cannot be uploaded by the model. It has to reach somewhere the user can get at — a path they can open, on a client running on their own machine, or a download, on a hosted one — and then an upload link for that. A sandbox path, a `file://` URL or a `data:` URI in the HTML renders broken for every recipient. Finalizing is one call to finalize_email_image_uploads with every `upload_id` for a set, or finalize_email_image_upload for a single image. Every `upload_id` is already held once the create has returned, so calling create again mints a second link, sends the user back to the browser to upload the same files twice, and orphans the first set. finalize_email_image_uploads finalizes every id even where one of them fails, and reports `finalized` and `failed` counts, so one bad image does not cost the user the good ones. A finalize is worth retrying only on not-found, once, in the same turn, because a missing object cannot be told apart from one that never landed. A format or size refusal fails identically on a second call, the bytes being unchanged. On not-found twice, what the upload page said — "File uploaded" or not — is what separates the two cases, and a fresh link is the way forward. An expired link has no refresh: create_email_image_upload again. Once finalize returns `imageUrl`, that URL goes into an `<img src="...">` in the HTML passed to create_email_activity, which stores it verbatim.
create_email_image_upload
Get one upload link for several images the user wants in an email or a form — use this instead of calling create_email_image_upload repeatedly, so the user makes one trip to their browser rather than one per file. You upload nothing: the link goes to the user, they pick all the files on one page, and their browser sends them straight to storage. `images` is an ordered list of `{ content_type, origin, label?, source_url? }` — **the order matters**: the page pairs the files the user picks with these slots in order, and shows each slot's label and expected type so a mis-pick is visible before anything is sent. Give every image a short `label` ("header banner", "logo"): the link message already lists the slots in order with their labels, so a second list in other words can only contradict or lose it. At most 10 images per link — ask for a second link beyond that. Returns `{ uploads:[{ upload_id, label }], uploadLink, expiresInSeconds, account }`. After the user says they are done, call finalize_email_image_uploads once with every `upload_id` — not finalize_email_image_upload per id, which is what let one bad image strand the rest. The upload is the user's to perform: the link goes to them, they pick the file, and their own browser sends it straight to storage, so the bytes never pass through this server, the model's context or its sandbox. Only the final message of a turn is reliably visible. Chat clients collapse a turn's intermediate steps behind a summary ("Worked for 48s"), so anything said in an earlier message of the same turn is likely never read — which is why a conversion that was performed, which file belongs in which slot, and any question still outstanding all belong beside the link rather than before it. Supported formats are PNG, JPEG and GIF. Each upload slot is signed for one type and cannot be changed once minted, so the format has to be settled before a link exists. Emails need those three anyway: WebP and AVIF do not render in Outlook. `content_type` follows the file name: .png is image/png, .jpg and .jpeg are image/jpeg, .gif is image/gif. The unsupported formats are .webp, .avif, .heic, .bmp, .tiff and .svg. A link signed for image/jpeg carrying WebP bytes is accepted by storage and then refused at finalize, which costs the user the whole trip. Converting such a file to PNG or JPEG is local work and needs no network. The disguised case matters as much: a file named .jpg can still hold WebP bytes, which is what saving from Google Images produces, and the upload page checks the bytes, so a format mismatch it reports is authoritative over the file name. The size limit is 5 MB, enforced by the signed upload policy rather than by this server, so an over-size file cannot be uploaded at all and storage refuses it with an error the user cannot act on. A phone photo is usually over it. Emails also load faster with smaller images, so around 1200px wide is a sensible target. For several local images, create_email_image_uploads presigns the whole set and returns one link, so the user visits a single page and picks every file there. Pick order is what pairs the files to the slots, and the link message spells that order out, so `images` goes in the order the files should be picked. One link per image is the fallback where that tool is unavailable. The bytes are not needed. A copy attached to the chat can be read for alt text, but an attachment is not the upload — only the link uploads. An attachment says nothing about the format. What is shown is a picture, not the file the user will pick: its real bytes and its name are both invisible, so seeing an image is not evidence that it is a PNG or a JPEG. Attachments in a chat are frequently WebP, which is the case that most often ends in a refused upload. What resolves it is the format each file actually is, or the format each slot was signed for, stated in the same message as the link, where the user can correct it before uploading. A web image does not need uploading: any `http(s)` image is accepted as it stands, so it can go into the email with its own URL and give the user a finished, previewable email immediately. Hosting it at Apsis is an improvement rather than a precondition, and the reason is that Apsis cannot control another site — the image may be blocked or changed after the send, and each open tells that site who the recipients are. Plain `http` is accepted here, but many mail clients block or warn on it, so an `http`-only image is worth hosting rather than merely offering to host. The link message already contains the ordered list with each slot's format, so restating it in other words can only contradict or lose it. (Observed: an assistant-written "choose these in this order: , , , ." that rendered four commas and no names.) What it cannot know is the part worth adding — which converted file goes with which slot. A slot carrying neither a `label` nor a `source_url` asks the user to find a file they cannot identify. Where the image was the model's choice — found on the web, or generated — the user has nothing to pick until they can get it, and `source_url` on that slot is what puts the download location into the link message. A generated image still cannot be uploaded by the model. It has to reach somewhere the user can get at — a path they can open, on a client running on their own machine, or a download, on a hosted one — and then an upload link for that. A sandbox path, a `file://` URL or a `data:` URI in the HTML renders broken for every recipient. Finalizing is one call to finalize_email_image_uploads with every `upload_id` for a set, or finalize_email_image_upload for a single image. Every `upload_id` is already held once the create has returned, so calling create again mints a second link, sends the user back to the browser to upload the same files twice, and orphans the first set. finalize_email_image_uploads finalizes every id even where one of them fails, and reports `finalized` and `failed` counts, so one bad image does not cost the user the good ones. A finalize is worth retrying only on not-found, once, in the same turn, because a missing object cannot be told apart from one that never landed. A format or size refusal fails identically on a second call, the bytes being unchanged. On not-found twice, what the upload page said — "File uploaded" or not — is what separates the two cases, and a fresh link is the way forward. An expired link has no refresh: create_email_image_upload again. Once finalize returns `imageUrl`, that URL goes into an `<img src="...">` in the HTML passed to create_email_activity, which stores it verbatim.
create_email_image_uploads
Hands over the people in an audience. With `as: "list"` it returns up to 200 of them in this conversation; with `as: "file"` it makes the whole audience into a CSV or Excel file the user downloads from an Apsis InVega page. It takes `section`, plus exactly one of `aql` (an AQLContainer, as count_profiles takes it) or `segmentId` (from list_segments). An engagement list is an `aql` with an event condition, built from describe_segment_target's events. Both hold contact attributes only: email, first name and last name, plus up to 10 `attributes` ids from describe_segment_target. Neither holds event history. What the people are for decides which columns are needed, so the useful columns are the ones the question needs rather than all of them. A list holds up to `limit` people (1 to 200, default 200), with `matchingTotal`, the number of everyone matching, and a `profileRef` per person for lookup_profile. When the audience's events are one event condition or several joined by or, none negated, and any attribute conditions are joined to them by and and negate nothing, each person also has `matches`, their number of matching events (for a form, their submissions), and a list of everyone has `totalMatches`, the sum. When the 200-person ceiling cuts a list short, its `followUp` offers the file; a list of an `aql` audience otherwise offers to save it as a segment. A list's `followUp`, when present, is a question written for the marketer. Making a list or a file takes from a few seconds to about a minute. The file is personal data, and Apsis keeps each export for 30 days. On a file's `ready`, the result's first text block is written for the user and is complete as it stands: the link, the number of contacts, the columns, when it was built, and the personal-data and retention lines. A summary of it loses those, and the link works for 15 minutes at most. `still-processing` carries a `resumeToken`: passed back with the same other arguments, it picks up the same export instead of starting another; with any other argument changed it is `resume-invalid`. Other outcomes are normal answers, not errors: `no-one` for a list and `no-rows` for a file (no one matches, and nothing is exported), `busy` (the account has too many exports running; try again shortly), `rejected` (`detail` says why), `expired` (the token is too old; a fresh call starts again) and `unavailable` (try again shortly). A `section` that is not the audience's own, or ids outside its attributes, are refused before anything is exported. An `aql` with no conditions is everyone in `section`.
export_profiles
Hide a folder and every subscription filed in it. Neither the folder nor the subscriptions it takes with it can be brought back afterward, and that is why this takes two calls. Pass `account`, `section` and the `folderId`. Calling it without `acknowledgeSubscriptionsHidden` hides nothing and returns `{ hidden:false, requiresAcknowledgement:true, folder, wouldAlsoHide:[names], acknowledgeSubscriptionsHidden:N, note }` — the folder by name and every subscription that would go with it, so that can be put to the user before anything disappears. Passing `acknowledgeSubscriptionsHidden` set to that `N` on a second call is what actually hides the folder. The value checked is only the count, so a count obtained from anywhere else — list_subscriptions reports it too — satisfies the second call just as well. Nothing on the server distinguishes a first call carrying `N` from a second one: the two-call shape exists so that `wouldAlsoHide` reaches the user by name before the folder goes, and it is the only thing that can. That number is checked against the folder's contents at the moment of the second call, not accepted from what the first call reported: if a subscription was added or removed in between, the value no longer matches, the call is refused, and a fresh list comes back to work from. No consent data is deleted: everyone stays opted in and campaigns already pointing at those subscriptions keep working. But none of them will ever be offered again for a send, an import or a count, and there is no way back. If the user only wants the folder tidied rather than its contents gone, hiding the individual subscriptions is recoverable through Apsis support, where this is not. On success you get `{ hidden:true, folderId, folder, alsoHidden:[names], note }`, written for the user.
hide_subscription_folder
Hide a custom attribute so it is no longer offered as a field. This is the only way to remove an attribute — an attribute can never be deleted. Pass `account` and `section` (ids from list_accounts / describe_import_target) and the `attributeVersionId` to hide. It takes two calls. The first, without `confirm`, reads the attribute and writes nothing: it returns `{ confirmed:false, willHide:{ attributeVersionId, name, section, hiddenFromApsisOneAfterMinutes, canBeUnhidden:false }, confirmToken, note }`, where `hiddenFromApsisOneAfterMinutes` is how long after the confirming call the Apsis One interface stops showing it (a duration rather than a clock time, since the confirming call can come up to an hour after the first and sets its own time), and `note` is written for the user and says that nothing has been hidden yet. The second, with `confirm:true` and that `confirmToken`, hides it. The token is bound to the account, the section and the exact inputs and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and hides nothing. A call from a client that does not know about `confirm` gets the first-call answer and hides nothing. For an attribute that is already hidden, the first call reports `alreadyHidden:true` without a token; a confirming call still needs a valid token. No profile data is deleted by this — the values already stored stay exactly as they are — and there is no un-hide. Hiding is a scheduled deprecation, not an instant one, and the result's `note` states both halves of it. Once this returns, the attribute stops being offered: describe_import_target, describe_segment_target and list_email_data_tags all filter it out at source, so it cannot be picked for a new import, segment or data tag — though those three read through a per-section cache that lives up to an hour, so a process holding a warm copy can still list the attribute until its copy expires. Until `hiddenFromApsisOneAt`, about an hour later, the Apsis One interface keeps showing it (the platform enforces that one-hour minimum, and it can't be shortened here). create_import validates no mapping at all, so it accepts the attribute's `attributeVersionId` both before and after that timestamp; what changes at the timestamp is that profile writes to that column start being rejected upstream. An import already created that maps this attribute keeps writing to it until that timestamp, then starts failing those columns. Segments already built on the attribute keep working. On a confirming call you get `{ hidden:true, alreadyHidden, attributeVersionId, name, discriminator, deprecatedAt, hiddenFromApsisOneAt, note }`. Hiding an attribute that is already hidden reports `alreadyHidden:true` with the original time and changes nothing — it is not a second hide. A standard platform attribute like First Name is refused outright, which the `note` states.
hide_attribute
Hide a subscription so it is no longer offered. This is the only way to remove one — a subscription is never deleted — so reach for it when the user wants one gone. Pass `account`, `section` and the `subscriptionId`. It takes two calls. The first, without `confirm`, reads the section's folders and writes nothing: it returns `{ confirmed:false, willHide:{ subscriptionId, name, folder?, canBeUnhidden:false }, confirmToken, note }`, where `note` is written for the user and says that nothing has been hidden yet. The second, with `confirm:true` and that `confirmToken`, hides it. The token is bound to the account, the section and the exact inputs and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and hides nothing. A call from a client that does not know about `confirm` gets the first-call answer and hides nothing. No consent data is deleted: everyone who opted in stays opted in, and campaigns already pointing at it keep working. Once confirmed, it stops being offered right away — for sends, for subscribing an import, for consent counts and in list_subscriptions. It can't be un-hidden here: bringing it back is a request to Apsis support, so from here it is one-way. Confirmed hiding takes effect immediately, unlike hiding an attribute, which has an in-between hour where it is still usable — hide_subscription has no such window. A campaign already pointing at it keeps working, but a send or an import not yet started can no longer pick it up, so work in progress that was going to use this subscription is worth finishing first. On a confirming call you get `{ hidden:true, subscriptionId, name, folder?, note }` — `folder` is absent for a subscription that was not in one. Calling it a second time does not report `alreadyHidden`: the subscription is no longer in the section's listing, so the call fails saying it isn't a subscription here, which for a subscription just hidden means it worked. `note` is written for the user and states that the subscription is hidden, not deleted — "hidden" and "deleted" are different things, and the difference matters to anyone asking where their consent data went.
hide_subscription
Host an email's or a form's images that currently live on someone else's website at Apsis instead, by URL — this is how an accepted offer to host their web images is carried out, and it needs nothing from them. Unlike create_email_image_upload there is no upload link and no trip to the browser: Apsis fetches each URL itself, server-side. Pass every image in one call as `urls` (the whole set the user agreed to), plus the same `account` you have been carrying (omit only if the user has a single account). At most 10 URLs per call. Returns `{ unhostableExpiring?, stayedRemote?, note?, results:[{ index, url, ok, hostedUrl?, width?, height?, error?, retryable?, notAttempted?, formatUnsupported?, local? }], hosted, failed, notAttempted?, insufficientTimeRemaining?, remainingMs?, account }`. `formatUnsupported` marks the specific benign failure that already counts toward `stayedRemote`/`unhostableExpiring`; `local` marks a result refused before the gallery was ever called (a `data:`/local path, or embedded credentials) — its `url` is a redacted echo, not the real one. **Pair each result to its input by `index`** — the position in the `urls` array you sent. Do not pair by `url`: the same URL can legitimately appear twice in one call (a logo used in two places), and for an input that could never be hosted (a `data:` URI, or one carrying credentials) `url` comes back reduced rather than verbatim. Results are in input order too, so `index` and position agree. Each image is hosted independently: one failure never costs the others, and it is a tool error only when nothing was hosted and at least one failure is something other than a plain format refusal — retryable, or a URL/environment problem of its own (a batch cut short by the time budget before any image was even attempted is not an error by itself). On a very large or slow batch the call can run out of time before every URL is tried — that shows up as `notAttempted` results (`retryable: true`) plus top-level `notAttempted`/`insufficientTimeRemaining: true`/`remainingMs` (the last of which can still be a small positive number — not enough for one more image, not necessarily zero), and is not a failure of those images: call again with just the `notAttempted` URLs to finish the set. Sequence: host the set, then make one edit_email_activity call replacing each old `src` with its `hostedUrl` (send the full HTML, as edit always requires). Expect that edit to invalidate any `reviewToken` you hold and to need a fresh preview_email_activity before sending — that is how editing works, not a fault, so just do it rather than reporting it as a problem. For a form the sequence is: host the set, call plan_form again with each `hostedUrl` as the `url` of its `image` item, then create_form from that plan. A form has no send to gate, so plan_form refuses an image on an expiring link, and the upload route below is how such an image reaches a form. An image that cannot be hosted leaves the email intact. Apsis hosts png/jpeg/gif only, and most images on the web are WebP, so a refusal here is common and expected — not a blocker, and a batch that fails this way for every image is not a tool error either. A remote image sends perfectly well; leaving it where it is remains a legitimate choice, and the only image problem that ever blocks a send is an expiring link. `stayedRemote`/`unhostableExpiring` name exactly which of the failed images fall into which bucket, and `note` is written for the user and says that more accurately than a paraphrase can. Beyond one retry when its result is `retryable:true`, an `unhostableExpiring` image has two routes: create_email_image_upload takes a saved copy in place of the link, and send_email_activity's `acknowledgeExpiringImages` takes its URL when the user chooses to send it as it is. A format refusal carries `retryable:false`, meaning a repeat of the call fails the same way; only `retryable:true` is worth one retry. The URL must be publicly reachable, because Apsis fetches it from its own network: anything behind a login, on the user's own machine, in your sandbox, or a `data:`/`file:` URL cannot be hosted this way — use create_email_image_upload for those. Never put credentials in the URL (`https://user:pass@host/…`): that is refused outright rather than forwarded to the far host, so strip them if the image is public, or use the upload route if it genuinely needs a login.
host_email_images_from_url
In development: may change. Plans a Marketing Automation flow from a spec and creates nothing: pass `account` (from list_accounts), `section` (from list_sections; omit it and a sole section is used silently, while several come back as `kind:"choose-section"` to pick from) and `spec`. If the user hasn't named a subscription, ask which subscription the flow uses before planning; never pick one silently, and don't pick one and then ask whether to change it. The result is `{ willCreate, sameTrigger, sameTriggerComplete, planToken, note }`, with `emailsToWrite`, `checked` and `warnings` when they apply. The token is bound to the account, the section, the caller and the whole plan, and it expires in 1 hour. The spec holds `name`, `goal` and `goalBy` (`marketer`, or `assistant` for a summary the AI assistant wrote, which is stored with a line saying so), `entryLimit` (`"unlimited"`, or `times` 1 to 5 with an optional `within` time frame), `subscriptions` (one or more `subscriptionId`s from describe_flow_target, all from one folder; required when the flow sends an email and refused when it doesn't; `subscription`, one id, is deprecated and still accepted), an optional `timeZone` (the user's own zone when omitted), one `trigger` and the `steps`. Its schema is the whole vocabulary: a property it doesn't list is refused. A trigger is an `event` (with an optional text `filter` on one property and up to 10 forms or emails as `scope`), a `segment` (profiles in any of the `include` segments and none of the `exclude` ones, on a `daily`, `weekly` or `monthly` schedule at a local half-hour) or a `date` (a date attribute, on the day or an `offset` before or after, at a local half-hour). A step is a `wait` (`for` a time, `until` a time on weekdays, or `within` windows), an `email` (an email or automated email in the section by `activityId`, or a `brief` of at most 255 characters for one still to be written), an `update` (set or clear a text attribute), an `end` (with `points`) or a `check` (on an event, a text property or a segment, with a `no` and a `yes` list of steps). Steps are numbered in order, a check's `no` branch before its `yes` branch, and a path that doesn't end in an end gets one. A check ends its list, and paths never join. A check's scope may hold `{step: n}`, an email step earlier on the same path that has an `activityId`, which stands for the automated email that step sends. In the spec, leave `timeZone` out unless the user names a zone: the flow then runs in the marketer's own time zone, `willCreate.timeZone` says which zone the flow runs in, and if their wording suggests another zone, ask. An Email step sends only automated emails. If the user asks for an email for it without saying which, ask before making one: a newsletter they already have is copied into a new automated email for the flow, an automated email in no flow is used as it is, or a new automated email is written for it. A Listen step that waits on an email may name up to 10 existing emails of either kind, or none for all emails; they aren't copied into the flow. An email in an `email` step has to be one Apsis InVega made. An automated email that is in no flow is used as it is, and it has to be set up for exactly the flow's subscriptions; any other email, a newsletter or an automated email already in a flow, is copied into a new automated email for this flow, so no email is ever shared between steps or flows. One email can't be in two steps. `willCreate` says per step which of the two a step gets. Text comparisons (`is`, `contains`, `starts with`, `ends with`) ignore capitals, and negation isn't available here: a check's `no` branch is how "not" is written. A flow holds at most 10 email steps and 100 steps in all, Ends included. Scheduled times are local to the flow's time zone and are stored in UTC, with the days moved when that crosses midnight; waits stay local. Not available here: text messages and other channels, splits and A/B, goals, waiting for an event, waiting until a date, more than one trigger, webhooks, checks on number, date or yes/no properties, and updating a date property. `willCreate` names what would be created in the user's words: the trigger, the numbered steps with a check's branches indented, the settings and, for a schedule, the timing. `sameTrigger` lists flows in the section, deleted ones included, that start for the same profiles, each with `match` `identical` or `overlapping` (same event with another filter, a shared segment, the same segments on another schedule, the same date attribute with another offset), its `status` and `goal`; `sameTriggerComplete:false`, with `checked` when there is a count, says not every flow could be read: time ran out, a read failed, or the list may be cut off. `emailsToWrite` lists the steps that have only a `brief`, which a created flow keeps as empty email steps. `warnings` carry what the plan found worth knowing. Every problem is returned in one refusal, by step where it has one. The account needs the Marketing Automation licence, and the email and update steps their own licences.
plan_flow
In development: may change. Plans a form from a spec and creates nothing: pass `account` (from list_accounts), `section` (from list_sections; omit it and a sole section is used silently, while several come back as `kind:"choose-section"` to pick from) and `spec`. The result is `{ willCreate, planToken, note }`. The token is bound to the account, the section, the caller and the whole spec, look included, and it expires in 1 hour. The spec holds `name`, `lang` (a two-letter code), `identifier` (`email` by default, or `mobile`) and an optional `identifierLabel` (that field's label, written in `lang`; without it, the attribute's name), the `items` stacked top to bottom in a single column, `consent`, `hiddenFields`, `submitLabel`, `profilePolicy`, `success`, `messages` and an optional `look`. Its schema is the whole vocabulary: a property it doesn't list is refused. An item is a `field`, `text`, `image`, `spacer`, `line` or the `consent` placement. A field has a `label`, a `fieldKind` (text, email, phone, number, date, textarea, dropdown, radio or checkbox), `required`, and an `attribute` discriminator from describe_form_target to fill; without `attribute` the answer is kept with the submission only. Which kinds an attribute can fill is in describe_form_target's `fieldKinds`. Options are shown and stored as written. A checkbox on a true-or-false attribute is a single tick, where an unticked box stays empty and never sets false; a checkbox with options is a group, whose ticks are stored joined with a comma. The identifier field is added by the server, required, and takes the first place before the first field. `consent` names subscriptions, all from one folder, and `consent.folder` (the folder's name or its `folderId`) says which folder when a name is in more than one; each subscription is its own tick, worded by its entry in `subscriptionTexts` (keyed by subscription name), else by `consent.text` when it is the only one, else by its name, with an optional `heading` above the ticks; the consent element sits where the `consent` item is, and last without one. `look` is one shared look: page and card colours, width 320 to 1500, border and corners, field font, size, colours, border and label position, and the button; colours are `#rrggbb` and fonts come from the list in the schema. A form holds at most 20 fields and 30 items; over that the plan is refused and splitting the form in two is the route. Columns, `html` blocks, background images and the page's heading and paragraph text styles are not available yet. `willCreate` names the section by display name and lists the layout in order, with each field's planned `key`, what it fills, the consent folder, subscriptions and the wording of each tick, the profile policy, what happens after a submit, the look in plain words and `notes` on consequences. `willCreate.lookKeys.dropped` lists each look key an element has no property for, as `{ element, key, reason }`: a dropdown, radio group, checkbox or consent tick takes no `radius` and no border width, and each drop is also said in a sentence in `look`. A spec with no look carries a note that the editor's plain defaults will be used. `existingWithSameName`, inside it, lists a form in the section with the same name, as information only. Every problem is returned in one refusal. Subscriptions from two folders are refused, with two forms as the route. An `image` item's address is classified as an email's images are: an address at Apsis is hosted, any other site is an outside image, and a link that expires (signature or token parameters) is refused, since a form stays live for months. Nothing is fetched. `willCreate.images` is `{ remoteHosts, expiring, unreachable }`, and when `remoteHosts` is not empty the first of `notes` is an offer to host those images at Apsis, written for the user. An outside image is hosted with host_email_images_from_url, or brought from the user's disk with create_email_image_uploads and finalize_email_image_uploads, which serve forms as well as emails; the plan is then made again with the hosted addresses, and create_form writes a hosted image with its gallery id. The account needs the Forms licence: without it the call is refused before anything is read. A user who lacks the right to work with forms is refused when the section's forms are read.
plan_form
Plans a draft email from custom HTML and creates nothing. The result is `{ willCreate, planToken, note }`, and create_email_activity creates the draft only from that `planToken`. The token is bound to the account, the section and the exact content, and it expires in 1 hour. The binding covers `subject`, `preheader`, `html`, `section` and `trackLinks`, and a create differing in any of the five is refused — omitting `trackLinks` means true, and a `preheader` the plan echoed has to be passed back with it. With `automated: { subscriptions }` the plan is for an automated email, the kind a flow step sends, and the binding covers `automated` too: a plan for an email sent to an audience cannot create an automated email, nor the other way round. Each subscription has to be one of the section's, all from one folder, as list_subscriptions lists them, and `willCreate.automated` names them. With `automated.flowId` and `automated.nodeId` too, the plan is for that empty Email step of a flow InVega made, a draft, paused or stopped one, and `willCreate.automated.step` names the flow and the step; the binding covers the step, so a plan for one step cannot create into another. The subject and the preheader — the preview text shown after the subject in a recipient's inbox list — are the user's choice, and both stay editable on the draft afterwards through edit_email_activity. An email without a preheader shows whatever the mail client scrapes from the top of the body, usually the View-in-browser footer. `willCreate` names the account and the section by display name where the platform has one and by bare id where it does not, alongside the subject, the link-tracking decision, the links that would be wired and the data tags it validated. The section is fixed at creation, since edit_email_activity cannot move a draft and duplicate_email_activity takes no section, and there is no delete or archive tool, so a draft created in the wrong section stays there. `existingWithSameSubject` on the result lists any other email of the same kind as this plan in the target section (an email for a plan without `automated`, an automated email for one with it) whose subject matches, case- and whitespace-folded, each entry carrying `activityId`, `subject`, `createdAt`, `state` and `isEngineManaged`; it is absent when nothing matched. Matching subjects are common and legitimate — a monthly newsletter, an annual campaign, an A/B pair — so a match never blocks a create and adds nothing to the create call. What a match's `state` says about it: `draft` with `isEngineManaged:true` is an assistant-authored draft that edit_email_activity can still change; `draft` with `isEngineManaged:false` or missing is not assistant-managed and edit_email_activity refuses an HTML change on it, though a compatibility fallback can leave a draft the assistant created unstamped, so the flag means the draft is uneditable rather than that Apsis One authored it. A `sent` activity cannot send again, and duplicate_email_activity clones one preserving its `##…##` personalisation where rebuilding from HTML loses it. `scheduled` means a send is booked and has not gone out; cancel_scheduled_send is the only way to change or call it off, and duplicating leaves the original booked, so both would go out. `paused` is usually an activity held in Apsis One rather than a booked send that was paused, and cancel_scheduled_send releases it. `state` is a free-form string, so this list is not exhaustive: other values, among them `queued`, `processing` and `exporting` and any the platform adds later, mean sending is already under way. The send, copy and cancel remedies above apply to a match that is an `email`: a match that is an `automated_email` is sent by its flow: send_email_activity activates it instead of sending it, and cancel_scheduled_send and duplicate_email_activity refuse it. In every non-`sent`, non-`draft` case a new activity created alongside the match does not replace it — the match stays booked and both would go out. Returns `{ willCreate: { account, accountName?, section, sectionName?, subject, preheader?, trackLinks, links, dataTags, existingWithSameSubject? }, planToken, note }`, where `links` has no ids because no links exist yet.
plan_email_activity
In development: may change. Makes a link to a page that draws a Marketing Automation flow, for the user to open. Takes either `flowId` (a flow that exists, from list_flows) or `spec` with the `planToken` plan_flow returned (a flow that is only planned), plus `account` and `section`; not both and not neither. A created flow's link works for 24 hours and the result carries a `gateToken` for the graph that was drawn, which set_flow_status needs to activate or resume that flow. A plan's link works until its `planToken` expires, has no `gateToken`, and shows a plan, not a created flow; a step whose email is still to be written (`brief`) is drawn as such. A spec that doesn't match its `planToken` is refused. Emails past the first 20 in a flow are drawn as "an automated email", without their name. Returns `{ previewUrl, expiresAt, gateToken?, note }`. Nothing in Marketing Automation or the account is changed. The account needs the Marketing Automation licence, and the environment needs flow previews switched on.
preview_flow
In development: may change. Shows one form: pass `account` (from list_accounts), `section` (from list_sections; omit it and a sole section is used silently, while several come back as `kind:"choose-section"` to pick from) and `formId` (from list_forms). Any form in the section works, whatever its status, a deleted one included; a form in another section is not found. The result is `{ formId, name, status, previewUrl?, summary, note, account }`. `previewUrl` opens the form's latest draft content in a browser: it needs JavaScript and no sign-in, and its submit button does nothing, so a submission through it does not count. `summary` is built from the form itself, so it describes a form built elsewhere as well as one built here: `fields` (each with its `key`, the name edit_form keeps it by, its label, what it fills in, or that the answer is stored on the submission only, and whether it is required), `hiddenValues` (each with its `name`, which is its key for edit_form, its value and what it fills in, or that it is stored on the submission only), `identifier` (email, mobile or none), `subscriptions` (one entry per consent tick: the subscriptions it offers, their folder, the consent text as written, and whether that tick is required), `consentChannels` (with `subscriptions`: the channels the consent is given on, such as email or text message), `manageConsents` (present only when the form removes the subscriptions a visitor leaves unticked), `profilePolicy`, `afterSubmit`, and `other`, the element types the summary does not describe, listed and never skipped. `summary.look` is the styling the form stores, in the vocabulary of a spec's `look`: `page`, `fields` and `button`, each with the keys that are stored. The editor stores its own defaults for what a look leaves out, and they differ by element type, so a key the elements disagree on reads `"varies"`. It states what is saved, not how the form renders: the preview is how it looks. The account needs the Forms licence: without it the call is refused before anything is read. A user who lacks the right to work with forms is refused when the form is read.
preview_form
Produces a link to the email as it will really render, for the user to look at. Returns `previewUrl` — Apsis's own page showing the real, fully rendered email — plus a `reviewToken` and the email's `type` (`email` or `automated_email`). The user sees the email by opening that link, and what they see there is the email a send would deliver. A link in this result is in front of the user only once it is in the reply. It follows creating or editing a draft in the same turn: the preview is how the user sees what was built, and asking "shall I preview it?" first is a question whose answer is always yes. It changes nothing, and the result is small — a link rather than the HTML — though the call itself still fetches the premailed render upstream every time, because the review token's hash is computed from it. The user cannot review an email they have not been shown, so asking first only costs them a round trip. A description, summary or re-rendering of the email as text, markdown or ASCII is not a preview of it: what a send needs reviewed is the actual email. The page needs no login, works on an unsent draft, shows merge tokens as placeholders (e.g. `<<First Name>>`) rather than anyone's real data, and one link stays valid across later edits. Pass `inline: true` only when you need the raw HTML yourself — your client can render HTML in the conversation, or you want to check your own work — because it costs several thousand tokens per call. Pass an activityId from create_email_activity and the `account` it was created in (`account` is optional — omit only if the user has a single account; with several, omitting is refused). The `reviewToken` is evidence that a preview was fetched for this content, and that is the limit of what it can certify: it cannot show whether the link was ever handed over or opened. Calling this tool costs nothing and is never the wrong move. If this environment has no hosted preview page, or no link can be made for this caller, the HTML is returned instead and there is no link, so this result gives the user nothing to open.
preview_email_activity
In development: may change. Publishes a form so it collects submissions at its public address, in two steps. Pass `account` (from list_accounts), `section` (from list_sections; omit it and a sole section is used silently), `formId` (from list_forms), and for the second step `confirm` and `confirmToken`. A draft, a live form (publishing again puts its latest content live) and a taken-down form can be published, whether it was built here or elsewhere. A deleted form is refused. A form needs a saved "what happens after someone submits", and one without it is refused. Publishing is the only way a form goes live. The first call, without `confirm`, publishes nothing. It runs the form editor's own check, and a problem comes back as `{ valid:false, problems, note }` in plain words, with no token. Otherwise it makes the attributes the form fills writable, without a question to the user, and returns `{ submissionVersion, submissionNote?, confirmed:false, willPublish:{ formId, name, status, summary }, confirmToken, note, account }`. Running the check can drop a field entry whose element was deleted from the form. `submissionVersion` leads the result and says what publishing does to the Audience event the form's submissions are written to: `first` (the form has no submit event yet; submissions will be recorded as `Submit <form name>`), `unchanged`, `changes` (the field set differs from the event's current version, so segments built on this form's submissions and automation flows it triggers are affected, as `submissionNote` says), or `unknown` (the event could not be read; the token is still issued, and `submissionNote` says the check could not be made). `willPublish.summary` is the form's own summary, as in preview_form. The token binds the form, the caller and what the summary describes: the form's status, its fields with their mapping, labels and rules, the consent and its text, the stored after-submit behaviour, the profile policy and Manage consents. Styling is not part of it. It expires in 1 hour. The second call, with `confirm:true` and the token, is checked before the form is read, then re-reads the form and refuses, publishing nothing, when what the summary described has changed since. Otherwise it publishes the form's latest content and changes none of its options: Manage consents and every other stored setting stay as they are. It returns `{ confirmed:true, formId, status:"live", hostedUrl?, note, account }`. A call from a client that does not know about `confirm` gets the first-call answer and publishes nothing. The account needs the Forms licence: without it the call is refused before anything is read.
publish_form
Finalize an image uploaded via create_email_image_upload: the gallery validates, decodes, and registers the object, then returns its public URL. Call it once the user says the upload page reported success — the upload happens in their browser, so there is no status code here for you to wait on. Pass the `upload_id` from create_email_image_upload and the same `account` (carry it across your calls; omit only if the user has a single account). Returns `{ imageUrl, width, height, account }` — put `imageUrl` into an `<img src="...">` in the HTML you pass to create_email_activity (the HTML is stored verbatim), or, for a form, into the `url` of an `image` item in plan_form. **Every call is a write, not a check.** There is no read-only readiness endpoint for images, so this is also the only way to find out whether the object landed — but that means a repeat is a repeated registration attempt rather than a poll. A not-found cannot tell "not uploaded yet" apart from "expired or never landed": a missing object is a missing object. So at most one repeat is worth attempting in the same turn, and only after a not-found. A second not-found still cannot tell a file that never landed from a link that expired, which only the user can settle, from whether the upload page said "File uploaded", and a fresh link is what replaces an expired one (`expiresInSeconds`, when the presign reported one, indicates which is likelier). Any other failure — a timeout, an authorization error, a format or size refusal, or a server error — carries its own reason, and a new upload does not fix those. Do not loop.
finalize_email_image_upload
Finalize a whole set of images uploaded via create_email_image_uploads — use this instead of calling finalize_email_image_upload once per image, so one bad image cannot cost the user the good ones. Pass every `upload_id` from create_email_image_uploads, in the same order create returned them, and the same `account` (carry it across your calls; omit only if the user has a single account). `results` comes back in exactly the order you passed the ids, so it lines up with the slot labels the user was told to pick in — and every entry also names its own `upload_id`, so pair by that rather than by position whenever you are unsure. Each id is finalized independently: a failure is recorded against that slot and the rest still proceed. Returns `{ results:[{ upload_id, ok, imageUrl?, width?, height?, error? }], finalized, failed, account }`. Put each successful `imageUrl` into an `<img src="...">` in the HTML you pass to create_email_activity (the HTML is stored verbatim), or, for a form, into the `url` of an `image` item in plan_form; what the user needs to know about a failed image is which one and why — a format refusal needs a different file, not a retry. **Each slot is a write, not a check** — there is no read-only readiness endpoint, so finding out whether an object landed and registering it are the same call, and a repeat re-attempts the registration rather than polling. Only a not-found is worth one repeat, and only for the slots that reported it. It is a tool error only when every slot failed. The upload is the user's to perform: the link goes to them, they pick the file, and their own browser sends it straight to storage, so the bytes never pass through this server, the model's context or its sandbox. Only the final message of a turn is reliably visible. Chat clients collapse a turn's intermediate steps behind a summary ("Worked for 48s"), so anything said in an earlier message of the same turn is likely never read — which is why a conversion that was performed, which file belongs in which slot, and any question still outstanding all belong beside the link rather than before it. Supported formats are PNG, JPEG and GIF. Each upload slot is signed for one type and cannot be changed once minted, so the format has to be settled before a link exists. Emails need those three anyway: WebP and AVIF do not render in Outlook. `content_type` follows the file name: .png is image/png, .jpg and .jpeg are image/jpeg, .gif is image/gif. The unsupported formats are .webp, .avif, .heic, .bmp, .tiff and .svg. A link signed for image/jpeg carrying WebP bytes is accepted by storage and then refused at finalize, which costs the user the whole trip. Converting such a file to PNG or JPEG is local work and needs no network. The disguised case matters as much: a file named .jpg can still hold WebP bytes, which is what saving from Google Images produces, and the upload page checks the bytes, so a format mismatch it reports is authoritative over the file name. The size limit is 5 MB, enforced by the signed upload policy rather than by this server, so an over-size file cannot be uploaded at all and storage refuses it with an error the user cannot act on. A phone photo is usually over it. Emails also load faster with smaller images, so around 1200px wide is a sensible target. For several local images, create_email_image_uploads presigns the whole set and returns one link, so the user visits a single page and picks every file there. Pick order is what pairs the files to the slots, and the link message spells that order out, so `images` goes in the order the files should be picked. One link per image is the fallback where that tool is unavailable. The bytes are not needed. A copy attached to the chat can be read for alt text, but an attachment is not the upload — only the link uploads. An attachment says nothing about the format. What is shown is a picture, not the file the user will pick: its real bytes and its name are both invisible, so seeing an image is not evidence that it is a PNG or a JPEG. Attachments in a chat are frequently WebP, which is the case that most often ends in a refused upload. What resolves it is the format each file actually is, or the format each slot was signed for, stated in the same message as the link, where the user can correct it before uploading. A web image does not need uploading: any `http(s)` image is accepted as it stands, so it can go into the email with its own URL and give the user a finished, previewable email immediately. Hosting it at Apsis is an improvement rather than a precondition, and the reason is that Apsis cannot control another site — the image may be blocked or changed after the send, and each open tells that site who the recipients are. Plain `http` is accepted here, but many mail clients block or warn on it, so an `http`-only image is worth hosting rather than merely offering to host. The link message already contains the ordered list with each slot's format, so restating it in other words can only contradict or lose it. (Observed: an assistant-written "choose these in this order: , , , ." that rendered four commas and no names.) What it cannot know is the part worth adding — which converted file goes with which slot. A slot carrying neither a `label` nor a `source_url` asks the user to find a file they cannot identify. Where the image was the model's choice — found on the web, or generated — the user has nothing to pick until they can get it, and `source_url` on that slot is what puts the download location into the link message. A generated image still cannot be uploaded by the model. It has to reach somewhere the user can get at — a path they can open, on a client running on their own machine, or a download, on a hosted one — and then an upload link for that. A sandbox path, a `file://` URL or a `data:` URI in the HTML renders broken for every recipient. Finalizing is one call to finalize_email_image_uploads with every `upload_id` for a set, or finalize_email_image_upload for a single image. Every `upload_id` is already held once the create has returned, so calling create again mints a second link, sends the user back to the browser to upload the same files twice, and orphans the first set. finalize_email_image_uploads finalizes every id even where one of them fails, and reports `finalized` and `failed` counts, so one bad image does not cost the user the good ones. A finalize is worth retrying only on not-found, once, in the same turn, because a missing object cannot be told apart from one that never landed. A format or size refusal fails identically on a second call, the bytes being unchanged. On not-found twice, what the upload page said — "File uploaded" or not — is what separates the two cases, and a fresh link is the way forward. An expired link has no refresh: create_email_image_upload again. Once finalize returns `imageUrl`, that URL goes into an `<img src="...">` in the HTML passed to create_email_activity, which stores it verbatim.
finalize_email_image_uploads
In development: may change. Puts an automated email on one Email step of a flow InVega made, which is then the email that step sends: pass `flowId` (from list_flows), the step's `nodeId` (as get_flow shows it), the email's `activityId` (list_email_activities, `type: "automated_email"`), and `account` and `section` as for the other flow tools. The flow is a draft, paused or stopped; the step may be empty or hold another email, which it then no longer sends. An empty step is then titled "Email" in place of the brief it kept as its name; a filled step keeps its title. The email is an automated email the assistant created, a draft or active, used by no flow yet, and for the same subscriptions as the flow. Anything else is refused before anything is written. A call without `confirm` writes nothing and returns `{ confirmed:false, flowId, flowName, step:{ nodeId }, willAttach:{ activityId, name }, replacing?, confirmToken, note }`, where `replacing` names the email the step holds now and `leftInNoFlow:true` says no flow uses it once replaced. The same call with `confirm:true` and that token makes the change and returns `{ confirmed:true, flowId, flowName, step, attached, replaced?, note }`. A step that already holds the email answers `alreadyAttached:true` and changes nothing. The confirmToken is bound to the flow's status and last update and to the email the step holds, so a flow or step that changed in between is refused and needs a new first call. The flow's status and the email's state are never changed: in a paused flow, people waiting before the step get the email it now holds when the flow resumes. The account needs the Marketing Automation licence with its email step.
attach_automated_email
Change a custom attribute's display name. Reach for it when the user wants a field relabelled — a typo, a clearer word, or the term their team actually uses. Pass `account` and `section` (ids from list_accounts / describe_import_target), the `attributeVersionId` of the attribute to rename (from describe_import_target / describe_segment_target, or echoed by create_attribute) and the new `name`. It takes two calls. The first, without `confirm`, reads the attribute, runs the near-duplicate check and writes nothing: it returns `{ confirmed:false, willRename:{ attributeVersionId, previousName, name, section }, confirmToken, note }`, where `note` is written for the user and says what confirming would do and that nothing has been renamed yet. The second, with `confirm:true` and that `confirmToken`, renames. The token is bound to the account, the section and the exact inputs, `renameAnyway` included, and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and renames nothing, and it repeats the reads and the near-duplicate check against the attribute as it is by then. A call from a client that does not know about `confirm` gets the first-call answer and renames nothing. Renaming again changes it back, and nothing else moves: the `attributeVersionId` stays the same, the stored profile values are untouched, and emails already built with the attribute's `##…##` data tag keep rendering, because data tags key on the attribute's internal id rather than its display name. On a confirming call you get `{ renamed:true, attributeVersionId, name, previousName, discriminator, duplicateCheck, note }`. The new name shows up in describe_import_target / describe_segment_target only once the section's cached attribute list expires (up to an hour); the rename itself is immediate, so the old name still listed there for that hour is discovery lag, not a failed rename. `{ renamed:false, reason:"similar-exists", candidates }` is a normal answer, not an error, and carries no token: another attribute already means the same thing (names differing only in case, spaces, dots, dashes or underscores count as the same field), so the rename would leave two fields looking identical — usually the existing attribute, named in `candidates` by its `attributeVersionId`, is the one actually wanted. `renameAnyway: true` makes the first call describe the rename anyway, once both are confirmed as wanted, and the flag is part of what the token is bound to. If `duplicateCheck` comes back `"skipped"`, that check could not run, which the `note` says; on a confirming call the rename happened regardless. Two things are refused outright: a hidden attribute (once an attribute is on its way out, the platform only lets its deprecation time change), and a standard platform attribute like First Name (renaming one would affect every import, segment and email in the section) — the `note` explains which.
rename_attribute
Change a subscription's name. Reach for it when the user wants one relabelled — a typo, a clearer word, or the term their team actually uses. Pass `account` and `section`, the `subscriptionId` (from list_subscriptions) and the new `name`. It takes two calls. The first, without `confirm`, reads the section's folders, runs the near-duplicate check and writes nothing: it returns `{ confirmed:false, willRename:{ subscriptionId, previousName, name, folder?, folderId }, confirmToken, note }`, where `note` is written for the user and says that nothing has been renamed yet. The second, with `confirm:true` and that `confirmToken`, renames. The token is bound to the account, the section and the exact inputs, `renameAnyway` included, and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and renames nothing, and it repeats the checks against the section as it is by then. A call from a client that does not know about `confirm` gets the first-call answer and renames nothing. Renaming again restores the previous name, and nothing else moves: the `subscriptionId` stays the same, the consent already collected is untouched, and any campaign or import already pointing at it keeps working. The new name is visible immediately. On a confirming call you get `{ renamed:true, subscriptionId, name, previousName, folderId, folder?, note }` — `folderId` is the folder it sits in, the same value list_subscriptions reports so the two can be matched up, and `folder` is that folder's name (absent for a subscription that isn't in a folder at all, which list_subscriptions shows under "Top level"). A hidden subscription cannot be renamed, and the refusal says it isn't a subscription in this section rather than naming the real reason. The duplicate check below also skips hidden subscriptions, so a rename can quietly land on a name a hidden one already holds. `{ renamed:false, reason:"similar-exists", candidates }` is a normal answer that carries no token: another subscription in the same folder already has that name — or a near-duplicate of it (case, spacing, dots, dashes and underscores don't count as different) — so the rename would leave two that nobody could tell apart, and the existing one is usually what was meant. The same name in a different folder is allowed and is not refused. `renameAnyway: true` makes the first call describe the rename anyway, once the user has seen the existing one named and confirmed they want both, and the flag is part of what the token is bound to.
rename_subscription
Change a folder's name. Pass `account`, `section`, the `folderId` (from list_subscriptions) and the new `name`. It takes two calls. The first, without `confirm`, reads the section's folders, runs the near-duplicate check and writes nothing: it returns `{ confirmed:false, willRename:{ folderId, previousName, name }, confirmToken, note }`, where `note` is written for the user and says that nothing has been renamed yet. The second, with `confirm:true` and that `confirmToken`, renames. The token is bound to the account, the section and the exact inputs, `renameAnyway` included, and expires in 1 hour; a confirming call with a missing, expired or altered token is refused and renames nothing, and it repeats the checks against the section as it is by then. A call from a client that does not know about `confirm` gets the first-call answer and renames nothing. Renaming again restores the previous name; the subscriptions in the folder are untouched, keep their ids and their consent, and the new name shows immediately. The section's "Top level" is not a folder and cannot be renamed. On a confirming call you get `{ renamed:true, folderId, name, previousName, note }`. `{ renamed:false, reason:"similar-exists", candidates }` is a normal answer that carries no token: another folder in this section already has that name — or a near-duplicate of it (case, spacing, dots, dashes and underscores don't count as different) — so two folders that look identical would be indistinguishable when filing a subscription, and the existing one is usually what was meant. `renameAnyway: true` makes the first call describe the rename anyway, once the user has seen the existing one named and confirmed they want both, and the flag is part of what the token is bound to.
rename_subscription_folder
Save an audience as a persisted, reusable dynamic segment — a named filter that re-evaluates the matching profiles each time it is used and can be targeted by future sends. This is a deliberate, non-default action, not something to reach for automatically: the conditions you have already built are usable in this conversation as-is (most requests only need count_profiles), so saving only earns its keep when the marketer will want the same group again later or over time — e.g. reusing it across future campaigns, keeping it as an exclude / do-not-contact list, showing different content to different groups, or tracking how the group grows or shrinks. A one-off send does not justify a save (a send can run against the audience you just built), so "I want to send to them" alone is not a reason to persist. The word "segment" colloquially often means only "show me these people now", so it is not on its own a request to persist anything — which is why keep-versus-look-now is a distinct question, and why an explicit request to save a reusable segment settles it. A segment whose conditions are byte-identical to an existing one's is refused rather than created — the existing segment is named (in plain language, with its id) and nothing is saved; pass `createAnyway: true` to save it anyway. A segment that merely shares its name with an existing one, but has different conditions, is not refused: it is created, and the look-alike is named back to you in `similarByName` so you can flag it to the marketer. For a new campaign, prefer creating a new segment over reshaping an existing one to fit: a segment is a live filter, so editing it also changes who anything already using it reaches (fine when that's what they want — see edit_segment — but it isn't what "I need this audience for this campaign" usually means). `name` is what the marketer will recognise the segment by later, so a name for the people it captures (e.g. "VIP customers — Sweden") is the one that works; the identifier is generated and managed automatically, and the built conditions are validated before persisting. Returns the new segment's id and a plain-language `audienceDescription` of what was saved, already rendered in the marketer's own words, and re-describing the conditions instead throws that rendering away. `audienceDescription` is absent when it could not be rendered, which leaves plain words of the caller's own — with no operators, parentheses or comparison symbols. This tool's result is for relaying to a non-technical marketer: what reaches them, whether it is `audienceDescription` verbatim or wording of your own, contains no operators, parentheses, comparison symbols (>, <, =, ≠, !=), field types or precedence rules. **A saved segment cannot be deleted** — hiding it is the only way to remove it from view — so a segment created by mistake is permanent. And an error from this tool is not reliable evidence that nothing was created: saving is two steps, the segment then the filing that makes it visible, and a failure in the second leaves a real segment that no listing can see — list_segments reads the filing, which is the step that failed. **So an empty list_segments result is inconclusive here, not an all-clear**, and there is no reconciliation path: retrying can leave two real segments, one of them invisible. So after an error, whether to retry is the user's decision: a silent retry is exactly how the second, invisible segment appears. A saved segment can also be used to narrow an email's audience (see send_email_activity's `segments` parameter), on top of the chosen subscriptions. A segment has at least one condition: an `aql` with none is refused, and everyone in a section is listed or exported rather than saved.
create_segment
The consent history for one person — every reliably-known change plus the guaranteed-correct current state, per subscription and channel. Evidential: use it to answer "can we prove this person opted in, and when?", in a form pasteable into a reply to a complaint or a regulator query. Pass `profileRef` (from lookup_profile: the profile's reference, carried verbatim), `account`, and `section`. The result's first text block is written for the user: a ready-to-paste consent timeline — every subscription and channel in date order, the current state of each marked '(current)', gaps in the record stated above the table. A summary loses those markers and gaps. The second block is the same data as JSON `{ completeness, timeline[], currentState[], history[], note?, timezone, window, section, account }` for follow-up questions; `timeline[]` merges `currentState[]` (the guaranteed-correct latest state, `guaranteed:true`) and `history[]` (reliably-known prior changes, ascending), and each row states whether it is the current state. Read `completeness.allHistoryKnown` and `completeness.pairsWithNoHistory[].why` before presenting history as complete, and pass `state:null` / `originKnown:false` through honestly rather than guessing a label. This tool is read-only. It never changes anyone's consent. No tool on this server changes a person's consent. The routes that exist are the recipient's own unsubscribe link and an opt-in through a subscribing import (create_import's `subscriptions`), and some customers use Apsis InVega without access to the Apsis One interface.
get_consent_timeline
Every event and activity recorded against one person in a section — email opens/clicks/bounces, imports, consent changes, and campaign sends among them — with a per-type summary over everything found plus the most recent slice. Reach for it when the user asks what happened to someone, or wants a specific interaction confirmed ("did she open the June newsletter?"). Pass `profileRef` (from lookup_profile: the profile's reference, normally its export key, carried verbatim), `account`, and `section`. Returns `{ available:true, completeness, coveredFrom, coveredTo, eventsFound, eventsReturned, partial, summary:[{typeId,typeName,count}], events:[{...,typeName,activityName?}], note, account, section }`, or `{ available:false, reason, note, resumeUrl?, eventsUnreadable?, account, section }`. `available:false` is a normal answer, never an error. `still-processing`: the export isn't ready yet. Its `resumeUrl`, when present, is a signed handle valid for 30 minutes; passed back as the `resumeUrl` argument on the next call, it keeps polling that same export rather than starting over. `too-large`: too much history to summarise right now — there is no link to fetch it another way. `no-events`: nothing was recorded (or nothing in the `since`/`until` window you asked for). `events-unreadable`: entries exist but no readable ones are left to show, either because none could be read or because the readable ones fall outside the `since`/`until` window; `eventsUnreadable` says how many could not be read, and this is not an absence of activity. `export-unavailable`: try again shortly. `busy`: the account has too many exports running; try again shortly (there is no `resumeUrl`, because no export was started). An account prepares at most 3 histories at once; further calls wait their turn, so a few at a time is faster than all at once. `completeness.allEventsRead:false` means some entries in the person's log could not be read and are absent from every count and from `events[]`; `completeness.eventsUnreadable` says how many. That figure covers the whole section regardless of `since`/`until`, because an unreadable entry usually has no usable time, so it may or may not fall in the window. `completeness` is the first field after `available`, and `eventsUnreadable` appears only when it is above zero. `coveredFrom`/`coveredTo`/`eventsFound`/`summary` always describe everything found (or everything within `since`/`until`, when given) — never just the returned slice. `partial:true` on the success shape means `limit` cut the returned rows short of `eventsFound`; that is unrelated to `too-large`, which means the export itself couldn't be read in full. Every event's `typeName`, and `activityName` when present, are already resolved to human-readable names — never a bare id. `typeName` always has a value; `activityName` only appears for events tied to a specific campaign. Either can degrade to showing the raw id when a name can't be resolved — the event is still present and still happened; only its label is unresolved. `limit` bounds how many of the most-recent events come back in `events[]` (default 20, max 200) — raise it only when the user actually wants to see more rows, not to try to read everything at once. `since`/`until` (ISO-8601, with an explicit offset or `Z` — no bare local time) narrow the whole answer to a window, for when the user is asking about a specific period rather than the full history.
get_profile_history
Read-only send report (statistics) for one email activity. Pass `activityId` (from create_email_activity / send_email_activity / list_email_activities) and the `account` it lives in (`account` is optional — omit only if the user has a single account; with several, omitting is refused). Returns { activityId, type, account, state, subject, report, note? }, where `type` is `email` or `automated_email`, as list_email_activities gives it. A report only exists once sending has started: the reportable states are `sent`, `active` and `paused`. For anything else — a draft, a `scheduled`/`queued`/`processing`/`exporting` activity, or any state this list does not name — `report` is null and a `note` comes back. Read the `state`, not just the note: `state` is free-form upstream, and the note of an `email` is worded for the pre-send case ("send it first"; the note of an `automated_email` says it has a report once it is active, which for a draft the assistant created send_email_activity does), so for an activity that is past sending without being reportable it will read as advice that does not apply. In that case `state` is what says where the activity actually is. Either way there are no statistics yet, so a zero would be an invented figure, not a result. For a reportable activity, `report` is the statistics object: absolute counts `sent, uniqueSent, delivered, normalizedDelivered, open, uniqueOpen, click, uniqueClick, bounce, uniqueBounce, unsubscribe, uniqueUnsubscribe, abuse (= spam complaints)` plus their `*Rate` fields. Every `*Rate` (deliveryRate, openRate, clickRate, clickToOpenRate, bounceRate, unsubscribeRate, abuseRate) is a fraction in 0..1 — multiply by 100 to show a percentage (e.g. openRate 0.125 → 12.5%). The rates are computed upstream from unique counts: openRate, clickRate and unsubscribeRate over `normalizedDelivered`, clickToOpenRate as uniqueClick over uniqueOpen, bounceRate as uniqueBounce over sent, and deliveryRate as delivered over sent. `normalizedDelivered` is usually equal to `delivered` but can be lower, so a rate recomputed over `delivered` can come out a few percent low. `open` and `click` count every open and click event, so they can exceed the number of people in `uniqueOpen` and `uniqueClick`. `click` and `uniqueClick` cover all of the email's links together; a per-link click figure counts unique people per link. Someone who clicked two links counts once on each, so the per-link figures overlap: their sum can exceed `uniqueClick`, and it is not `click` either. A genuinely-sent activity with an empty audience returns real zeros — that is a valid answer, not an error — and so does an active automated email until its flow has sent it to someone. Mutates nothing.
get_email_activity_report
In development: may change. Show one Marketing Automation flow in full: pass `account` (from list_accounts), `section` (from list_sections; omit it and a sole section is used) and the `flowId` from list_flows. The result has the flow's header (`name`, `status`, `deleted`, `isEngineManaged`, `goal`, `settings`), its `nodes` (each with a `kind`, a plain-words `summary` and `stats`: `entered`, `waiting`, `passedOn`, `exited`, `deleted`; a step InVega can't describe is `kind:"step"` with its `raw` settings), the `connections` between them (with `branch` Yes, No or Split n), `checks` (how many profiles went Yes and No at each check; `approximate:true` when the next step also has other ways in), `totals` (`entered`, `waiting`, `finished`) and the `emails` it sends, which are its automated emails (`activityId`, and `name` and `status` for the first 20). A Listen's `constraints.times` in `raw` is how many times the event must happen before it counts; it is not the entry limit, which is the flow's `settings.profileLimit`. Counts are all-time (`statsScope`), not for a period. `validation` says whether the flow holds together: `valid`, `problems` (each with `node`, `nodeId`, `message` and `fix`; identical ones are collapsed into one with a `count` and the `otherNodeIds` it also hit), `notes` (worth knowing, not blocking), `notChecked` (what could not be checked, and why) and `maCheck` (whether Marketing Automation's own check was merged in). On a flow not built here, `valid` means Marketing Automation would accept it only when `maCheck` is `merged` and `notChecked` is empty; with `maCheck` `unavailable` or anything in `notChecked`, it means no problem was found in what was checked. An email step with no email yet, such as one a flow was saved with for an email still to be written, is drawn as "still to be written" and reported as a `problem`, as is an automated email that is still a draft; create_flow reports the same two gaps as `nextSteps` and calls the new draft valid. preview_flow makes a page that draws this flow, from the same `flowId`. Refused when the flow isn't in that section, is hidden, or isn't a Marketing Automation flow. The account needs the Marketing Automation licence. The flowId comes from list_flows.
get_flow
Returns all of one section's non-deleted email activities, newest first, as { account, section, activitiesInSection, activitiesReturned, activities, truncationRisk?, note? }. Pass `account` and `section` (ids from list_accounts / list_sections) to say which section to read; `account` is optional (omit only if the user has a single account) and so is `section` (omit only when the account has a single one — with several, omitting is refused, naming list_sections). This is also the list `plan_email_activity` compares against before a draft is created, so you can reuse one instead of rebuilding it. `activitiesInSection` counts every live email and automated email before any `state` or `type` filter; `activitiesReturned` is `activities.length` — fewer than `activitiesInSection` with no `state` or `type` filter applied means the client cut the list before you saw all of it. On a very busy section the response can also carry `truncationRisk:true` plus a leading `note` warning it may already be cut off — narrow with `state` and re-list rather than trusting it as complete. Each returned activity only carries `id`/`type`/`name`/`subject`/`state`/`createdAt`/`isEngineManaged`/`sendAt`, and an automated email `flows` too — other fields you may have seen on a single activity (from other tools) are not repeated here. `flows` lists the flows whose Email steps use the automated email, as `{ flowId, name, status }` each, `[]` when none does; it is read once per call, and when that read can't be made `flows` is left off and `note` says so. `type` also says which part of Apsis owns the email: an `email` is the E-mail tool's, an `automated_email` Marketing Automation's, sent by the flows in its `flows`. Each activity carries a `type`: `email` is sent once to an audience, and `automated_email` is sent by a flow's Email step to each person who reaches it. What follows about sending, copying and calling off a send applies to an `email`: an `automated_email` is sent by its flow: send_email_activity activates one instead of sending it, and cancel_scheduled_send and duplicate_email_activity refuse one. `email` is the kind a marketer calls a newsletter or a campaign: `type: "email"` returns all of them. Each activity carries a `state` — `draft` means editable and sendable; `sent` means it has already been sent (an email can't be sent a second time); `scheduled` / `queued` / `processing` / `exporting` / `paused` mean a send is already under way or committed. A `sent` email's content can go out again as a copy: `duplicate_email_activity` makes a fresh draft that keeps the `##…##` personalization (rebuilding it from a preview's HTML does not). A `scheduled` or `paused` one is changed or called off with cancel_scheduled_send instead: a copy leaves the original booked, so both would go out. `state` says whether a send can be proposed at all; send_email_activity refuses `sent`, `scheduled`, `queued`, `processing`, `exporting` and `paused`, and finding that out here is cheaper than after building the send. Each activity also carries `isEngineManaged` — `true` only for emails the assistant itself created. You can edit the HTML of an `isEngineManaged:true` draft with edit_email_activity; for any other activity (created in Apsis One) the content is view-only to the assistant (edit_email_activity refuses an html change) though you can still preview, test-send, duplicate and send it. Treat missing/false as not engine-managed. A draft cannot be deleted here; an unwanted one can be renamed through its subject and left unsent, since edit_email_activity changes the subject of any draft. Pass `type` or `state` to narrow the list, and both apply together. `state:"scheduled"` is how you find booked sends, so you can name one back to the user and call it off with `cancel_scheduled_send`. This tool is now section-scoped, so if you don't already have a section in hand for a "cancel the campaign" style request, sweep: call list_sections, then call this tool with `state:"scheduled"` for each section in turn, until you find the booked send. Filtered `"scheduled"` results are ordered by send time, soonest first. An activity with a booked send also carries `sendAt:{ instant, local, timezone }`. The local time and the zone are the pair a user can check; the raw instant is not, so someone picturing a different timezone has no way to catch a mistake in it. If a filter matches nothing you get an empty list plus a `note` naming the types and states that are present; re-aim on that rather than telling the user the section is empty.
list_email_activities
List the account's profile imports — use it to find an import whose id is no longer at hand (a previous conversation, or context no longer held), and to explain a refused create_import. Pass `account` to choose the account; omit `section` to sweep the account's sections (up to 20 — any beyond that come back named in `sectionsSkipped`), or pass one to narrow to it. Passing a `section` explicitly also skips the sections lookup, so it still works when that lookup is failing. Sweeping is the default because the platform's concurrent-import limit is per account and counted across all sections — the import blocking a new one may sit in a section nobody mentioned. `activeCount` is how many of the imports returned count toward that limit; it is a lower bound whenever `sectionsUnavailable` or `sectionsSkipped` is non-empty, since an import in an unread or unswept section is not counted. Each row carries `{ importId, section, fileName, status, createdAt, ageMinutes, total, successful, unsuccessful, updated, skipped, awaitingUpload, countsTowardActiveLimit, cancellable }`. `awaitingUpload:true` means the file has not landed yet — usually the link was never opened or the upload failed silently, though it is also the state while an upload is genuinely in flight, and nothing in the row tells those apart: an upload can begin at any point before the link lapses, so a large `ageMinutes` is not evidence the link was abandoned; an abandoned one frees its slot by itself when the link lapses after about an hour, and uploading or cancelling frees it sooner. `countsTowardActiveLimit:false` means this import is not why a create was refused (a `queued` import never counts, and neither does one started in the Apsis One interface — only imports made through the API do). `cancellable:false` means the import has reached a terminal state — finished, failed, already cancelled or expired — so there is nothing left to stop; calling cancel_import on one is not an error, since an already-cancelled import answers `alreadyCancelled:true` and one that finished, failed or expired answers `not_cancelled` with a reason. By default this returns every unfinished import plus a few recent finished ones per section; pass `includeCompleted:true` for the fuller history. `sectionsUnavailable` lists sections whose imports could not be read, distinct from a section genuinely having none; `sectionsSkipped`, when present, means the account has more sections than one sweep covers. `ageMinutes` counts the minutes since the import was created, not since it entered its current status, so an import that spent an hour uploading and has just started processing reads about 60.
list_imports
List existing segments in your account, so you can reuse one instead of rebuilding it. The listing is **account-wide and `section` does not narrow it** — pass one and it is echoed back but not applied, so a segment listed here may belong to a different section. Omit `section` and the account's sections come back for you to pick from instead of any segments, unless there is exactly one, which is selected silently. An account with **no** sections returns that same empty choice, which is a dead end rather than a prompt: there is no section id to use and nothing for the user to choose from. By default only visible segments are returned. Set `include_hidden: true` to also return hidden segments — each result then carries a `hidden` flag — which is how you find a hidden segment the marketer wants back before unhiding it with set_segment_visibility. Each result carries only a segment's `segmentId`, `name`, and (when requested) `hidden` — not its conditions. The listing gives you a segment's name and id, and **describing who a segment saved earlier actually targets is not something this tool does**; describe_segment returns what one targets (count_profiles will size a `segmentId`, but returns no description for it). A name alone does not say who a segment targets. `hidden` is a field name, not a word for the marketer; in plain language the segment is simply "hidden". A segment listed here can also be used to narrow an email's audience (see send_email_activity's `segments` parameter) — describe_email_send's own `segments` list is the section-scoped view of the same thing.
list_segments
Show the account's subscriptions and the folders they are filed in — the list to reach for when the user asks what they collect consent against, or before creating, renaming or hiding anything. Pass `account` (from list_accounts) and `section` (from list_sections); omit `account` only if the user has a single account. Returns `{ folders:[{ folderId, name, isRoot, subscriptions:[{ subscriptionId, name, emailConsentAttributeId? }] }], limits, note }`. A subscription's folder is decided when it is created and can never be changed — there is no moving one between folders. Names are not unique: the same name can appear in two folders, or even twice in one, so a name alone does not identify a subscription — the folder it is in is part of its identity, and two subscriptions with the same name in different folders are different things with separate consent. Nothing in this list is cut off at a limit. `limits` is `{ subscriptions, folders }`, each `{ count, createLimit, canCreate }`: `createLimit` bounds what can be created here, not what a section can hold or what this list returns — sections built in the Apsis One interface can be far past it, and `count` is then simply larger than `createLimit`. `canCreate` is per kind, because a section at the folder limit can still take another subscription, and vice versa; the one about to be used is the one that matters, and a closed create is worth surfacing before the user chooses a name. Both counts cover visible items only, and so does the create check — deliberately, because hiding is the only removal available here and there is no un-hide, so counting hidden ones would strand a section at ten lifetime creates. The practical consequence for a section exactly at a limit: hiding something frees room for a new one; past it, the `note` says how many would have to go. A subscription shown under "Top level" is not in a folder (it was made in the Apsis One interface). It can be renamed and hidden from here, but new subscriptions cannot be created there. To find out how many people are actually opted in to one of these, use count_subscribed — this list says what exists, not who is subscribed. Subscriptions cannot be used as segment conditions.
list_subscriptions
Show the account's consumption in a calendar month, in UTC, counted the way Apsis invoices accounts that are billed per use: the emails and automated emails sent, and the daily average of known and unknown profiles. `month` is `current` (the default) or `previous`; the previous month is visible to account admins only. Returns `{ month, current, emails, profiles, note?, account }`. `emails` is `{ status, emails, automatedEmails, total, asOf }`. `profiles` is `{ status, dailyAverage, today?, days }`. `dailyAverage` is `{ known, unknown, asOf }` over the month's days from the later of the 1st and the day the account was created, up to yesterday, or up to the month's last day once the month is over; it is null when no such day has passed yet. `today` is the current month's count at the time of the call, and it is not part of the average. `days` is `{ fromBoss, countedLive, expected }`: how many of the averaged days come from the nightly count, how many were counted live because their nightly count is missing, and how many days the average covers. Counting live covers every section, so only an account admin's call does it: for anyone else `today` is absent, and a day without a nightly count makes `profiles` `{ status: "unavailable", needsAdmin: true }`. A part that couldn't be read is `{ status: "unavailable" }`, and the other part still comes back; when only today's count couldn't be read, `today` is left out and the average stays. Every `asOf` is a UTC time. On an account that isn't billed per use, the result is one sentence saying so, with no numbers.
get_consumption
Apsis InVega ChatGPT Plugin FAQ
How the directory, categories and Discoverability Score work.
Read the methodologyHow do I improve Apsis InVega's ChatGPT Plugin discoverability?
The levers are the listing surface agents actually read: names, descriptions, keywords, tool metadata, and registry health. Which lever matters depends on where discovery breaks, which is what continuous measurement shows.
What are Apsis InVega alternatives on ChatGPT?
As of 2026-12-05, Apsis InVega competes with ActiveCampaign, Aivie, Arsel Email Marketing, Attentive, Audienceful AI Email Marketing, AWeber, Banger, beehiiv and 56 more in ChatGPT Email & SMS Lifecycle Marketing Automation, ranked by public Discoverability Score.
Where is this profile measured?
This profile uses the geography attached to the latest public registry snapshot: US. Locale tags are intentionally omitted.