---
title: Login with credentials
slug: login-with-credentials
docTags: 
createdAt: 2026-04-17T07:48:39.600Z
---

{
  "id": "jZwHrHwF1Kup0c4L0n8dm",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.archbee.com/v2/auth/login",
    "servers": [
      {
        "url": "https://api.archbee.com/v2/auth/login",
        "description": "Production server"
      },
      {
        "url": "https://staging-api.archbee.com/v2/auth/login",
        "description": "Staging server"
      },
      {
        "url": "https://{region}.api.archbee.com/{version}/auth/login",
        "description": "Regional server with variables"
      }
    ],
    "name": "Login with credentials",
    "description": "Authenticates a user with email and password. Returns JWT tokens. No auth required.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "email",
              "kind": "required",
              "type": "string<email>",
              "description": "",
              "example": "user@example.com",
              "format": "email"
            },
            {
              "name": "password",
              "kind": "required",
              "type": "string<password>",
              "description": "",
              "example": "SecureP@ss123",
              "format": "password",
              "minLength": 8,
              "maxLength": 128
            },
            {
              "name": "rememberMe",
              "kind": "optional",
              "type": "boolean",
              "description": "",
              "example": "",
              "default": false
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [
        {
          "name": "email",
          "kind": "required",
          "type": "string<email>",
          "description": "",
          "example": "",
          "format": "email"
        },
        {
          "name": "password",
          "kind": "required",
          "type": "string<password>",
          "description": "",
          "example": "",
          "format": "password"
        }
      ],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Authentication successful",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "TokenResponse",
            "schema": [
              {
                "name": "accessToken",
                "kind": "optional",
                "type": "string",
                "description": "JWT access token",
                "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
              },
              {
                "name": "refreshToken",
                "kind": "optional",
                "type": "string",
                "description": "Refresh token for obtaining new access tokens",
                "example": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4..."
              },
              {
                "name": "tokenType",
                "kind": "optional",
                "type": "string<Bearer>",
                "description": "",
                "example": "Bearer",
                "enum": [
                  "Bearer"
                ]
              },
              {
                "name": "expiresIn",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Token lifetime in seconds",
                "example": 3600,
                "format": "int32"
              }
            ],
            "modelRef": "#/components/schemas/TokenResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Invalid credentials",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Standard error response",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "Machine-readable error code",
                "example": "VALIDATION_ERROR"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Human-readable error message",
                "example": "The request body contains invalid fields"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "array",
                "description": "Detailed validation errors (when applicable)",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "email"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "must be a valid email address"
                  },
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "INVALID_FORMAT"
                  }
                ]
              },
              {
                "name": "requestId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Correlation ID for support inquiries",
                "example": "",
                "format": "uuid"
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "VQVeYRRI0IX720ixTtV5r",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.archbee.com/v2/auth/login \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --form 'email=\"string<email>\"' \\\n     --form 'password=\"string<password>\"'"
        },
        {
          "id": "a4_Uf_lzp2rmMty2ysVQk",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar formdata = new FormData();\nformdata.append(\"email\", \"string<email>\");\nformdata.append(\"password\", \"string<password>\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: formdata,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/v2/auth/login\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "FeyZ4zJ9PoPvu5NQfb93a",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/v2/auth/login\")\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\"\nform_data = [['email', File.open('undefined')],['password', File.open('undefined')]]\nrequest.set_form form_data, 'multipart/form-data'\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "lPG_um1Y-NwZ5lV_AOpNR",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/v2/auth/login\"\n\npayload = {}\nfiles=[\n\n]\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload, files=files)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "VQVeYRRI0IX720ixTtV5r"
    },
    "results": {
      "languages": [
        {
          "id": "2sEUGh0I-7jtizZqGRuuU",
          "language": "200",
          "code": "// Authentication successful\n{\n  \"accessToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"refreshToken\": \"dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...\",\n  \"tokenType\": \"Bearer\",\n  \"expiresIn\": 3600\n}"
        },
        {
          "id": "xCXf5qK--qmna_rfP3fIi",
          "language": "401",
          "code": "// Invalid credentials\n{\n  \"code\": \"VALIDATION_ERROR\",\n  \"message\": \"The request body contains invalid fields\",\n  \"details\": [\n    {\n      \"field\": \"email\",\n      \"message\": \"must be a valid email address\",\n      \"code\": \"INVALID_FORMAT\"\n    }\n  ],\n  \"requestId\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "2sEUGh0I-7jtizZqGRuuU"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}