---
title: "Connect Byo Mailbox"
method: POST
path: "/api/app-auto-gtm/outreach/mailboxes"
tags: ["outreach"]
---

# Connect Byo Mailbox

`POST /api/app-auto-gtm/outreach/mailboxes`

Connect one BYO SMTP+IMAP mailbox — the UI face of the gateway's
``POST /v1/mailboxes`` (T-41 PR-3 contract).

The gateway verifies SMTP login + IMAP select BEFORE inserting anything:
bad credentials come back as a 422 with a human-readable detail and zero
rows on either side — we pass that detail through verbatim. On success the
box is upserted into the org's park right away (targeted single-box sync)
and the mailbox's domain gets its ``outreach_organization_domains`` row so
the DNS checker starts covering it — no ops step in the loop.

The body is validated by hand (not as a typed parameter) on purpose:
FastAPI's default RequestValidationError echoes the submitted body as the
error ``input`` — which would put ``app_password`` into a 422 response and
into anything that captures 4xx bodies. Field names only, never values.

## Cookies

- `ex_access` string, nullable
- `ex_org` string, nullable

## Request body

- object

## Response `201`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/explee/apis/explee-api.md) · [All operations](https://skmtc.dev/explee/apis/explee-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/explee/explee-api/revisions/aec0744a2cd1/schema)
