POST
/
login
Authenticate user and return session cookies
curl --request POST \
  --url https://prismai.sh/api/login \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cred": {
    "username": "user@example.com",
    "password": "securePassword123"
  },
  "login_method": "password",
  "domain": "https://github.com/login"
}'
{
"cookies": [
{
"name": "session_id",
"value": "xyz789abc123...",
"domain": ".github.com",
"path": "/",
"expires": 1791936891,
"httpOnly": true,
"secure": true,
"sameSite": "Lax"
}
],
"origins": [
"<string>"
]
}

Authorizations

Authorization
string
header
required

Enter your API key with 'pk_' prefix (from https://prismai.sh/workspace)

Body

application/json

Authentication credentials and method

cred
object
required
login_method
enum<string>
required

Authentication method to use. Currently only 'password' is supported.

Available options:
password,
oauth_google,
oauth_github,
magic_link,
otp_email,
otp_sms,
totp
domain
string
required

Full URL to the login page of the target website

Example:

"https://github.com/login"

collectionId
string

Optional collection ID for organizing credentials

Example:

"col_abc123xyz789"

Response

Authentication successful

cookies
object[]
required

Array of session cookies to be set in the browser

origins
string[]
required

Array of allowed origins for the session