> ## Documentation Index
> Fetch the complete documentation index at: https://agentmail.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://agentmail.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://agentmail.manicule.dev/api/mcp.
> Every agent surface: https://agentmail.manicule.dev/.well-known/llms-manifest.json

# Connect Provider (/api-reference/connect-provider)

<!-- agent-signals: reading_time_min: 3 · est_tokens: 1535 · updated: 2026-09-29 -->
Related: [Sign Up](/api-reference/sign-up.md), [Attach Human](/api-reference/attach-human.md), [Verify](/api-reference/verify.md), [List Inboxes](/api-reference/list-inboxes.md), [Create Inbox](/api-reference/create-inbox.md), [Search Inboxes](/api-reference/search-inboxes.md)

# Connect Provider

`POST /v0/providers/{provider_id}/connect`

> Starts signing an inbox in to a provider. Returns a single-use `magic_url`,
> valid for five minutes, to open in the client that will hold the sign-in;
> the client enrolls as the inbox and continues to the provider. Poll
> [Get API Key](/api-reference/api-keys/get) with `api_key_id` for `status`.

Base URL: `https://api.agentmail.to`

Base URL: `https://x402.api.agentmail.to`

Base URL: `https://mpp.api.agentmail.to`

Base URL: `https://api.agentmail.eu`

## OpenAPI

```json
{
  "servers": [
    {
      "url": "https://api.agentmail.to",
      "description": "prod"
    },
    {
      "url": "https://x402.api.agentmail.to",
      "description": "prod-x402"
    },
    {
      "url": "https://mpp.api.agentmail.to",
      "description": "prod-mpp"
    },
    {
      "url": "https://api.agentmail.eu",
      "description": "eu-prod"
    }
  ],
  "security": [
    {
      "Bearer": []
    }
  ],
  "securitySchemes": {
    "Bearer": {
      "type": "http",
      "scheme": "bearer"
    }
  },
  "parameters": [
    {
      "name": "provider_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "description": "ID of provider.",
        "title": "ProviderId"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "inbox_id": {
              "type": "string",
              "description": "The ID of the inbox.",
              "title": "InboxId"
            },
            "accept_disclosure": {
              "type": "boolean",
              "description": "Accept the provider's disclosure on the agent's behalf, skipping the\nfirst-use disclosure page. Requires `provider_share_owner` when owner\nscopes are involved.",
              "title": "AcceptDisclosure"
            }
          },
          "title": "ConnectProviderBody"
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "Response with status 202",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "api_key_id": {
                "type": "string",
                "description": "ID of api key.",
                "title": "ApiKeyId"
              },
              "magic_url": {
                "type": "string",
                "description": "Single-use URL to open in the client that will hold the key.",
                "title": "MagicUrl"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time",
                "description": "Time at which api key expires. Omitted when it does not expire.",
                "title": "ExpiresAt"
              }
            },
            "required": [
              "api_key_id",
              "magic_url",
              "expires_at"
            ],
            "description": "The pending sign-in key the client will activate. Poll Get API Key with `api_key_id` for `status`.",
            "title": "ConnectAccepted"
          }
        }
      }
    },
    "400": {
      "description": "Error response with status 400",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of error.",
                "title": "ErrorName"
              },
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code in snake_case (for example, not_found or missing_permission). Branch on this rather than the message text.",
                "title": "ErrorCode"
              },
              "message": {
                "type": "string",
                "description": "Error message.",
                "title": "ErrorMessage"
              },
              "errors": {
                "description": "Validation errors. Each entry has a path and a message identifying the invalid field."
              },
              "fix": {
                "type": "string",
                "description": "The concrete next action that resolves the error.",
                "title": "ErrorFix"
              },
              "docs": {
                "type": "string",
                "description": "Link to the error reference entry for this code.",
                "title": "ErrorDocs"
              }
            },
            "required": [
              "name",
              "errors"
            ],
            "title": "ValidationErrorResponse"
          }
        }
      }
    },
    "404": {
      "description": "Error response with status 404",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of error.",
                "title": "ErrorName"
              },
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code in snake_case (for example, not_found or missing_permission). Branch on this rather than the message text.",
                "title": "ErrorCode"
              },
              "message": {
                "type": "string",
                "description": "Error message.",
                "title": "ErrorMessage"
              },
              "fix": {
                "type": "string",
                "description": "The concrete next action that resolves the error.",
                "title": "ErrorFix"
              },
              "docs": {
                "type": "string",
                "description": "Link to the error reference entry for this code.",
                "title": "ErrorDocs"
              }
            },
            "required": [
              "name",
              "message"
            ],
            "title": "ErrorResponse"
          }
        }
      }
    }
  }
}
```
