---
updatedAt: 2026-03-06T17:01:43.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/v2.4/llms.txt
---

# Login

Authenticate a customer.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Open API",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/sdk/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/auth/login": {
      "post": {
        "summary": "Login",
        "description": "Authenticate a customer.",
        "operationId": "api-open-login",
        "parameters": [
          {
            "name": "site_id",
            "in": "query",
            "description": "The unique identifier of the site associated with your account.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "password"
                ],
                "properties": {
                  "password": {
                    "type": "string",
                    "description": "The password"
                  },
                  "email": {
                    "type": "string",
                    "description": "The email identifying the customer under the site. Required if the username is not provided."
                  },
                  "username": {
                    "type": "string",
                    "description": "The username identifying the customer under the site. Required if the email is not provided."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data\": {\n        \"id\": 218,\n        \"name\": \"Estel Robel\",\n        \"full_name\": \"Estel Robel\",\n        \"first_name\": \"Estel\",\n        \"last_name\": \"Robel\",\n        \"display_name\": \"Estel Robel\",\n        \"username\": \"Estel\",\n        \"email\": \"Hunter.Pagac17@example.net\",\n        \"organization\": {},\n        \"phone\": null,\n        \"language\": \"en\",\n        \"balance\": 0,\n        \"email_confirm\": false,\n        \"email_hardbounce\": false,\n        \"phone_confirm\": false,\n        \"tin\": null,\n        \"salutation\": \"They/them\",\n        \"title\": \"Dr.\",\n        \"profile_photo\": null,\n        \"currency\": null,\n        \"subscriptions\": null,\n        \"memberships\": null,\n        \"gift_recipients\": null,\n        \"expired_subscriptions\": null,\n        \"addresses\": null,\n        \"invoices\": null,\n        \"charges\": null,\n        \"orders\": null,\n        \"source\": null,\n        \"sources\": [],\n        \"metadata\": {},\n        \"is_created\": false,\n        \"last_login_method\": null,\n        \"auth_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3BlbGNyby1mdHJ1ZGVhdS5uZ3Jvay5pby9hcGkvdjEvc2RrL2F1dGgvcmVnaXN0ZXIiLCJpYXQiOjE2OTgzNTE3ODUsImV4cCI6MTcwMzUzNTc4NSwibmJmIjoxNjk4MzUxNzg1LCJqdGkiOiI2WkZ4WTZ4ZjVSdzk5TEk3Iiwic3ViIjoiMjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.nSSXLzyBGlowPOitZXgKDBzDGZWNdh9nue8bzVQrkME\",\n        \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3BlbGNyby1mdHJ1ZGVhdS5uZ3Jvay5pby9hcGkvdjEvc2RrL2F1dGgvcmVnaXN0ZXIiLCJpYXQiOjE2OTgzNTE3ODUsImV4cCI6MTcwMzUzNTc4NSwibmJmIjoxNjk4MzUxNzg1LCJqdGkiOiI2WkZ4WTZ4ZjVSdzk5TEk3Iiwic3ViIjoiMjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.nSSXLzyBGlowPOitZXgKDBzDGZWNdh9nue8bzVQrkME\"\n    },\n    \"status\": \"success\",\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3BlbGNyby1mdHJ1ZGVhdS5uZ3Jvay5pby9hcGkvdjEvc2RrL2F1dGgvcmVnaXN0ZXIiLCJpYXQiOjE2OTgzNTE3ODUsImV4cCI6MTcwMzUzNTc4NSwibmJmIjoxNjk4MzUxNzg1LCJqdGkiOiI2WkZ4WTZ4ZjVSdzk5TEk3Iiwic3ViIjoiMjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.nSSXLzyBGlowPOitZXgKDBzDGZWNdh9nue8bzVQrkME\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 218,
                          "default": 0
                        },
                        "name": {
                          "type": "string",
                          "example": "Estel Robel"
                        },
                        "full_name": {
                          "type": "string",
                          "example": "Estel Robel"
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Estel"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Robel"
                        },
                        "display_name": {
                          "type": "string",
                          "example": "Estel Robel"
                        },
                        "username": {
                          "type": "string",
                          "example": "Estel"
                        },
                        "email": {
                          "type": "string",
                          "example": "Hunter.Pagac17@example.net"
                        },
                        "organization": {
                          "type": "object",
                          "properties": {}
                        },
                        "phone": {},
                        "language": {
                          "type": "string",
                          "example": "en"
                        },
                        "balance": {
                          "type": "integer",
                          "example": 0,
                          "default": 0
                        },
                        "email_confirm": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "email_hardbounce": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "phone_confirm": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "tin": {},
                        "salutation": {
                          "type": "string",
                          "example": "They/them"
                        },
                        "title": {
                          "type": "string",
                          "example": "Dr."
                        },
                        "profile_photo": {},
                        "currency": {},
                        "subscriptions": {},
                        "memberships": {},
                        "gift_recipients": {},
                        "expired_subscriptions": {},
                        "addresses": {},
                        "invoices": {},
                        "charges": {},
                        "orders": {},
                        "source": {},
                        "sources": {
                          "type": "array"
                        },
                        "metadata": {
                          "type": "object",
                          "properties": {}
                        },
                        "is_created": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "last_login_method": {},
                        "auth_token": {
                          "type": "string",
                          "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3BlbGNyby1mdHJ1ZGVhdS5uZ3Jvay5pby9hcGkvdjEvc2RrL2F1dGgvcmVnaXN0ZXIiLCJpYXQiOjE2OTgzNTE3ODUsImV4cCI6MTcwMzUzNTc4NSwibmJmIjoxNjk4MzUxNzg1LCJqdGkiOiI2WkZ4WTZ4ZjVSdzk5TEk3Iiwic3ViIjoiMjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.nSSXLzyBGlowPOitZXgKDBzDGZWNdh9nue8bzVQrkME"
                        },
                        "token": {
                          "type": "string",
                          "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3BlbGNyby1mdHJ1ZGVhdS5uZ3Jvay5pby9hcGkvdjEvc2RrL2F1dGgvcmVnaXN0ZXIiLCJpYXQiOjE2OTgzNTE3ODUsImV4cCI6MTcwMzUzNTc4NSwibmJmIjoxNjk4MzUxNzg1LCJqdGkiOiI2WkZ4WTZ4ZjVSdzk5TEk3Iiwic3ViIjoiMjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.nSSXLzyBGlowPOitZXgKDBzDGZWNdh9nue8bzVQrkME"
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "access_token": {
                      "type": "string",
                      "example": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3BlbGNyby1mdHJ1ZGVhdS5uZ3Jvay5pby9hcGkvdjEvc2RrL2F1dGgvcmVnaXN0ZXIiLCJpYXQiOjE2OTgzNTE3ODUsImV4cCI6MTcwMzUzNTc4NSwibmJmIjoxNjk4MzUxNzg1LCJqdGkiOiI2WkZ4WTZ4ZjVSdzk5TEk3Iiwic3ViIjoiMjE4IiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.nSSXLzyBGlowPOitZXgKDBzDGZWNdh9nue8bzVQrkME"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [Register](https://docs.pelcro.com/v2.4/reference/api-open-register.md)
* [Social login](https://docs.pelcro.com/v2.4/reference/api-open-social-login.md)
* [Passwordless](https://docs.pelcro.com/v2.4/reference/passwordless.md)