Skip to main content
POST
Save a login
  • The values pass through this client and its model provider. Warn the user first, or send deliver “dashboard” with only site_url and label to get a Dashboard link where the person enters the login instead.
  • A Personal account keeps one login per website, fixed to its identity after the first verified sign-in. A Business account may save several.
  • On a Business team with environments, environments sets where it can be used: the keys it serves, or all. Left out, it serves only the environment it is saved in. A run never picks a login its environment cannot use.
  • While the account’s secure login storage is first being set up, it answers 202 with a pending login instead: the login is held for up to 10 minutes and saved once storage is ready. Read it with logins.get_pending until it is saved or failed.
  • Callers: an API key, an MCP OAuth token or a Dashboard session.
  • Permission: logins:manage.
  • Effect: Creates or changes something.
  • Errors: site_not_supported, login_storage_pending, site_login_exists, login_identity_conflict, legacy_duplicate_saved_logins, saved_login_unsettled, login_in_use, login_save_in_progress, invalid_credential, acceptance_unknown, and the errors any request can get.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
site_url
string
required

a valid website address, such as instacart.com or a pasted URL, saved as its HTTPS origin

Maximum string length: 2048
label
string

a string at most 200 character(s) long

Required string length: 1 - 200
username
string

a string at most 1024 character(s) long

Required string length: 1 - 1024
email
string

a string at most 320 character(s) long

Required string length: 3 - 320
phone
string

a string at most 64 character(s) long

Required string length: 3 - 64
account_number
string

a string at most 128 character(s) long

Required string length: 1 - 128
primary_identifier
enum<string>

The identifier it signs in with; else the first it holds in this order

Available options:
username,
email,
phone,
account_number
password
string

a string at most 16384 character(s) long

Required string length: 1 - 16384
sign_in
enum<string>

"password" when unset. code: the site sends a code each sign-in, so no password is saved. secret: one secret, held in password, and no identifier

Available options:
password,
code,
secret
date_of_birth
string

a string matching the pattern ^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$

Pattern: ^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$
zip
string

a string at most 10 character(s) long

Required string length: 3 - 10
authenticator_secret
string

a string at most 4096 character(s) long

Required string length: 1 - 4096
recovery_codes
string[]

an array of at most 20 item(s)

Required array length: 1 - 20 elements

a string at most 64 character(s) long

Required string length: 4 - 64
preferred_method
enum<string>

A two-factor method

Available options:
sms,
call,
email,
authenticator,
push,
recovery_code
environments

Can be used in: the keys of the team's environments it serves, or all. Left out, a team with environments limits a new login to the one it is saved in, production when the call names none

Available options:
all
deliver
enum<string>

Return a Dashboard link where the person enters the login, so no secret reaches this client

Available options:
dashboard

Response

With deliver dashboard: where to finish

dashboard_url
string
required

A signed-in Dashboard page where the person finishes this and sees the secret once