New to Corsair? See API access, authentication, and error handling.
Fields
create
fields.create
Create a custom lead field (label and merge tag).
Risk: write
POST /api/fields with fieldLabel and fieldMergeTag. Paid plans only (403 FeatureLocked on Starter).
Output
field full type
field full type
delete
fields.delete
Delete a custom field and the values every lead holds in it.
Risk: destructive
DELETE /api/fields/{field_id}. Leads lose their values for that field. Paid plans only.
Output
list
fields.list
List the brand’s custom lead fields.
Risk: read
fields full type
fields full type
update
fields.update
Rename a custom field or change its merge tag.
Risk: write
PUT /api/fields/{field_id}; both fieldLabel and fieldMergeTag are required. Paid plans only.
Output
field full type
field full type
Leads
create
leads.create
Add a lead (subscriber) to the brand. With doubleOptIn it emails the lead an opt-in confirmation; a subscribed lead also receives campaigns and automations.
Risk: destructive
POST /api/leads. email and subscribed are required. doubleOptIn true sends the lead an opt-in confirmation email (and ignores subscribed); it needs a connected sending provider. Without overrideExisting, an existing email fails. Missing tags are created.
Output
lead full type
lead full type
delete
leads.delete
Delete a lead. It cannot be restored.
Risk: destructive
DELETE /api/leads/{lead_hash}. Answers {message, leadHash}; the plugin checks the hash matches.
Output
get
leads.get
Get one lead by email or by its MD5 email hash.
Risk: read
GET /api/leads/{lead_hash}, the MD5 hash of the lead’s lower-case email. 404 “Lead not found” when there is none.
Output
update
leads.update
Update a lead found by email or hash: name, email, custom fields, timezone, subscription, and tags to add or remove.
Risk: write
PUT /api/leads/{lead_hash}. Every field is optional; newEmail changes the address. addTags runs before removeTags. Answers {message, lead}.
Output
lead full type
lead full type
Orders
create
orders.create
Record an order for a customer email. A new email becomes a lead; with customer.doubleOptIn it gets an opt-in email. Order revenue feeds campaign reports.
Risk: destructive
POST /api/orders with your own id, customer (email required), currency, totalPrice and items (id, name, price, quantity). A customer email with no lead becomes a new lead (subscribed unless customer.subscribed is false); products in items are created if missing. Prices come back as decimal strings (“6.30”).
customer full type
customer full type
items full type
items full type
order full type
order full type
delete
orders.delete
Delete an order.
Risk: destructive
DELETE /api/orders/{order_id}. Answers {message, id}.
Output
get
orders.get
Get one order by id.
Risk: read
GET /api/orders/{order_id}.
Output
lead full type
lead full type
campaign full type
campaign full type
orderItems full type
orderItems full type
list
orders.list
List orders with customer, campaign and items.
Risk: read
GET /api/orders?pageNo=&perPage=. Each order has its lead, campaign (or null) and orderItems with product.
Output
orders full type
orders full type
meta full type
meta full type
update
orders.update
Update an order: customer, currency, total, campaign, or replace all items. With customer.doubleOptIn it emails the customer.
Risk: destructive
PUT /api/orders/{order_id}. items, when given, replaces every item on the order.
customer full type
customer full type
items full type
items full type
order full type
order full type
Products
create
products.create
Create a product with your own id.
Risk: write
POST /api/products with your own id and a name.
Output
product full type
product full type
delete
products.delete
Delete a product.
Risk: destructive
DELETE /api/products/{product_id}. Answers {message, id}.
Output
get
products.get
Get one product by id.
Risk: read
GET /api/products/{product_id}.
Output
list
products.list
List products, one page at a time.
Risk: read
GET /api/products?pageNo=&perPage= (defaults 1 and 10). meta has total, pageNo, nextPageNo (null on the last page), perPage and totalPage.
Output
products full type
products full type
meta full type
meta full type
update
products.update
Rename a product.
Risk: write
PUT /api/products/{product_id}; only name can change.
Output
product full type
product full type