> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Managed Auth Connect Link Create



## OpenAPI

````yaml https://api.notte.cc/openapi.json post /managed-auth/connect-links
openapi: 3.1.0
info:
  title: Notte API
  description: >-
    Notte API is a REST API that allows you to interact with Notte. It is used
    to create cloud browser sessions, scrape webpages, and run web ai agents to
    act on your behalf on the internet.
  version: 1.4.40
  x-logo:
    url: https://www.notte.cc/images/logo/logo-white.png
servers: []
security: []
tags:
  - name: agents
    description: Web AI agents (start, stop, status, replay, etc.)
  - name: sessions
    description: Session management (start, stop, status, etc.)
  - name: debug
    description: Session debugging tools (replay,logs, recording, etc.)
  - name: page
    description: Page operations withing a session (observe, step, scrape, etc.)
  - name: storage
    description: File storage interface (upload, download, list, etc.)
  - name: network
    description: Network requests/responses withing a session (intercept, etc.)
  - name: vaults
    description: >-
      Vault & Credentials management (create/delete vaults, create/delete
      credentials, etc.)
  - name: personas
    description: Persona management (create, delete, list emails, list sms, etc.)
  - name: scrape
    description: >-
      Webpage scraping (scrape, screenshot, etc.) with automatic session
      management.
  - name: health
    description: Health check endpoint.
  - name: usage
    description: Usage logs (usage, logs, etc.)
  - name: functions
    description: Functions management (create, delete, list, etc.)
paths:
  /managed-auth/connect-links:
    post:
      tags:
        - managed-auth
      summary: Managed Auth Connect Link Create
      operationId: managed_auth_connect_link_create
      parameters:
        - name: x-notte-request-origin
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Request-Origin
        - name: x-notte-sdk-version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Sdk-Version
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectLinkCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectLinkCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
      x-codeSamples:
        - lang: Curl
          source: >-
            curl -X POST "https://api.notte.cc/managed-auth/connect-links" \

            -H "Authorization: Bearer $NOTTE_API_KEY" \

            -H "Content-Type: application/json" \

            -d '{

            "template_id": "template_id",

            "label": "Acme user Airbnb account",

            "external_user_id": "your-user-42",

            "success_redirect_uri":
            "https://acme.example.com/settings?connected=1",

            "error_redirect_uri":
            "https://acme.example.com/settings?connected=0",

            "webhook_url": "https://acme.example.com/hooks/notte",

            "ttl_seconds": 900

            }'
          label: curl
components:
  schemas:
    ConnectLinkCreateRequest:
      properties:
        template_id:
          type: string
          title: Template Id
          description: Connector this link collects credentials for.
        label:
          type: string
          maxLength: 120
          minLength: 1
          title: Label
          description: Name the resulting connection is created with.
        external_user_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: External User Id
          description: >-
            Your own identifier for the end user. Echoed back on the completion
            webhook.
        two_fa_method:
          anyOf:
            - type: string
              enum:
                - email
                - sms
                - totp
            - type: 'null'
          title: Two Fa Method
          description: >-
            Second factor this connection will use. Required when the connector
            supports more than one, because the choice decides whether a mailbox
            is needed.
        mailbox_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Mailbox Id
          description: >-
            Mailbox to read email 2FA codes from. Required when the resolved
            method is email.
        success_redirect_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Success Redirect Uri
          description: Where the end user is sent once the account is connected.
        error_redirect_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Redirect Uri
          description: Where the end user is sent when the connection cannot be completed.
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: >-
            Receives the signed completion callback. See the connect-link
            webhook docs.
        ttl_seconds:
          type: integer
          maximum: 86400
          minimum: 60
          title: Ttl Seconds
          description: How long the link stays usable.
          default: 900
        schedule:
          type: boolean
          title: Schedule
          description: Whether the resulting connection re-authenticates on a schedule.
          default: true
      type: object
      required:
        - template_id
        - label
      title: ConnectLinkCreateRequest
    ConnectLinkCreateResponse:
      properties:
        connect_link_id:
          type: string
          title: Connect Link Id
        connect_url:
          type: string
          title: Connect Url
          description: Send your end user here.
        token:
          type: string
          title: Token
          description: Returned once and never again - only its hash is stored.
        expires_at:
          type: string
          format: date-time
          title: Expires At
        webhook_signing_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Signing Secret
          description: >-
            Workspace secret to verify the completion webhook with. Present only
            when a webhook_url was supplied. Stable across links, so it is safe
            to store once.
      type: object
      required:
        - connect_link_id
        - connect_url
        - token
        - expires_at
      title: ConnectLinkCreateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````