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

# Create a login

> Creates a new login with required credentials



## OpenAPI

````yaml post /logins/create
openapi: 3.1.0
info:
  title: Kaizen API
  version: 1.0.0
  description: API for the Kaizen Automation Platform
servers:
  - url: https://api.kaizenautomation.com
    description: Production server
security: []
paths:
  /logins/create:
    post:
      tags:
        - Logins
      summary: Create a login
      description: Creates a new login with required credentials
      requestBody:
        description: Login creation parameters
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  description: Name of the login for identification
                authenticationUrl:
                  type: string
                  description: URL of the authentication page
                homeUrl:
                  type: string
                  description: URL of the home page of the domain
                iconUrl:
                  type: string
                  maxLength: 700000
                  description: Optional icon URL or data URL for the login logo.
                description:
                  type: string
                  description: >-
                    Optional description/subheading for the login (e.g., "HR
                    portal for employee records")
                loginConfiguration:
                  $ref: >-
                    #/components/schemas/LoginConfigurationWithSensitiveCredentials
                persistSession:
                  type: boolean
                  description: Whether to persist the session after authentication
                isManualAuthentication:
                  type: boolean
                  default: false
                  description: Whether this login requires manual authentication
                useLLMLoginDetection:
                  type: boolean
                  description: >-
                    Whether to use LLM-powered login detection. If false, uses
                    URL-based detection instead.
                loginDetectionPrompt:
                  type: string
                  description: >-
                    Custom prompt to use for LLM-based login detection.
                    Describes what the logged-out experience looks like.
                loginInstructionsPrompt:
                  type: string
                  description: >-
                    Custom instructions for the login agent. Provides guidance
                    on how to complete the login flow for this specific site.
                supportConcurrentLogins:
                  type: boolean
                  description: >-
                    Whether to allow concurrent logins using this login. When
                    false, a lock is acquired before login to prevent
                    simultaneous sessions.
                supportsAgentConcurrency:
                  type: boolean
                  description: >-
                    Whether this login supports concurrent usage by multiple
                    agents. When false (default), only one agent can use this
                    login at a time.
                downtimeWindows:
                  type: array
                  items:
                    type: object
                    properties:
                      dayOfWeek:
                        type: integer
                        minimum: 0
                        maximum: 6
                        description: Day of the week (0 = Sunday, 6 = Saturday)
                      startTime:
                        type: string
                        pattern: ^([01]\d|2[0-3]):[0-5]\d$
                        description: Start time in HH:mm format (24-hour)
                      endTime:
                        type: string
                        pattern: ^([01]\d|2[0-3]):[0-5]\d$
                        description: End time in HH:mm format (24-hour)
                      timezone:
                        type: string
                        description: IANA timezone string (e.g., "America/New_York")
                    required:
                      - dayOfWeek
                      - startTime
                      - endTime
                      - timezone
                  description: >-
                    Recurring weekly downtime windows when the target service is
                    known to be unavailable. Scheduled executions will be
                    skipped during these windows.
                autoRetryOnServiceDown:
                  type: boolean
                  description: >-
                    Whether to automatically retry scheduled executions when the
                    target service appears to be down.
                autoRetryDelayMinutes:
                  type: integer
                  minimum: 1
                  description: >-
                    Number of minutes to wait before retrying when service down
                    is detected. Defaults to 30.
                autoRetryMaxAttempts:
                  type: integer
                  minimum: 1
                  description: >-
                    Maximum number of service-down retry attempts before giving
                    up. Defaults to 3.
              required:
                - name
                - authenticationUrl
                - homeUrl
                - loginConfiguration
      responses:
        '201':
          description: Login created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the login
                  organizationId:
                    type: string
                    description: ID of the organization that owns this login.
                  name:
                    type: string
                    description: Name of the login
                  authenticationUrl:
                    type: string
                    description: URL of the authentication page
                  homeUrl:
                    type: string
                    description: URL of the home page
                  iconUrl:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Icon URL or data URL for the login logo. Null if no custom
                      logo is set.
                  description:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Optional description/subheading for the login. Null if no
                      description is set.
                  loginConfiguration:
                    $ref: '#/components/schemas/LoginConfiguration'
                  createdAt:
                    type: string
                    description: Timestamp when the login was created
                  updatedAt:
                    type: string
                    description: Timestamp when the login was last updated
                  persistSession:
                    type: boolean
                    default: true
                    description: Whether to persist the session after authentication
                  isManualAuthentication:
                    type: boolean
                    default: false
                    description: Whether this login requires manual authentication
                  useLLMLoginDetection:
                    type: boolean
                    description: >-
                      Whether to use LLM-powered login detection. If false, uses
                      URL-based detection instead.
                  loginDetectionPrompt:
                    type: string
                    description: >-
                      Custom prompt to use for LLM-based login detection.
                      Describes what the logged-out experience looks like.
                  loginInstructionsPrompt:
                    type: string
                    description: >-
                      Custom instructions for the login agent. Provides guidance
                      on how to complete the login flow for this specific site.
                  supportConcurrentLogins:
                    type: boolean
                    default: true
                    description: >-
                      Whether to allow concurrent logins using this login. When
                      false, a lock is acquired before login to prevent
                      simultaneous sessions.
                  supportsAgentConcurrency:
                    type: boolean
                    default: false
                    description: >-
                      Whether this login supports concurrent usage by multiple
                      agents. When false (default), only one agent can use this
                      login at a time.
                  downtimeWindows:
                    type: array
                    items:
                      $ref: >-
                        #/components/schemas/Object_dayOfWeek_startTime_endTime_0
                    default: []
                    description: >-
                      Recurring weekly downtime windows when the target service
                      is known to be unavailable.
                  autoRetryOnServiceDown:
                    type: boolean
                    default: false
                    description: >-
                      Whether to automatically retry scheduled executions when
                      the target service appears to be down.
                  autoRetryDelayMinutes:
                    type: integer
                    default: 30
                    description: >-
                      Number of minutes to wait before retrying when service
                      down is detected.
                  autoRetryMaxAttempts:
                    type: integer
                    default: 3
                    description: >-
                      Maximum number of service-down retry attempts before
                      giving up.
                required:
                  - id
                  - organizationId
                  - name
                  - authenticationUrl
                  - homeUrl
                  - iconUrl
                  - description
                  - loginConfiguration
                  - createdAt
                  - updatedAt
                  - persistSession
                  - isManualAuthentication
                  - supportConcurrentLogins
                  - supportsAgentConcurrency
                  - downtimeWindows
                  - autoRetryOnServiceDown
                  - autoRetryDelayMinutes
                  - autoRetryMaxAttempts
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
components:
  schemas:
    LoginConfigurationWithSensitiveCredentials:
      type: object
      properties:
        username:
          type: string
          description: Username for authentication
        twoFactorAuthConfiguration:
          type:
            - object
            - 'null'
          properties:
            method:
              type: string
              enum:
                - Email
                - SMS
                - TOTP
              description: Method used for 2FA verification
            alwaysRequired:
              type: boolean
              description: >-
                Whether 2FA is always required, if it is not, the workflow will
                make a determination based upon the text displayed on the site.
            twoFactorAuthEmail:
              type: string
              description: >-
                The email which the 2FA codes will be sent to, which our system
                will use to associate to the created login. Required when method
                is Email.
            totpSecretKey:
              type: string
              description: >-
                Secret key used for TOTP generation. REQUIRED when method is
                TOTP, optional otherwise. This key is used to generate
                time-based one-time passwords for authentication.
          required:
            - method
            - alwaysRequired
          description: >-
            Configuration for two-factor authentication including sensitive
            credentials
        additionalCredentials:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the additional credential
              key:
                type: string
                description: Key for the additional credential
              value:
                type: string
                description: Value for the additional credential
            required:
              - key
              - value
          description: Additional key-value credentials
        password:
          type: string
          description: >-
            Password for authentication. Required for login credential types,
            optional for API keys and bearer tokens.
      description: >-
        Values for fields required to complete authentication, including
        sensitive credentials.
    LoginConfiguration:
      type: object
      properties:
        username:
          type: string
          description: Username for authentication
        twoFactorAuthConfiguration:
          type:
            - object
            - 'null'
          properties:
            method:
              type: string
              enum:
                - Email
                - SMS
                - TOTP
              description: Method used for 2FA verification
            alwaysRequired:
              type: boolean
              description: >-
                Whether 2FA is always required, if it is not, the workflow will
                make a determination based upon the text displayed on the site.
            twoFactorAuthEmail:
              type: string
              description: >-
                The email which the 2FA codes will be sent to, which our system
                will use to associate to the created login. Required when method
                is Email.
          required:
            - method
            - alwaysRequired
          description: Configuration for two-factor authentication
        additionalCredentials:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier for the additional credential
              key:
                type: string
                description: Key for the additional credential
              value:
                type: string
                description: Value for the additional credential
            required:
              - key
              - value
          description: Additional key-value credentials
      description: >-
        Values for fields required to complete authentication. Sensitive
        credentials are excluded for security.
    Object_dayOfWeek_startTime_endTime_0:
      type: object
      properties:
        dayOfWeek:
          type: integer
          minimum: 0
          maximum: 6
          description: Day of the week (0 = Sunday, 6 = Saturday)
        startTime:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          description: Start time in HH:mm format (24-hour)
        endTime:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
          description: End time in HH:mm format (24-hour)
        timezone:
          type: string
          description: IANA timezone string (e.g., "America/New_York")
      required:
        - dayOfWeek
        - startTime
        - endTime
        - timezone

````