Skip to main content
Get your users into Courier so a send only needs their user_id. A profile stores one person’s contact details. Load profiles from a CSV or your own database, then update them as your system of record changes. covers one profile and the field each channel reads. This guide is the same call at the scale of your whole user table.

Prerequisites

The examples assume a client initialized once with your key from the environment:

Create or update a profile

1

Create or update a profile

Creating and updating are the same call. merges the values you send into the profile, creating it if it does not exist and keeping any fields you leave out. The user_id in the path is the identifier you send to. You choose it.
Device tokens are managed separately.
Push device tokens live on the user, but go through their own API, not the profile body. See to register them.
2

Read the profile back

Fetch the profile and confirm the stored fields, or open the user in :
3

Replace instead of merge

Use POST for everyday updates so you never drop data. Use PUT when the profile should become exactly what you send, dropping any field you omit.
Replacing removes omitted fields.
After a PUT, any field not in the request (a phone_number, a custom value) is gone. Use POST unless you intend a full overwrite. To change one field, use PATCH with a JSON-patch operation.

Import users from a CSV

For a one-time load or an occasional top-up, import a CSV in the console. There is no CSV API. To load users programmatically, call the profile endpoints above for each user.
1

Open the importer

Go to and click Import. Download the CSV template from the dialog so your columns match exactly.
2

Fill in the template

Only id is required. Keep the header row exactly as the template provides it: do not rename, reorder, or add columns. Columns include id, name, first_name, last_name, email, phone_number, locale, zoneinfo, and the OIDC standard claims.
3

Save as UTF-8 CSV and upload

Save as CSV (comma delimited), UTF-8 without a BOM, and with no blank line after the last row. Upload the file and click Add Users to create the profiles.
This error means the parser read a row as a single field, almost always a delimiter, encoding, or trailing-line problem:
  • Wrong delimiter. Open the file in a plain text editor. If fields are separated by semicolons or tabs (some spreadsheet locales use semicolons), re-save as CSV (comma delimited).
  • Wrong encoding. Garbled characters or ÿþ at the start mean the file is UTF-16. Recreate it as UTF-8. A UTF-8 BOM ( before the first field) can also interfere. Remove it.
  • Trailing blank line. A “Too few fields” error on the last row only usually means an empty final line. Delete any blank lines after the last data row.
  • Extra columns. If the expected field count is higher than the template’s, your header has extra trailing commas. Remove them.
The most reliable fix is to build the CSV in a plain text editor rather than a spreadsheet app.

Delete a profile

Deleting a profile removes all of its stored data. Sends to that user_id fail until a new profile exists.

Verify

1

Read one profile back

Fetch a profile you just wrote and confirm every field you sent is there, spelled the way your templates expect.
2

Send to the user_id alone

Send a message addressed only by user_id, with no inline profile. Courier resolves the contact details from storage, which proves the import landed.
3

Check the count after a CSV import

Open and confirm the number of profiles matches your file’s row count. A short count usually means rows the parser rejected.