Spaces
These routes serve products that send email on behalf of their own customers: one space per blog, client or workspace, each with its own reputation, on a single bill. Spaces explained.
These routes require an account key (Account › Account API keys). A space key answers 403. Space and account keys.
The pattern
- Create the space the first time a customer needs to send, with your own id as
externalId. The sameexternalIdreturns the existing space: safe to run on every send. - Add their domain with
POST /v1/domainsand the headerX-Space-Id, then show the DNS records to your customer (or publish them if you manage their DNS). - Send with the same account key and
X-Space-Idon every request: emails, contacts, campaigns.
# 1. Create (or find) the space of blog 42
curl https://api.kulamail.com/v1/spaces \
-H "Authorization: Bearer ml_your_account_key" \
-H "Content-Type: application/json" \
-d '{ "name": "The Daily Fern", "externalId": "blog_42" }'
# 2. Add its domain
curl https://api.kulamail.com/v1/domains \
-H "Authorization: Bearer ml_your_account_key" \
-H "X-Space-Id: 9b8a7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d" \
-H "Content-Type: application/json" \
-d '{ "domain": "dailyfern.com" }'
The space object
{
"id": "9b8a7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
"name": "The Daily Fern",
"externalId": "blog_42",
"timezone": "UTC",
"defaultFromName": "The Daily Fern",
"defaultFromEmail": "hello@dailyfern.com",
"defaultReplyTo": null,
"trackOpens": true,
"trackClicks": true,
"confirmAddressOnce": false,
"brandColor": "#2f6f4e",
"buttonColor": null,
"buttonTextColor": null,
"logoUrl": "https://dailyfern.com/logo.png",
"emailTheme": {
"textColor": null,
"headingColor": null,
"linkColor": null,
"backgroundColor": "#f3f1ea",
"contentBackgroundColor": null,
"mutedColor": null,
"fontFamily": "lora",
"headingFontFamily": null,
"fontSize": null,
"width": null,
"contentStyle": "plain",
"contentRadius": null,
"buttonRadius": "pill",
"buttonSize": null,
"logoWidth": 120,
"logoAlign": null,
"showHeader": null,
"socialLinks": [{ "network": "instagram", "url": "https://instagram.com/dailyfern" }]
},
"reputationStatus": "OK",
"marketingPaused": false,
"test": false,
"createdAt": "2026-10-17T09:30:00Z"
}
| Field | Meaning |
|---|---|
externalId | Your own reference, unique in the account and the mode (live or test) |
defaultFromName, defaultFromEmail, defaultReplyTo | Sender used when an email doesn't set one. The address must use a verified domain of the space |
trackOpens, trackClicks | Open pixel and click tracking of marketing emails, on by default. Transactional emails are tracked only when sent with track |
confirmAddressOnce | true: double opt-in confirms an address once for the space, a contact subscribed to one list joins another without confirming again. false (default): each list asks for its own confirmation. Double opt-in |
brandColor, logoUrl | Branding of emails and hosted pages (unsubscribe, preferences, confirmation). Default color #c2602a, no logo |
buttonColor, buttonTextColor | Colors of email buttons. null: the brand color, and white or dark text, whichever reads best |
emailTheme | The rest of the email design. null fields take the default. Email theme |
reputationStatus | OK, WATCH or ALERT, over the last 7 days. Reputation |
marketingPaused | true when campaigns and flows are paused. Transactional emails keep flowing |
test | true for a test space: nothing is delivered |
List spaces
GET /v1/spaces
Every space of the account in the mode of the key, oldest first: test spaces with a test key (ml_test_), live spaces otherwise.
Create a space
POST /v1/spaces
#rrggbb. White text sits on it: pick a dark enough color.https URL of a PNG or JPG logo, 1000 characters at most. SVG is refused: Gmail and Outlook don't show it.An invalid brandColor or logoUrl answers 400.
A test key (ml_test_) creates a test space.
Returns 201 with the space object, or 200 with the existing space when the externalId is already used.
The free plan includes one live space: creating another answers 402 quota_exceeded. Test spaces do not count. Plans.
Get a space
GET /v1/spaces/{id}
Update a space
PATCH /v1/spaces/{id}
Changes the fields sent; the others stay as they are.
false when the lists have nothing in common.#rrggbb.#rrggbb. An empty string goes back to the brand color.#rrggbb. An empty string goes back to automatic.curl -X PATCH https://api.kulamail.com/v1/spaces/9b8a7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d \
-H "Authorization: Bearer ml_your_account_key" \
-H "Content-Type: application/json" \
-d '{ "defaultFromName": "The Daily Fern", "defaultFromEmail": "hello@dailyfern.com" }'
Email theme
Every field is optional; null or absent takes the default, the rendering of a space that never changed its design.
| Field | Values | Default |
|---|---|---|
textColor, headingColor | #rrggbb | #1f2328; headings take the text color |
linkColor | #rrggbb | The brand color |
backgroundColor | #rrggbb, around the content | #f6f6f4 |
contentBackgroundColor | #rrggbb | #ffffff |
mutedColor | #rrggbb, footer and small print | #8a8f98 |
fontFamily, headingFontFamily | A font id | Inter, then system fonts |
fontSize | 14 to 18 (px) | 16 |
width | 520 to 720 (px) | 600 |
contentStyle | card or plain | card |
contentRadius | 0 to 32 (px), corners of the card | 8 |
buttonRadius | square, rounded or pill | rounded |
buttonSize | small, medium or large | medium |
logoWidth | 40 to 400 (px) | 140 |
logoAlign | left, center or right | center |
showHeader | false hides the logo | true |
socialLinks | Up to 12 { "network", "url" }, shown under the footer. Networks | None |
An invalid value answers 400 invalid_theme, and the message names the field.
curl -X PATCH https://api.kulamail.com/v1/spaces/9b8a7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d -H "Authorization: Bearer ml_your_account_key" -H "Content-Type: application/json" -d '{ "emailTheme": { "fontFamily": "lora", "contentStyle": "plain", "buttonRadius": "pill" } }'
Get the reputation of a space
GET /v1/spaces/{id}/reputation
Raw numbers of the last 7 days, to show your customers or watch their spaces. Rates are fractions (0.004 = 0.4 %), null when nothing was sent.
{
"from": "2026-10-12T09:30:00Z",
"to": "2026-10-19T09:30:00Z",
"sent": 12480,
"hardBounces": 31,
"hardBounceRate": 0.0025,
"complaints": 2,
"complaintRate": 0.0003,
"gmailOpens": { "delivered": 5210, "opened": 1980, "openRate": 0.38 },
"otherOpens": { "delivered": 6950, "opened": 2920, "openRate": 0.42 },
"contactsUnderReview": 340,
"reputationStatus": "OK",
"marketing": { "paused": false, "pausedAt": null, "pausedReason": null, "pausedDetail": null }
}
| Field | Meaning |
|---|---|
complaints, complaintRate | Outside Gmail, which doesn't report complaints one by one |
gmailOpens, otherOpens | Human opens at Gmail and at the other identified providers. Machine opens are left out |
contactsUnderReview | Active contacts with no open, click or confirmed subscription yet. Contacts under review |
reputationStatus | OK, WATCH or ALERT. Reputation |
marketing.pausedReason | ACCOUNT (paused by you), or REPUTATION, SES_TENANT_PAUSED, MANUAL (paused by Kula) |
A Gmail open rate well below the other providers often means your emails land in Gmail's spam folder.
Get the reputation of every space
GET /v1/spaces/reputation
The same numbers for every space of the account in one call, to watch hundreds of spaces without hitting the rate limit. Spaces in the mode of the key, oldest first. Not paginated: the response holds every space.
Each entry has the fields of the reputation of a space, computed the same way, plus spaceId and externalId. from and to are given once for the whole response.
{
"from": "2026-10-12T09:30:00Z",
"to": "2026-10-19T09:30:00Z",
"spaces": [
{
"spaceId": "9b8a7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
"externalId": "blog_42",
"sent": 12480,
"hardBounces": 31,
"hardBounceRate": 0.0025,
"complaints": 2,
"complaintRate": 0.0003,
"gmailOpens": { "delivered": 5210, "opened": 1980, "openRate": 0.38 },
"otherOpens": { "delivered": 6950, "opened": 2920, "openRate": 0.42 },
"contactsUnderReview": 340,
"reputationStatus": "OK",
"marketing": { "paused": false, "pausedAt": null, "pausedReason": null, "pausedDetail": null }
}
]
}
Pause and resume marketing
POST /v1/spaces/{id}/marketing/pause
Campaigns and flows of the space wait; queued emails leave once you resume. Transactional emails keep flowing. Optional body: { "reason": "Customer unpaid" }, 500 characters at most. Answers 409 if marketing is already paused.
POST /v1/spaces/{id}/marketing/resume
Lifts a pause you made (ACCOUNT). A pause by Kula answers 409 paused_by_kula: contact support. If Kula pauses a space you had paused, Kula's pause replaces yours.
Both return the marketing object above.
Delete a space
DELETE /v1/spaces/{id}
Deletes the space and everything in it: domains, contacts, lists, campaigns, flows and keys. Irreversible. Answers 204, or 400 for the last live space of the account.