Quickstart
Start with one workspace API key, one authenticated request, and the generated response envelope. This page covers the minimum steps needed to create a working subscriber sync.
Create a Workspace API Key
Start every server-to-server integration with a workspace API key. A workspace key is a private credential that tells Mailrith which workspace the request belongs to and which actions the request can perform.
Create one key for each integration. Do not use one key for a whole company. For example, create separate keys for a website signup form, a CRM sync, an internal reporting job, and a one-time migration. Separate keys let you rotate or revoke access for one integration without breaking the others.
Mailrith shows the full secret only once when you create the key. Copy the secret and store it in a secure secret manager or environment variable before you close the dialog.
- In Mailrith, use the workspace switcher in the left sidebar to choose the workspace that the integration should access. The selected workspace controls which subscribers, tags, forms, landing pages, campaigns, and jobs the key can reach.
- Click
Settingsin the left sidebar, then click theAPI Keystab. For a user-facing walkthrough of this screen, see API Keys and Authorized Apps. - Click
Generate API Keyto open theGenerate API Keydrawer. - Choose
Workspace, enterName, chooseAccess Level, and chooseExpiration. - Use a key name that identifies the system that owns the key, such as
Website Signup Form,CRM Nightly Sync, orData Warehouse Export. - Click
Generate, then immediately copy the full secret fromSave Your API Key. Mailrith will not show the full secret again. - Store the secret in a server-side secret manager or environment variable. Then record who owns the integration and where the key is stored.
- Open the app, switch to the target workspace, then go to
Settingsand open theAPI Keystab. - Choose the narrowest access level that the integration needs. Use read-only access for reporting. Use read-write access only when the integration must create or update Mailrith data.
- Name the key after the system that owns it, such as
Website Signup FormorCRM Nightly Sync. - Store the secret immediately. Mailrith will not show the full token again after creation.
- Record who owns the integration and where the key is stored so you can rotate the key later.
Send Your First Request
The fastest useful test is to create or update one subscriber. This test confirms that the API key works, the request uses the correct workspace, and the request body has the correct shape.
Mailrith uses the standard Authorization header. Put the key after Bearer, send JSON with Content-Type: application/json, and call the versioned /v1 endpoint.
The subscriber endpoint is an upsert. If the email address is new, Mailrith creates the subscriber. If the email address already exists in the workspace, Mailrith updates the existing subscriber instead of creating a duplicate.
- Set
MAILRITH_API_KEYin the local environment where you will run the request. - Choose a test email address that is safe to create in the selected workspace.
- Send the request to
POST /v1/subscriberswith the Bearer token and JSON body. - Read the API response and store the returned subscriber ID if your integration needs to refer to the subscriber later.
- Open Subscribers in Mailrith and search for the test email. Confirm that the subscriber record exists and that the tags and activity history are correct.
- Delete test subscribers, or label them clearly, before you move from local testing to production workflows.
curl -X POST https://api.mailrith.com/v1/subscribers \
-H "Authorization: Bearer mrk_example_secret_key" \
-H "Content-Type: application/json" \
-d '{
"email": "ada@example.com",
"name": "Ada Lovelace",
"status": "Active",
"new_tags": ["Website Signup"],
"custom_fields": {
"company": "Analytical Engines"
}
}' Inspect the Response Envelope
Successful responses return a top-level data object. Read fields from this public response shape. Do not infer fields from Mailrith's internal database tables or app UI.
List endpoints also include a pagination block. When has_more is true, store next_cursor and pass it as starting_after on the next request.
For create and update calls, treat the API response as the source of truth for the record that Mailrith saved. This is especially useful when Mailrith normalizes an email address, attaches tags, or returns generated IDs.
{
"data": {
"id": "subscriber_123",
"email": "ada@example.com",
"name": "Ada Lovelace",
"status": "Active",
"country": null,
"subscribed_at": "2026-04-11T12:00:00.000Z",
"last_opened_at": null,
"tags": [
{ "id": "tag_website_signup", "name": "Website Signup" }
],
"sequence_ids": [],
"custom_fields": {
"company": "Analytical Engines"
},
"created_at": "2026-04-11T12:00:00.000Z",
"updated_at": "2026-04-11T12:00:00.000Z"
}
} Need Help Shipping an Integration?
Reach the Mailrith team if you need help planning a sync, validating a webhook flow, or troubleshooting a request.