---
title: "Start a mailbox connect for a sender profile"
method: POST
path: "/api/sender-profiles/{sid}/mailboxes/start-connect"
tags: ["sender_profiles"]
---

# Start a mailbox connect for a sender profile

`POST /api/sender-profiles/{sid}/mailboxes/start-connect`

## Request

- Base URL: `https://beta.getsales.io/unibox/v1`
- URL: `https://beta.getsales.io/unibox/v1/api/sender-profiles/{sid}/mailboxes/start-connect`
- Auth: HTTP bearer and API key in header `Team-SID`

Start connecting a new Google or Microsoft mailbox to this sender profile: the consent runs on gtm's hosted page and the connected delivery attaches the mailbox here, not to a new sender profile. The intent lives 24 hours, matches on the provider and keeps history_since and history_scope, so run one at a time per provider. Typed IMAP / SMTP credentials: connect_sender_profile_imap_mailbox; a mailbox gtm already holds: attach_sender_profile_mailbox.

Contract:
- MCP tool `start_sender_profile_mailbox_connect`, registry package `mcp.unibox/sender_profiles`, mount `unibox.sender-profile-mailboxes`.
- Operation `action`, response envelope `action`.
- Flags: none.

## Path parameters

- `sid` string, required: Sender profile sid (ub_sp_…).

## Request body

- StartSenderProfileMailboxConnectRequest: Request body of `start_sender_profile_mailbox_connect`.
  - `provider` 'google' | 'microsoft', required: Required. Only the two OAuth providers land on a sender profile this way; for IMAP / SMTP credentials use connect_sender_profile_imap_mailbox.
  - `success_redirect_url` string, uri, nullable: Where gtm sends the human after the consent. gtm follows it only for allow-listed hosts.
  - `display_name` string, nullable: The From name to give the mailbox once it lands on the sender profile.
  - `history_since` string, nullable: The mailbox's history window: import its mail from this day (YYYY-MM-DD) on, or none of the past with `now` (only what arrives once the mailbox lands); omitted or null = all of it. The intent keeps it until the mailbox lands.
  - `history_scope` 'all' | 'playtable_people', nullable: The mailbox's import scope: playtable_people (omitted or null, the default) takes only the threads with a person the workspace keeps in a playtable, all every thread. The intent keeps it until the mailbox lands.

## Response `200`

`action` success envelope.

- StartSenderProfileMailboxConnectResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` object, nullable, required
  - `result` object, required
    - `connect_url` string, required: gtm's one-time hosted page: the OAuth consent or the IMAP form runs there, never here.
    - `connect_url_expires_at` string, nullable, required: ISO 8601 UTC expiry of the link.
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox/revisions/8f1bc317897f?raw)
