Get started

Integrate OpenSequence into your product

The integration checklist: run the server, connect each module, then upsert contacts, enroll them and handle webhooks, one API call per step.

Edit on GitHub

This is the checklist for adding OpenSequence to an existing app. Each line is one call, and each module links to its own page.

OpenSequence ships no UI. Your app keeps its screens and calls the API from your server.

1. Set up once

  • Run the server and create a project: Quickstart.
  • Install the SDK: npm install @opensequence/sdk. See the SDK reference.
  • Register your webhook endpoint and store its secret: Webhooks to your app.
  • Connect Allo if you send texts or call tasks: Allo.
  • Connect Attio if conditions read your CRM: Attio.
  • Connect MCP if an AI agent should build sequences: the MCP server README.

2. For each rep

  • Create the sender with your user id, signature and attributes such as a calendar URL: Sender.
await oseq.senders.upsert(user.id, { name, email, timezone, signature_html, attrs: { calendar_url } }); // PUT /v1/senders/{id}
await oseq.senders.setSmtp(user.id, { provider: 'smtp', smtp, imap }); // PUT /v1/senders/{id}/channels/email
  • Connect their Allo number (SMS and calls only).
await oseq.senders.setSms(user.id, { allo_user_id, number }); // PUT /v1/senders/{id}/channels/sms

3. Every time your app saves a person

  • Upsert the contact by your own id: Contact.
await oseq.contacts.upsert(person.id, { first_name, email, phone, country, timezone, attrs: { plan } }); // PUT /v1/contacts/{id}

country is ISO-2. When you have none, take it from the phone number with libphonenumber-js. Texts and agent calls need recorded consent: oseq.contacts.setOutreachConsent() with an admin key.

4. Build and publish a sequence

const { sequence, version } = await oseq.sequences.create({ name, definition }); // POST /v1/sequences
await oseq.sequences.versions.publish(sequence.id, version.id);                  // POST /v1/sequences/{id}/versions/{vid}/publish

5. Enroll

  • Enroll contacts as a sender and store each enr_… id.
const { enrollments } = await oseq.sequences.enroll(sequence.id, { contacts: [person.id], sender: user.id }); // POST /v1/sequences/{id}/enrollments

A contact is in one active sequence at a time. One conflict fails the whole batch with 409 ALREADY_IN_SEQUENCE, and error.details.conflicts names each contact, its sequence and its enrollment. POST /v1/sequences/{id}/enrollments:preview runs the same checks without writing.

6. Handle the events

  • Write each webhook into your app, deduped by event.id.
EventWrite
run.doneAn outbound activity on the person.
signal.received with reply or meeting_bookedAn inbound activity and a notification to the rep.
signal.received with bounce or opt_outA flag on the address or number.
enrollment.exited, enrollment.completedThe outcome. Clear the "in sequence" badge.
task.created, task.expiredAdd or remove an item in the rep's task list.
sender.channel_statusA "reconnect your mailbox" banner.

Report what the service cannot see

  • Report meetings, opt-outs and do-not-contact flags that happen outside OpenSequence.
await oseq.contacts.reportEvent(person.id, { id: booking.id, type: 'meeting_booked' }); // POST /v1/contacts/{id}/events

type is meeting_booked, opt_out, suppressed or reply. The same id twice is recorded once.

7. Exit when the work is done

await oseq.enrollments.exit(enrollmentId, { label: 'deal closed' }); // POST /v1/enrollments/{id}/exit, admin key

Screens to build

  • Sequences: GET /v1/sequences and GET /v1/analytics/sequences.
  • Where a contact is: GET /v1/enrollments/{id}. See Show where a contact is in a sequence.
  • Senders and mailboxes: GET /v1/senders/{id} for channels, status and readiness.
  • Task list: GET /v1/tasks?sender=…&status=open, then POST /v1/tasks/{id}/complete. Each task has a kind (call, linkedin_connect, …); a linkedin_connect task completes itself when you call POST /v1/tasks/{id}/open as the sender opens its profile (LinkedIn).

On this page