Access the Loops API with managed authentication. Find contacts and read their properties, mailing lists, and suppression status; list and read transactional emails, campaigns, workflows, email messages, audience segments, and design elements with their metrics; and create or update contacts, send events and transactional emails, and draft campaigns, transactional emails, and workflows. Transactional sends, events, and previews email real people at once, and contact changes decide who gets mail. All access runs through the Maton gateway and the maton CLI.
Permissions
Suggested read access
In the Console, Read limits the connection to these 38 read-only endpoints, plus deny rules for any write endpoint a broader rule would otherwise match. Endpoints Maton has found to return credentials, start jobs, or spend credits are left out; a few reads that can change state or return a secret depending on their parameters stay in, and their descriptions say how. It is a suggestion: the saved rules are exactly the ones you see, and you can change them with Custom. See Access policy.
Reference
Account
Test the API Key
maton api '/loops/api/v1/api-key'Response:
{
"success": true,
"teamName": "{team_name}"
}The team the connected key belongs to. A bad key returns 401 with "message": "Invalid API key".
List Dedicated Sending IPs
maton api '/loops/api/v1/dedicated-sending-ips'Returns an array of IP address strings Loops sends the team's mail from.
Contacts
Find a Contact
maton api '/loops/api/v1/contacts/find?email={email}'Note: URL-encode it (@ is %40). Pass userId={user_id} instead to look up by your own user ID; send only one of the two.
Response:
[
{
"id": "{contact_id}",
"email": "{email}",
"firstName": "{first_name}",
"lastName": null,
"source": "API",
"subscribed": true,
"userGroup": "",
"userId": null,
"mailingLists": {"{mailing_list_id}": true},
"optInStatus": null
}
]An empty array means no contact matched. Custom contact properties appear as extra keys.
Create a Contact
maton api '/loops/api/v1/contacts/create' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{
"email": "{email}",
"firstName": "{first_name}",
"userGroup": "trial",
"mailingLists": {"{mailing_list_id}": true}
}
JSONNote: {email}, {first_name}, and {mailing_list_id} stand for real values; fill them in before sending the request.
Body fields:
email(string, required)firstName,lastName,source,userGroup,userId(string, optional)subscribed(boolean, optional):falseadds the contact without campaign mailmailingLists(object, optional): mailing list IDs mapped totrue(add) orfalse(remove)- Any custom contact property as an extra key (see List Contact Properties)
Response:
{"success": true, "id": "{contact_id}"}A 409 means a contact with that email or user ID already exists; update it instead.
Update a Contact
maton api '/loops/api/v1/contacts/update' -X PUT -H 'Content-Type: application/json' \
--input - <<'JSON'
{
"email": "{email}",
"userGroup": "customer",
"mailingLists": {"{mailing_list_id}": false}
}
JSONIdentify the contact by email or userId. To change a contact's email address, send its userId with the new email. Fields left out keep their values. Returns {"success": true, "id": "{contact_id}"}.
Delete a Contact
maton api '/loops/api/v1/contacts/delete' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{"email": "{email}"}
JSONSend email or userId, not both. Returns {"success": true, "message": "Contact deleted."}, or 404 if no contact matched.
Get Suppression Status
maton api '/loops/api/v1/contacts/suppression?email={email}'Response:
{
"contact": {"id": "{contact_id}", "email": "{email}", "userId": null},
"isSuppressed": true,
"removalQuota": {"limit": 10, "remaining": 9}
}Returns 404 when no contact matches.
Remove from Suppression List
maton api '/loops/api/v1/contacts/suppression?email={email}' -X DELETEReturns {"success": true, "message": "...", "removalQuota": {"limit": 10, "remaining": 8}}.
Contact Properties
List Contact Properties
maton api '/loops/api/v1/contacts/properties?list=custom'list=all (default) includes the built-in properties; list=custom only the team's own.
Response:
[
{"key": "planName", "label": "Plan Name", "type": "string"}
]type is string, number, boolean, or date.
Create a Contact Property
maton api '/loops/api/v1/contacts/properties' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{"name": "planName", "type": "string"}
JSONname should be camelCase (planName), and a few names are reserved. type is string, number, boolean, or date. Returns {"success": true}.
Mailing Lists
List Mailing Lists
maton api '/loops/api/v1/lists'Response:
[
{"id": "{mailing_list_id}", "name": "Product updates", "description": null, "isPublic": true}
]Use these IDs in a contact's mailingLists object.
Events
Send an Event
maton api '/loops/api/v1/events/send' -X POST -H 'Content-Type: application/json' \
-H 'Idempotency-Key: {uuid}' \
--input - <<'JSON'
{
"email": "{email}",
"eventName": "planUpgraded",
"eventProperties": {"planName": "Pro"}
}
JSONBody fields:
eventName(string, required)emailoruserId(string, one required): the contact; Loops creates it if it does not existeventProperties(object, optional): values the workflow's emails can usemailingLists(object, optional), and contact properties as extra keys, update the contact at the same time
Returns {"success": true}. A reused Idempotency-Key within 24 hours returns 409 and sends nothing.
List Event Patterns
maton api '/loops/api/v1/event-patterns'The events the team has defined, with their properties. v1/event-patterns/{event_pattern_id} and v1/event-patterns/by-name/{event_name} return one.
Transactional Emails
List Transactional Emails
maton api '/loops/api/v1/transactional-emails?perPage=20'Response:
{
"pagination": {
"totalResults": 1,
"returnedResults": 1,
"perPage": 20,
"totalPages": 1,
"nextCursor": null,
"nextPage": null
},
"data": [
{
"id": "{transactional_id}",
"url": "https://app.loops.so/transactional/{transactional_id}",
"name": "Password reset",
"draftEmailMessageId": "{email_message_id}",
"publishedEmailMessageId": "{email_message_id}",
"transactionalGroupId": "{transactional_group_id}",
"createdAt": "2026-11-29T10:00:00.000Z",
"updatedAt": "2026-11-29T10:00:00.000Z",
"dataVariables": ["resetUrl"]
}
]
}dataVariables are the values a send must supply. Only a template with a publishedEmailMessageId can be sent. transactionalGroupId={transactional_group_id} filters by group. The older v1/transactional lists published templates only.
Get a Transactional Email
maton api '/loops/api/v1/transactional-emails/{transactional_id}'v1/transactional-emails/{transactional_id}/metrics returns sends, deliveries, spamReports, hardBounces, and softBounces.
Send a Transactional Email
maton api '/loops/api/v1/transactional' -X POST -H 'Content-Type: application/json' \
-H 'Idempotency-Key: {uuid}' \
--input - <<'JSON'
{
"transactionalId": "{transactional_id}",
"email": "{email}",
"dataVariables": {"resetUrl": "https://example.com/reset/{token}"}
}
JSONNote: {uuid}, {transactional_id}, {email}, and {token} stand for real values; fill them in before sending the request.
Body fields:
transactionalId(string, required): a published templateemail(string, required): the recipientdataVariables(object): every variable the template lists, or the send fails with400addToAudience(boolean, optional): also create the recipient as a contactattachments(array, optional):{filename, contentType, data}with base64data; Loops must enable attachments for the team first
Returns {"success": true}. A reused Idempotency-Key within 24 hours returns 409 and sends nothing.
Create, Update, and Publish a Transactional Email
maton api '/loops/api/v1/transactional-emails' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{"name": "Order shipped", "transactionalGroupId": "{transactional_group_id}"}
JSONCreating returns draftEmailMessageId and draftEmailMessageContentRevisionId. Set the content with Update an Email Message, then publish the draft:
maton api '/loops/api/v1/transactional-emails/{transactional_id}/publish' -X POSTPublishing replaces what every later send delivers. v1/transactional-emails/{transactional_id} with POST renames it or moves it to another group, and v1/transactional-emails/{transactional_id}/draft with POST creates a draft from the published version. Transactional groups are listed, read, created, and renamed at v1/transactional-groups.
Campaigns
List Campaigns
maton api '/loops/api/v1/campaigns?perPage=20'Response:
{
"pagination": {"totalResults": 1, "returnedResults": 1, "perPage": 20, "totalPages": 1, "nextCursor": null, "nextPage": null},
"data": [
{
"id": "{campaign_id}",
"url": "https://app.loops.so/campaigns/{campaign_id}",
"name": "November newsletter",
"status": "Draft",
"createdAt": "2026-11-29T10:00:00.000Z",
"updatedAt": "2026-11-29T10:00:00.000Z",
"emailMessageId": "{email_message_id}",
"campaignGroupId": "{campaign_group_id}",
"mailingListId": null,
"audienceSegmentId": null,
"audienceFilter": null,
"scheduling": {"method": "now", "timestamp": null}
}
]
}status is Draft, Scheduled, Sending, or Sent. campaignGroupId={campaign_group_id} filters by group. v1/campaigns/{campaign_id} returns one campaign, and v1/campaigns/{campaign_id}/metrics its sends, opens, clicks, unsubscribes, spamReports, hardBounces, and softBounces (400 "Campaign has not been sent yet" before it sends).
Create a Campaign
maton api '/loops/api/v1/campaigns' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{
"name": "December newsletter",
"mailingListId": "{mailing_list_id}",
"scheduling": {"method": "schedule", "timestamp": "2026-12-15T14:00:00.000Z"}
}
JSONCreates a draft with an empty email message and returns its emailMessageId. The audience is a mailingListId, an audienceSegmentId, an audienceFilter ({"match": "all", "conditions": [...]}), or a segment plus a filter. scheduling.method is now or schedule (with a future timestamp).
Update a Campaign
maton api '/loops/api/v1/campaigns/{campaign_id}' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{"name": "December newsletter (final)"}
JSONChanges a draft's name, group, audience, or scheduling. After a campaign has sent, only name and campaignGroupId can change. Campaign groups are listed, read, created, and renamed at v1/campaign-groups.
Email Messages
Campaigns, transactional emails, and workflow email nodes each point to an email message by ID.
Get an Email Message
maton api '/loops/api/v1/email-messages/{email_message_id}'Response:
{
"id": "{email_message_id}",
"campaignId": "{campaign_id}",
"subject": "Our December update",
"previewText": "What shipped this month",
"fromName": "{from_name}",
"fromEmail": "{from_local_part}",
"replyToEmail": "{reply_to_email}",
"emailFormat": "styled",
"lmx": "<Style themeId=\"{theme_id}\" /> ...",
"footerId": null,
"contentRevisionId": "{revision_id}",
"updatedAt": "2026-11-29T10:00:00.000Z"
}lmx is the email body in Loops' markup. v1/email-messages/{email_message_id}/guardian returns errors (which block publishing) and warnings for the content.
Update an Email Message
maton api '/loops/api/v1/email-messages/{email_message_id}' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{
"expectedRevisionId": "{revision_id}",
"subject": "Our December update",
"previewText": "What shipped this month"
}
JSONSend the current contentRevisionId as expectedRevisionId; a stale one returns 409. Editable fields: subject, previewText, fromName, fromEmail, replyToEmail, ccEmail, bccEmail, languageCode, emailFormat, footerId, lmx, and the property fallbacks. A campaign must still be a draft, a transactional email's draft is the only editable version, and a workflow must not be sending.
Render an Email Message
maton api '/loops/api/v1/email-messages/{email_message_id}/render' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{}
JSONReturns {"html": "..."} the way a preview would render, without sending. The body takes the same variables as Send a Preview; missing values use their fallbacks.
Send a Preview
maton api '/loops/api/v1/email-messages/{email_message_id}/preview' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{"emails": ["{email}"]}
JSONCampaign previews accept contactProperties, workflow previews contactProperties and eventProperties, and transactional previews dataVariables.
Workflows
List Workflows
maton api '/loops/api/v1/workflows?perPage=20'Returns pagination and data items with id, url, name, workflowGroupId, createdAt, and updatedAt. workflowGroupId={workflow_group_id} filters by group.
Get a Workflow
maton api '/loops/api/v1/workflows/{workflow_id}'Response:
{
"id": "{workflow_id}",
"url": "https://app.loops.so/workflows/{workflow_id}",
"workflowRevisionId": null,
"status": "Draft",
"name": "Onboarding",
"description": "",
"mailingListId": null,
"workflowGroupId": "{workflow_group_id}",
"rootNodeId": "{node_id}",
"nodes": {
"{node_id}": {"typeName": "SignupTrigger", "nextNodeIds": ["{next_node_id}"]},
"{next_node_id}": {"typeName": "SendEmailAction", "nextNodeIds": ["{exit_node_id}"], "emailMessageId": "{email_message_id}", "subject": "Welcome"},
"{exit_node_id}": {"typeName": "ExitAction", "nextNodeIds": []}
}
}status is Draft, Sending, Paused, or PausedAndQueueing. v1/workflows/{workflow_id}/nodes/{node_id} returns one node, and v1/workflows/{workflow_id}/nodes/{node_id}/metrics a send node's sends, opens, clicks, unsubscribes, spamReports, hardBounces, and softBounces.
Create and Edit a Workflow
maton api '/loops/api/v1/workflows' -X POST -H 'Content-Type: application/json' \
--input - <<'JSON'
{"name": "Trial follow-up", "workflowGroupId": "{workflow_group_id}"}
JSONCreates a draft with a blank trigger and an exit node. Edits:
v1/workflows/{workflow_id}withPOST: rename, describe, or regroupv1/workflows/{workflow_id}/mailing-listwithPOST: change the list it applies tov1/workflows/{workflow_id}/nodeswithPOST: insert a node (insertModebetween,before, orafter;nodeTypeNamesuch asSendEmailAction,TimerAction,BranchNode,AudienceFilter; and the currentexpectedRevisionId)v1/workflows/{workflow_id}/nodes/{node_id}withPOST: change a node;.../add-branchand.../reroutewithPOSTadd a branch or move a connectionv1/workflows/{workflow_id}/nodes/{node_id}withDELETEremoves one node,.../recursivewithDELETEremoves it and everything below it, andv1/workflows/{workflow_id}withDELETEremoves the whole workflow; all three are irreversible
Every node edit takes the current expectedRevisionId and returns 409 when it is stale. Workflow groups are listed, read, created, and renamed at v1/workflow-groups.
Audience Segments
List Audience Segments
maton api '/loops/api/v1/audience-segments'Returns pagination and data items with id, name, description, filter, createdAt, and updatedAt. v1/audience-segments/{audience_segment_id} returns one, and v1/audience-segments with POST creates one from a name and a filter.
Design
Themes, components, and footers style email messages:
v1/themesandv1/themes/{theme_id}: list and read themes (styles,isDefault);POSTcreates or updates onev1/componentsandv1/components/{component_id}: list and read reusable content blocks (lmx);POSTcreates or updates onev1/footers,v1/footers/{footer_id}, andv1/footers/{footer_id}/variants/{variant_id}: list and read footers and their variants;POSTcreates or updates them,.../set-defaultand.../publishwithPOSTmake a footer the default or publish a variant, andv1/footers/{footer_id}withDELETEremoves a footer
Pagination
Paginated lists take perPage (10 to 50, default 20) and cursor. The response's pagination.nextCursor is null on the last page; otherwise pass it back:
maton api '/loops/api/v1/campaigns?perPage=50&cursor={next_cursor}'Note: A perPage below 10 returns 400. Mailing lists, contact properties, and contacts/find return a plain array without pagination.
Notes
- Rate limits. Loops limits requests per team;
x-ratelimit-limitandx-ratelimit-remainingreport the current window (10 per second on contact, list, and event endpoints, higher on the newer resource endpoints). A429means wait and retry. - Idempotency.
v1/transactionalandv1/events/sendaccept anIdempotency-Keyheader of up to 100 characters; a repeat within 24 hours returns409instead of sending again. - IDs and timestamps. Resource IDs are opaque strings; timestamps are ISO 8601. Contact lookups take
emailoruserId, never both. - Errors. Contact, list, event, and transactional endpoints answer
{"success": false, "message": "..."}; the newer endpoints answer{"message": "..."}. - Image uploads for email content (
v1/uploads) return a pre-signed URL on Loops' storage and are out of scope for this reference.