Mailboxes API
API reference for listing, creating, and managing hosted government mailboxes.
Base URL: https://govconnect.ke/v1
Mailbox management endpoints live under /v1/mailboxes. Reading and sending mail for a hosted mailbox uses the separate /v1/inbox API and webmail.
All endpoints require authentication via API Key or JWT cookie. Creating mailboxes also requires ICTA to have approved your institution's mailbox allocation.
Use the official SDK mailboxes resource where available: SDK overview.
List mailboxes
Returns all mailboxes in the active workspace. Optional domain_id query parameter filters to one domain.
List sendable mailboxes
Mailboxes the caller may send from (used by compose and API send flows).
List my mailboxes
Mailboxes assigned to the current user (Officer role path).
Create a mailbox
Request body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
domain_id | string (UUID) | Yes | Verified domain with mail hosting enabled. |
local_part | string | Yes | Address before @, e.g. info (max 64 chars). |
display_name | string | No | Friendly name shown in mail clients. |
quota_bytes | integer | No | Storage quota in bytes. Omit to use the domain/org default. |
user_id | string (UUID) | No | Officer to assign the mailbox to on creation. |
type | string | No | Mailbox type. Defaults to person. |
Returns a MailboxCreateResponse: the created mailbox record, a one-time app_password for webmail and IMAP (shown once), and a client_settings object with IMAP/SMTP/POP host and port. Creation fails with 403 when the org is at its ICTA allowance cap (allocation_required or allocation_exhausted).
Get a mailbox
Storage
Quota and usage breakdown for one mailbox or the whole org.
Credentials and client settings
Assignments
Officers access mailboxes through assignments:
Suspend and activate
Suspended mailboxes cannot send or receive until reactivated.
Bulk create
Create many mailboxes on one domain in a single request (subject to allowance).
Errors
| Status | Cause |
|---|---|
403 Forbidden | Insufficient role, allocation gate, or domain hosting not approved. |
404 Not Found | Mailbox or domain does not exist in this workspace. |
422 Unprocessable Entity | Invalid local part or domain not ready for hosting. |