Views
Create a view
POST
/viewsSaves a filter tree under a name. The tree is bounded like ?filters=: 5 levels, 50 conditions, 500-character values.
Authorization
apiKey AuthorizationBearer <token>
Send your key as Authorization: Bearer mk_…. Session cookies are never accepted on this surface.
In: header
Header Parameters
Idempotency-Key?string
A unique value per operation, such as a UUID. Replays the stored response for 24h. Reusing a key with a different body returns 409.
Length
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
curl -X POST "https://example.com/views" \ -H "Authorization: Bearer $MAYLEE_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "filters": { "_and": [ { "id": "c1", "label": "ai_label", "type": "contains", "value": "cmtgai1b2c3d4e5f6g7h8i9j" }, { "id": "c2", "label": "read_status", "type": "is_false", "value": "" } ], "id": "g1" }, "icon": "🎯", "name": "Leads to answer" }'{ "view": { "createdAt": "2026-07-01T10:00:00.000Z", "filters": { "_and": [ { "id": "c1", "label": "ai_label", "type": "contains", "value": "cmtgai1b2c3d4e5f6g7h8i9j" }, { "id": "c2", "label": "read_status", "type": "is_false", "value": "" } ], "id": "g1" }, "icon": "🎯", "id": "cmvw1a2b3c4d5e6f7g8h9i0j", "mailboxIds": [], "name": "Leads to answer" }}