Full workflow
Save this as a sandbox script to verify the chain end-to-end before you ship.cURL · full workflow
Steps in detail
1. Submit the import job
1. Submit the import job
Call Send the customer those nameservers in your UI:
POST /domains/import with domains the customer already owns. The response includes the nameservers your customer must set at their registrar. The domains attach to the customer later, when you place the order.Submit root domains only, such as acme-mail.com, not subdomains like mail.acme.com. Peeker validates import eligibility before returning the job; invalid or non-root domains can come back as failed job rows and may take longer than the normal fast enqueue path.200 OK · nameserver groups
Open your registrar’s DNS settings for acme-mail.com and team-acme.com. Replace the existing nameservers with helena/idris. Most registrars apply the change within a few hours.For larger batches, call
POST /domains/import/jobs with up to 500 domains. It returns 202 Accepted with an in_progress job immediately; then poll GET /domains/import/jobs/{id} or listen for domain_import.* webhooks. Async job creation uses the normal Partner API rate limit and does not fail just because Cloudflare accounts are currently busy. Retrying the same normalized domain set returns the existing import job, so there is no idempotency header to generate.2. Wait for the import to complete
2. Wait for the import to complete
Poll
GET /domains/import/{id} or GET /domains/import/jobs/{id} every 60 seconds, or subscribe to the domain_import.completed webhook. If you no longer have the imp_... ID, call GET /domains/import?domains=acme-mail.com,team-acme.com; the domain query is required because this endpoint is a lookup, not a general import-history list. Async job status moves from in_progress → completed once nameservers are ready.If you get domain_import.action_required, surface “Acme - waiting on registrar” in your UI and re-show the same nameservers. Peeker keeps re-checking; you’ll get domain_import.completed automatically when the customer flips DNS.3. Submit the order
3. Submit the order
One call. Pass a Use
bundle_id, Smartlead route and login credentials, imported domains, and personas.Smartlead orders require both sequencer.login_email and sequencer.login_password. A Smartlead client ID or API key alone is not enough for Peeker to submit the provider work.If the user email already exists, Peeker reuses that user and updates their saved Smartlead routing for future orders. Re-sending the same body returns the original order - orders dedupe for 24 hours.200 OK · order
GET /orders/{id} or order webhooks when you need the full detail response with imported vs registered domains, line items, and personas.4. Watch fulfillment webhooks
4. Watch fulfillment webhooks
The progression for a Smartlead-backed order:When
order.completed fires, the inboxes are already pushed into Smartlead. They can start warming and sending. No additional API call from your side.Things to handle in production
A few real-world cases that show up once you’re past sandbox:- Customer hasn’t flipped nameservers yet. You’ll see
domain_import.action_requiredafter ~30 minutes. Re-show the nameservers in your UI and surface “Acme - waiting on registrar.” Peeker keeps re-checking; you’ll getdomain_import.completedwhen they propagate. - Profile picture URL is private/invalid. You’ll see
order.action_required; callGET /orders/pending?order_id=...and look forreason: "profile_picture_not_accessible". Get a fresh public URL from the customer and place a corrected order. - Domain needs partner action.
GET /orders/pendingreturnsupdate_nameserversorreplace_domainonly when there is a concrete customer/partner action to take.
What’s next
Buying domains from your registrar
Same flow, but Peeker buys the domains and runs DNS - no nameserver step for the customer.
Change forwarding URLs
Repoint up to 25 domains at a new forwarding URL after the order is live.
How to implement domain swaps
Replace a degrading domain mid-flight without losing warmup.
Best practices
Errors, paging, idempotent retries, pending actions, webhook hygiene.