Overview
This guide will show you how to:- Create your first stream
- Create a sync to an API provider in the stream
- Create a consumer and read data from the stream
- Write data back to the API provider
Create a stream
Streams are at the center of Sequin. The data from your syncs is stored in a stream. Your consumers read from a stream, keeping track of which messages you have processed and which still need to be delivered. To get started, you’ll need a Sequin account. If you don’t have one, you can sign up for free. Once you’re logged in, you’ll be prompted to create your first stream:
dev as this stream is just for development, not yet production.
Create a sync
That’s it! Our first stream is created. Now let’s add a sync. In Sequin, an instance of a connection to an API is called a sync. Sequin uses a credential (e.g. an access token) to access the API. Here are some examples of things you can sync:- A Salesforce account
- A HubSpot sandbox
- A Shopify store
- A Stripe account



1
Create a credential
In the “Credential” section, click + Add New then Connect Sequin to HubSpot. Follow the prompts in HubSpot to authorize Sequin.
2
Select collections to sync
Under “Collections,” select the data you want to sync. A collection is a type of API object, like a Salesforce Contact or a Shopify Order.
3
Start your sync
Click Start syncing.

Introspect
After starting your sync, introspect the shape of objects flowing from the API. Click the “Records” tab to see the list of records Sequin has extracted so far:
Create a consumer to read data
Now that you are syncing data to your stream, let’s add add a consumer to read data into your application. Sequin’s Consume API is an HTTP interface for processing all your API data. It provides the same capabilities as modern messaging systems, like Kafka or NATS. You can process data in parallel, at high-throughput, and with strong guarantees about message delivery. Navigate to yourdev stream page and click the Consumers tab. Click Create consumer:

string
Where in the stream the consumer starts.
all(default): the consumer will start from the beginning of the stream.new: the consumer will start from the most recent message.
integer
How long to wait for a message to be acknowledged, in seconds. Defaults to 60 seconds.If a worker doesn’t acknowledge a message within this time, the message will be redelivered (i.e. reappear for other workers to process).
integer
Maximum number of times a message can be redelivered to workers. For example, if a message causes your workers to crash, it will be redelivered up to
max_deliver times before being discarded.Defaults to -1, which means there is no maximum.

- The configuration details you selected
- The number of messages that are pending delivery (
num pending) - The number of messages that are pending acknowledgement (
num ack pending) - Code snippets to consume records from this consumer
/next snippet into your terminal to request your first batch of records!
200 OK
Mutate data
On top of reading data, your integration probably needs to write data back to APIs as well. Sequin has a mutation API that allows you to create, update, and delete API records. With the mutation API, mutations look the same regardless of the API. Thedata payload for API records matches the same shape used everywhere in Sequin.
Mutations are linked to syncs. When you create a mutation, you’ll specify the sync ID of the sync you want to mutate. Sequin will route the mutation to the right place.
Here’s an example of creating a Salesforce Contact:

