Messaging guide
Send to one eligible customer.
Use a published Template version for one Customer Profile at a time. Fendsy checks current marketing eligibility, suppression and sender readiness before accepting the delivery.
Prepare the Template
Give an organization-wide credential templates:write to create a draft with POST /v1/templates. Read it withGET /v1/templates/{templateId}/draft and save changes with PUT /v1/templates/{templateId}/draft using its current expectedVersion. A stale version returns409. Grant templates:publish separately and send an idempotency key with POST /v1/templates/{templateId}/publish. To revise a published version, create an editable draft throughPOST /v1/templates/{templateId}/versions/{version}/edit. The credential is recorded as the actor; it does not inherit an owner session.
- Create an organization-wide key with
templates:readandsends:marketing. - Read
GET /v1/templates, then select a published version. - Use a unique idempotency key for each intended recipient delivery.
curl https://api.fendsy.com/v1/sends/marketing -H "Authorization: Bearer $FENDSY_API_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: welcome-customer-1042-v1" -d '{"customerProfileId":"PROFILE_ID","templateId":"TEMPLATE_ID","version":1}'A 202 response includes a delivery ID. PollGET /v1/sends/{deliveryId} with the same credential to see queued and provider state. A duplicate key with the same body returns the original delivery ID. The send quota is ten attempts per credential per minute; 429 includes Retry-After.
Confirm a merchant order
Use a separate sends:service key and a published Template categorized as service with goal order_confirmation. The order must be a paid or confirmed cash-on-delivery Fendsy merchant order for the same Customer, without a cancellation or refund. This path permits only one confirmation per order, requires an explicit reason, and applies all-message suppressions. It does not turn a marketing unsubscribe into service-message consent.
curl https://api.fendsy.com/v1/sends/service -H "Authorization: Bearer $FENDSY_SERVICE_API_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: order-confirmation-1042" -d '{"customerProfileId":"PROFILE_ID","orderId":"ORDER_ID","reason":"order_confirmation","templateId":"SERVICE_TEMPLATE_ID","version":1}'The service quota is five requests per credential per minute. Shopify order confirmations stay with Shopify. Shopify documents that a Plus store owner must contact Shopify Support to turn off specific automatic customer notifications. This endpoint cannot send a Shopify order confirmation; a tested sender switch requires verified provider suppression first.
Marketing and service keys have separate scopes. Browse the reference for fields and errors.