Apply a label to an email

POST
/emails/{emailId}/labels/{labelId}

Applies a manual or AI label (ids from GET /labels). Idempotent: applying a label the email already has returns the same list and does not fire label.applied again. A real application is pushed to open inbox windows and delivered to label.applied webhooks. No Idempotency-Key handling: the operation is naturally idempotent.

Authorization

apiKey
Authorization<token>

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

Path Parameters

emailId*string

Inbox id of the email (from GET /emails, webhooks...).

labelId*string

Label id, from GET /labels.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/emails/cmemacme0000000000000001/labels/cmtgacme0000000000000001" \  -H "Authorization: YOUR_API_KEY"
{  "labels": [    {      "id": "cmtgacme0000000000000001",      "name": "Quotes",      "color": "#16a34a",      "isAiLabel": false    },    {      "id": "cmtgacme0000000000000002",      "name": "Interested",      "color": "#2563eb",      "isAiLabel": true    }  ]}