---
title: Create a set of new login options
slug: api-documentation/create-a-set-of-new-login-options
docTags: 
createdAt: 2026-08-27T16:18:26.773Z
---

{
  "id": "F3aSN11XCGimDNtcIERel",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/user/auth/login-options/batch",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/user/auth/login-options/batch"
      }
    ],
    "name": "Create a set of new login options",
    "description": "Allows portal users to add a new set of login option by specifying configuration details.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site this call is for."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "array",
          "description": "Details required to create a new login option.",
          "customType": "CreateLoginOptionRequest[]",
          "schema": [
            {
              "name": "tenant",
              "kind": "required",
              "type": "string",
              "description": "The tenant identified for which the resource is being created"
            },
            {
              "name": "domain",
              "kind": "required",
              "type": "string",
              "description": "<p>The domain of the Auth0 configuration for the login-option.</p>"
            },
            {
              "name": "auth0ConnectionCode",
              "kind": "required",
              "type": "string",
              "description": "The Auth0 connection code for the login option.",
              "example": "google-oauth2"
            },
            {
              "name": "title",
              "kind": "required",
              "type": "string",
              "description": "<p>A user-friendly label for the login option.</p>",
              "example": "Google"
            },
            {
              "name": "iconCode",
              "kind": "required",
              "type": "string",
              "description": "<p>Icon Code to use from icons pre-wired in the FE application,</p>",
              "example": "icon-google"
            }
          ],
          "modelRef": "#/components/schemas/CreateLoginOptionRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>(DEPRECATED) This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        },
        {
          "id": "SessionIdAccess",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Session based authorization. This authentication is required for clients to interact with any of the management APIs. Similar to ''LoggedIn'', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "in": "header"
        },
        {
          "id": "ApiKeyAccess",
          "name": "X-Upstart-Api-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "Api key based authorization.",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Successfully created the login option.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The login options created by a successful batch request.</p>\n<p>Wraps what used to be a bare array. Tapir models an operation's multiple 2xx statuses as a\noneOf and picks the variant by type, so 201 could not stay an array alongside the 207\npartial-success object. See docs/CONTROL-CENTER-MIGRATION.md.</p>",
            "customType": "CreateLoginOptionsResponse",
            "schema": [
              {
                "name": "loginOptions",
                "kind": "required",
                "type": "array",
                "description": "<p>A login option offered for a tenant and domain, with its display title, icon and the Auth0 connection it uses.</p>",
                "modelRef": "#/components/schemas/LoginOption",
                "customType": "LoginOption[]",
                "schema": [
                  {
                    "name": "tenant",
                    "kind": "required",
                    "type": "string",
                    "description": "The tenant identified for which the resource belongs"
                  },
                  {
                    "name": "domain",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The domain of the Auth0 configuration for the login-option.</p>"
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "Unique identifier for the login option.",
                    "example": "8ad2f2d1-91fc-40ld-8f94-64c787ba009f",
                    "format": "uuid"
                  },
                  {
                    "name": "title",
                    "kind": "required",
                    "type": "string",
                    "description": "Title or label for the login option.",
                    "example": "Google"
                  },
                  {
                    "name": "iconCode",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>Icon Code to use from icons pre-wired in the FE application,</p>",
                    "example": "icon-google"
                  },
                  {
                    "name": "auth0ConnectionCode",
                    "kind": "required",
                    "type": "string",
                    "description": "The Auth0 connection code for the login option.",
                    "example": "google-oauth2"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/CreateLoginOptionsResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "207",
        "description": "<p>Partial Success. Some login options were created successfully, while others failed.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Result of a batch login option creation, listing the options created and any per-item errors.</p>",
            "customType": "CreateLoginOptionsPartialResponse",
            "schema": [
              {
                "name": "success",
                "kind": "required",
                "type": "array",
                "description": "<p>A login option offered for a tenant and domain, with its display title, icon and the Auth0 connection it uses.</p>",
                "modelRef": "#/components/schemas/LoginOption",
                "customType": "LoginOption[]",
                "schema": [
                  {
                    "name": "tenant",
                    "kind": "required",
                    "type": "string",
                    "description": "The tenant identified for which the resource belongs"
                  },
                  {
                    "name": "domain",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The domain of the Auth0 configuration for the login-option.</p>"
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string<uuid>",
                    "description": "Unique identifier for the login option.",
                    "example": "8ad2f2d1-91fc-40ld-8f94-64c787ba009f",
                    "format": "uuid"
                  },
                  {
                    "name": "title",
                    "kind": "required",
                    "type": "string",
                    "description": "Title or label for the login option.",
                    "example": "Google"
                  },
                  {
                    "name": "iconCode",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>Icon Code to use from icons pre-wired in the FE application,</p>",
                    "example": "icon-google"
                  },
                  {
                    "name": "auth0ConnectionCode",
                    "kind": "required",
                    "type": "string",
                    "description": "The Auth0 connection code for the login option.",
                    "example": "google-oauth2"
                  }
                ]
              },
              {
                "name": "errors",
                "kind": "required",
                "type": "array",
                "description": "Details of a request that failed validation.",
                "modelRef": "#/components/schemas/ValidationErrorResponse",
                "customType": "ValidationErrorResponse[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "detail",
                    "kind": "required",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "reason",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/CreateLoginOptionsPartialResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Details of a request that failed validation.",
            "customType": "ValidationErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Credentials are missing, expired or insufficient (HTTP 401).</p>",
            "customType": "UnauthorizedError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "<p>An update to this resource requires the if-match and if-unmodified-since headers to be sent in order to process the request.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The request is understood but refused (HTTP 403).</p>",
            "customType": "ForbiddenError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ForbiddenError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "The requested resource was not found in the NoChannel system.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The addressed resource does not exist (HTTP 404).</p>",
            "customType": "NotFoundError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/NotFoundError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "Conflict. The login option with the specified Auth0 connection code already exists.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The request conflicts with existing state (HTTP 409).</p>",
            "customType": "ConflictError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ConflictError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The request failed for an unexpected reason (HTTP 500).</p>",
            "customType": "InternalServerError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/InternalServerError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "xhoKZYA7ygkg-NBIF6dYc",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/user/auth/login-options/batch \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --data '[\n     {\n     \"tenant\": \"\",\n     \"domain\": \"\",\n     \"auth0ConnectionCode\": \"google-oauth2\",\n     \"title\": \"Google\",\n     \"iconCode\": \"icon-google\"\n     }\n     ]'"
        },
        {
          "id": "dxmfgbN3Yojp-9nP__jNM",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\n\nvar raw = JSON.stringify([\n   {\n      \"tenant\": \"\",\n      \"domain\": \"\",\n      \"auth0ConnectionCode\": \"google-oauth2\",\n      \"title\": \"Google\",\n      \"iconCode\": \"icon-google\"\n   }\n]);\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/user/auth/login-options/batch\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4Gy0an0MyjRHlS1gA6xkE",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/user/auth/login-options/batch\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-upstart-tenant\"] = \"string\"\nrequest.body = JSON.dump([\n   {\n      \"tenant\": \"\",\n      \"domain\": \"\",\n      \"auth0ConnectionCode\": \"google-oauth2\",\n      \"title\": \"Google\",\n      \"iconCode\": \"icon-google\"\n   }\n])\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "RxyKEK2mYJHoR5Mx7ugv3",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/user/auth/login-options/batch\"\n\npayload = json.dumps([\n   {\n      \"tenant\": \"\",\n      \"domain\": \"\",\n      \"auth0ConnectionCode\": \"google-oauth2\",\n      \"title\": \"Google\",\n      \"iconCode\": \"icon-google\"\n   }\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "xhoKZYA7ygkg-NBIF6dYc"
    },
    "results": {
      "languages": [
        {
          "id": "tyCsLlLKs192J24I_hn7L",
          "language": "201",
          "code": "// Successfully created the login option.\n{\n  \"loginOptions\": [\n    {\n      \"tenant\": \"\",\n      \"domain\": \"\",\n      \"id\": \"8ad2f2d1-91fc-40ld-8f94-64c787ba009f\",\n      \"title\": \"Google\",\n      \"iconCode\": \"icon-google\",\n      \"auth0ConnectionCode\": \"google-oauth2\"\n    }\n  ]\n}"
        },
        {
          "id": "sgU2tiSDoFzYXewLYZVLf",
          "language": "207",
          "code": "// Partial Success. Some login options were created successfully, while others failed.\n{\n  \"success\": [\n    {\n      \"tenant\": \"\",\n      \"domain\": \"\",\n      \"id\": \"8ad2f2d1-91fc-40ld-8f94-64c787ba009f\",\n      \"title\": \"Google\",\n      \"iconCode\": \"icon-google\",\n      \"auth0ConnectionCode\": \"google-oauth2\"\n    }\n  ],\n  \"errors\": [\n    {\n      \"name\": \"\",\n      \"code\": \"\",\n      \"detail\": [\n        \"\"\n      ],\n      \"reason\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "Pz9ZyTGxuU4nw6OWKY9GD",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": [\n    \"\"\n  ],\n  \"reason\": \"\"\n}"
        },
        {
          "id": "jsopWmvHbDL9myGMsN926",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "ZgW8XFtyWFN4GnTA0i8Ew",
          "language": "403",
          "code": "// An update to this resource requires the if-match and if-unmodified-since headers to be sent in order to process the request.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "uRCO5P0vz778PjTibx9ny",
          "language": "404",
          "code": "// The requested resource was not found in the NoChannel system.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "SCRiVMwrlcFnGo97iRs_o",
          "language": "409",
          "code": "// Conflict. The login option with the specified Auth0 connection code already exists.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "VupwYQgOY_OkDyikhoNWt",
          "language": "500",
          "code": "// Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "tyCsLlLKs192J24I_hn7L"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}