Skip to main content
POST
/
login
curl --request POST \
  --url https://prismai.sh/api/login \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cred": {
    "username": "[email protected]",
    "password": "securePassword123"
  },
  "loginMethod": "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
loginMethod
enum<string>
required

Authentication method to use. Currently supports 'password', 'otp_email', and 'magic_link'.

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"

additionalFields
object

Optional key-value pairs for additional login parameters

Example:
{ "account": "primary", "lastName": "Smith" }
useCache
boolean
default:true

Whether to use cached authentication sessions when available. If true (default), returns cached session cookies if a valid session exists for the domain and credentials within the collection. If false, forces fresh authentication through the browser automation system.

Example:

true

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