Audience and lists
Build your marketing audience in the console, tag and segment contacts, stop mailing one, and import or export a CSV, then the same over the API.
An audience contact is a marketing record. It does not need an account - a newsletter signup is a contact with no user behind it. Contacts are what email campaigns send to and what audience workflow triggers fire on. This page builds an audience in the console first, then covers the same over the API.
Before you start
A console role that can create Audience members and attributes. Your plan sets how many contacts, attributes and lists you may keep, and whether you can import a CSV.
Build your audience in the console
Open Audience in the console (opens the console in a new tab)- In the left rail choose Audience, then Audience. The counts at the top are All audience, New in last 7 days and New in last 30 days, and All audience members below lists every contact. People who sign up to your app are here already, with the source
signup.

- Manage attributes opens Audience attributes, where Create attribute defines a field you keep about contacts, such as their company. Define them before an import, so a CSV column has a field to map onto.
- Manage tags opens Audience tags, to make the tags you group contacts by.
- Add member adds one person by hand.
- Import CSV brings a whole list across (importing contacts).

To make a tag, press Create new tag in Audience tags, fill Tag title and Tag slug, and save it.

In Add audience member, fill Name and Email and press Create.

- To look after one contact, find them in All audience members and press View. Filters narrows the table, by tag, source, country, language or whether they unsubscribed, for example.

- On their page, Apply in Tags changes their tags, and Add to list in Lists puts them in a static list. Their language, country, currency and timezone are on the left.

- To stop mailing them, press Unsubscribe (they can be re-subscribed later with Re-subscribe), or Block, which keeps them out of all sending and asks for a Reason. Mark invalid is for an address that does not work. The console has no delete; your backend can delete a contact with the server SDK.


- Timeline lists what happened to them, newest first: tags, lists, attribute changes and status, each with who did it. Tags, Lists, Attributes, Status and All actors narrow it. Emails, Lists and Workflows are tabs beside it.

- Export CSV downloads every contact as a CSV. With a filter on the table it reads Export filtered, and downloads only the contacts the filter leaves (exporting).

Check it works
The contact you added is in All audience members, and a tag you applied shows on their row. Filter the table by that tag and export: the file holds only those contacts.
Things to watch out for
- The console cannot delete a contact. Unsubscribe them, or block them with a reason, which keeps them out of every send. Your backend can delete one with
bb.subscribers.deletefrom the server SDK, which takes them off every list and out of every send. To stop email to someone who asked, unsubscribe them: a deleted address added again starts subscribed. - People who sign up are linked for you. A contact with the same email as a new user is attached to their account; you do not need to link them.
- Add member stops at your plan's contact limit; Import CSV does not. An import is refused instead when it would pass your month's import rows.
- More holds two one-off tools. Migrate data copies your user tags, user attribute definitions, every user and your user lists into Audience in one run, and Validate opens Validate migration, a check to run before it. Read what each does before you press it.
Over the API
curl -G https://api.console.buildbase.app/api/audience \
-H "Authorization: $BUILDBASE_TOKEN" \
--data-urlencode 'filter={"unsubscribed":false}' \
--data-urlencode '$limit=50'Define your audience attributes in the console (step 2 above) before you import, so CSV columns have something to map onto.
Contacts
| Method | Path | Purpose |
|---|---|---|
GET | /api/audience | List contacts, paginated |
GET | /api/audience/:id | One contact |
POST | /api/audience | Create |
PATCH | /api/audience/:id | Update core fields |
PATCH | /api/audience/:id/attributes | Update custom attributes |
PATCH | /api/audience/:id/tags | Replace tags |
PATCH | /api/audience/:id/block | Block - excluded from all sending |
PATCH | /api/audience/:id/unblock | Restore |
PATCH | /api/audience/:id/link-user | Attach this contact to a user account |
This API has no delete: to stop mailing a contact, block it (excluded from all
sending) or unsubscribe it. Deleting one is a server SDK call with an org API
key, bb.subscribers.delete.
A contact and a user with the same email are linked for you: when the person
signs up, signs in or updates their profile, BuildBase makes their contact or
attaches the existing one to their account. link-user is for a contact whose
address differs from the account's. Linking is what lets the console show one
timeline for the person.
Per-contact history is available at /:id/timeline, /:id/activities,
/:id/attributes-history, /:id/lists, and /:id/emails.
Lists
Audience lists are the unit a campaign sends to (lists), managed at
/api/audience-lists. A contact's memberships are readable from
GET /api/audience/:id/lists.
Lists are also what workflows act on:
actions.audience_list_add and actions.audience_list_remove move contacts
between them, and triggers.audience.added_to_list fires when they do.
Importing a CSV
Import is three calls. The CSV is parsed on upload, held in Redis, then processed by a background job.
1. Upload. Send the file as multipart under the field name file:
curl -X POST https://api.console.buildbase.app/api/audience/import/upload \
-H "Authorization: $BUILDBASE_TOKEN" \
-F "[email protected]"{
"importId": "9f1c…",
"headers": ["Email", "Full name", "Company"],
"rowCount": 1284,
"previewRows": []
}previewRows holds the first three parsed rows, so you can show the user what
their mapping will do before committing.
2. Start. Map CSV columns to fields and choose what happens on a duplicate:
curl -X POST https://api.console.buildbase.app/api/audience/import/start \
-H "Authorization: $BUILDBASE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"importId": "9f1c…",
"mapping": { "Email": "email", "Full name": "name", "Company": "company" },
"duplicateStrategy": "update",
"tags": ["665f1c2e8b3a4d0012a4b5c6"]
}'Returns { "jobId": "…" }.
| Field | Required | Notes |
|---|---|---|
importId | Yes | From step 1, a UUID |
mapping | Yes | CSV header → field. Must map both email and name |
duplicateStrategy | No | update (default) or skip |
tags | No | Audience tag ids (from GET /api/audience/tags), applied to every imported contact. A tag name is refused with 400 |
listId | No | A static list everyone in the file joins. A smart list is refused: it is a filter, not a membership |
skipRoleAddresses | No | true skips role addresses such as info@ or sales@, as typos and throwaway addresses always are |
consentConfirmed | No | true records on each contact that you confirmed they agreed to receive your email, with who and when |
3. Poll. The job is asynchronous:
curl https://api.console.buildbase.app/api/audience/import/status/$JOB_ID \
-H "Authorization: $BUILDBASE_TOKEN"{ "state": "completed", "progress": 100, "result": {}, "failedReason": null }An unknown job id returns 404. Fetch a template with the org's attribute
columns already present from GET /api/audience/import/sample.
Warning
Uploaded CSVs expire after 30 minutes. The parsed file is held in Redis
between steps 1 and 2, so a user who leaves the mapping screen open too long
gets 400 with "Import data expired. Please re-upload the CSV file."
Do not treat importId as durable - it is a handle on a short-lived buffer,
not a stored import.
Mapping validation rejects the whole import if email or name is missing, so
check the mapping before calling start rather than after.
Exporting
GET /api/audience/export returns the audience as CSV. It honours the same
filter parameter as the list endpoint, so you can export a segment rather than
everything.
Next Steps
- Email campaigns - send to an audience list.
- Workflows - audience triggers and actions.
- User attributes - custom fields on accounts.