---
title: "Managed Auth Connection Create"
method: POST
path: "/managed-auth/connections"
tags: ["managed-auth"]
---

# Managed Auth Connection Create

`POST /managed-auth/connections`

## Headers

- `x-notte-request-origin` string, nullable
- `x-notte-sdk-version` string, nullable

## Request body

- ManagedAuthConnectionCreateRequest
  - `template_id` string, nullable
  - `label` string, required
  - `credentials` ManagedAuthCredentials, required
    - `username` string, nullable
    - `email` string, nullable
    - `password` string, password, required
    - `mfa_secret` string, password, nullable
  - `schedule` boolean
  - `domain` string, nullable
  - `login_url` string, nullable
  - `allowed_domains` string[]
  - `login_source` union
    - ManagedAuthExistingFunctionSource
      - `kind` 'function', required
      - `function_id` string, required
    - ManagedAuthInlineFunctionSource
      - `kind` 'code', required
      - `source` string, required
  - `verifier_source` union
    - ManagedAuthExistingFunctionSource
      - `kind` 'function', required
      - `function_id` string, required
    - ManagedAuthInlineFunctionSource
      - `kind` 'code', required
      - `source` string, required

## Response `201`

Successful Response

- ManagedAuthConnection
  - `id` string, required
  - `template_id` string, nullable
  - `template_slug` string, nullable
  - `template_name` string, nullable
  - `label` string, required
  - `domain` string, required
  - `login_url` string, nullable
  - `allowed_domains` string[]
  - `profile_id` string, nullable
  - `vault_id` string, nullable
  - `login_source_function_id` string, nullable
  - `login_source_function_version` string, nullable
  - `verifier_source_function_id` string, nullable
  - `verifier_source_function_version` string, nullable
  - `functions_editable` boolean
  - `status` 'provisioning' | 'resetting' | 'setup_required' | 'authenticated' | 'needs_reauth' | 'error' | 'disconnected', required
  - `reauth_mode` 'auto' | 'manual', required
  - `last_checked_at` string, date-time, nullable
  - `last_error` string, nullable
  - `disconnected_at` string, date-time, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/notte/apis/notte-api.md) · [All operations](https://skmtc.net/notte/apis/notte-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/notte/notte-api/revisions/8dda4e3d49cc/schema)
