Bulk mark read, trash, apply or remove a label
Applies one action to up to 500 emails. Ids that are unknown, from another workspace or already in the target state do not fail the batch: they come back in skippedIds (or unchangedIds for the read state). Duplicates and non string entries are ignored.
Cost: one quota unit per entry of emailIds, counted against BOTH the per minute limit and the monthly quota. Known issue: a batch larger than the per minute limit of the plan is always refused with 429 RATE_LIMIT_EXCEEDED, whatever Retry-After says. Every Emelia workspace is on FREE (60 per minute): keep batches at 60 ids or fewer.
label.applied webhooks are sent for every processed email as soon as at least one of them actually changed.
Supports Idempotency-Key; a replay still consumes the same quota units.
Authorization
apiKey Your 48 character Emelia API key, the same as for the Emelia API, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api. Disabling a key can take up to 5 minutes to apply to the Inbox API.
In: header
Header Parameters
Any unique string (a UUID). The first successful response is stored 24 hours and replayed with Idempotent-Replay: true for the same key, method, URL and body. Same key with another body: 409 CONFLICT. Original call still running: 409 CONFLICT. Failed calls (status 400 and above) release the key. Keys are scoped to the workspace, not to the API key: two integrations of the same workspace must not reuse values. Replays count in the quotas.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/emails/bulk" \ -H "Authorization: YOUR_API_KEY" \ -H "Idempotency-Key: 3f6c1b2e-7d4a-4f0e-9a51-acme00000001" \ -H "Content-Type: application/json" \ -d '{ "action": "markRead", "isRead": true, "emailIds": [ "cmemacme0000000000000001", "cmemacme0000000000000002", "cmemacme0000000000000003" ] }'{ "updatedIds": [ "cmemacme0000000000000001" ], "unchangedIds": [ "cmemacme0000000000000002" ], "skippedIds": [ "cmemacme0000000000000003" ], "isRead": true}