What is Sequin?
Sequin is a new way to integrate with third-party services like Salesforce, Shopify, or GitHub. We remove all the limitations of HTTP APIs, like rate limits, refresh tokens, bespoke query parameters, and pagination.
Sequin gives you what you need to build an integration:
1. A way to query live data easily.
Sequin syncs API data in real-time to a Postgres database. This means you can query your data without limits using SQL or an ORM.
Sequin syncs to Postgres databases, with support for other databases coming in late 2024.
2. A way to subscribe to changes (i.e. inserts, updates, and deletes to data).
Sequin posts changes to an event stream. The event stream is a Kafka cluster hosted by Sequin. It contains all the changes that have happened in the API.
You can consume events via Kafka, REST, or receive them as webhooks.
3. A way to write changes back.
Sequin captures changes you make in Postgres and writes them back to the API. Changes are written synchronously, so your changes are validated and there is never drift between the API and your database.
All this means you can both read and write in SQL and without ever consulting API documentation.
Getting started
Getting up and running with Sequin takes just a few steps:
- Data mapping: Select the API collections and fields you want to work with, like Salesforce Contacts or Linear Issues. Specify how you want these collections and fields to translate into tables and columns in your Postgres database.
- Change detection: Sequin runs a real-time sync process that pulls changes from the API. Any time a record changes in the API, Sequin writes that change to both your database and your event stream.
- Read: With your data in Postgres, you can now read your API data with low-latency, high availability, no rate limits, and all the expressiveness of SQL.
- Consume: With your events in a Sequin-hosted Kafka cluster, you can trigger workflows based on inserts, updates, and deletes in the API. You can query events with a Kafka client, via a simple REST HTTP interface, or receive them via webhooks.
- Write: Sequin intercepts mutations you make to records in your database. Sequin applies those mutations to the API and your database at the same time.
Sequin’s write strategy means that Sequin validates mutations with the API first. And that your database never contains changes not in the API. With Sequin, the upstream API is always the primary source of truth, which avoids reconciliation issues.
When you build with Sequin, you’ll never need to worry about all the complexity that comes with API integrations, like:
- Rate limits
- API queries
- Pagination
- Background jobs
- Cache invalidation
- Out-of-sync data
At the moment, we support HubSpot, Salesforce, Stripe, GitHub, and Airtable.
Most developers are up and querying their data in no time. See our platform-specific guides to get a step-by-step walk-through:
- Airtable
- Auth0
- GitHub
- HubSpot
- Linear
- Marketo
- NetSuite
- Quickbooks
- Salesforce
- SendGrid
- ServiceNow
- Shopify
- Stripe
- Workday
Key features
Backfills
After you setup your sync, Sequin will backfill all the collections from the API you’re syncing to your database. This means your database contains a copy of all the data present in the API.
Learn more about backfills.
Real-time sync
Sequin runs a real-time sync process to pull data out of the API and into your database. By replicating API data to your database, you can now read that data without limits.
For most APIs and most collections, changes in the API propagate to your database in less than a minute.
Learn more about our sync process.
Events
Alongside the sync to Postgres, Sequin writes to an event stream. Sequin captures all inserts, updates, and deletes events in a hosted Kafka cluster. You can consume events in a variety of ways.
Learn more about events.
Postgres Proxy
You’ll connect to your database via Sequin’s Postgres Proxy.
When you make changes to your Sequin-synced tables, Sequin’s Postgres Proxy applies those changes to the API first. If the API accepts those changes, Sequin applies them to your database. This means the API is always the source of truth and your database never has changes that are out-of-sync.
As important, Sequin validates your database changes with the API. This means the API is able to apply its rules to your database changes, synchronously.
Learn more about writing through the Postgres Proxy.
Token management
Don’t worry about OAuth, refresh tokens, and expiries. If your code can query a database, it can query your API data.
Rate limit controls
You can apportion Sequin a specific allocation of your API rate limit. Don’t write any rate limiting code or worry about handling 429s.
Schema management
Map API collections (e.g. Salesforce Contacts
) to database tables (e.g. contacts
). Sync all the columns or just a few.
If you want to add more tables or columns from the API to your database, you can add them with a few clicks. Sequin will migrate the tables for you. Sequin will also backfill any new or changed columns.
Sequin-hosted or self-hosted
To get started as fast as possible, Sequin can provision you a private database on a shared AWS RDS instance. This means you don’t need to have Postgres in your stack to use Sequin.
Alternatively, connect Sequin to your existing Postgres database. Sequin supports tunneling to databases in a private VPC.
Not a shim layer
Importantly, Sequin is not a SQL shim layer to APIs. As long as a record is behind an HTTP API, its access is limited. You can’t query it the way you like, as most HTTP APIs don’t come close to SQL in expressiveness. Rate limits throttle access to it. And you have to guard against network issues.
Instead, a real Postgres database powers your Sequin integration. This means if it works with Postgres, it works with your Sequin integration.
Questions and support
Our docs won’t be able to cover everything, so if you have any issues, don’t hesitate to reach out. We’d love to hear what you’re building.