---
title: "Change a saved login"
method: PATCH
path: "/v1/logins/{id}"
tags: ["logins"]
---

# Change a saved login

`PATCH /v1/logins/{id}`

## Request

- Base URL: `https://api.pomerado.ai`
- URL: `https://api.pomerado.ai/v1/logins/{id}`
- Auth: HTTP bearer

Changes a saved login's fields and returns the changed login.

- A field left out is kept; null clears an optional one. The website and the sign-in type (password or code) never change.
- On a password login, changing label, username, primary_identifier or authenticator_secret also needs password.
- The values pass through this client and its model provider. Warn the user first, or send only deliver "dashboard" to get the login's Dashboard edit page instead.

## Path parameters

- `id` string, required

## Request body

- object
  - `label` string, nullable: a string at most 200 character(s) long
  - `username` string: a string at most 1024 character(s) long
  - `email` string, nullable: a string at most 320 character(s) long
  - `phone` string, nullable: a string at most 64 character(s) long
  - `account_number` string, nullable: a string at most 128 character(s) long
  - `primary_identifier` 'username' | 'email' | 'phone' | 'account_number': The identifier it signs in with; else the first it holds in this order
  - `password` string: a string at most 16384 character(s) long
  - `date_of_birth` string, nullable: a string matching the pattern ^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$
  - `zip` string, nullable: a string at most 10 character(s) long
  - `authenticator_secret` string, nullable: a string at most 4096 character(s) long
  - `recovery_codes` string[], nullable: an array of at most 20 item(s)
  - `preferred_method` 'sms' | 'call' | 'email' | 'authenticator' | 'push' | 'recovery_code', nullable: A two-factor method
  - `deliver` 'dashboard': Return a Dashboard link where the person enters the login, so no secret reaches this client

## Response `200`

The changed login; With deliver dashboard: where to finish

- union
  - Login
    - `id` string, required: a saved login ID: login_ and 32 lowercase hex digits
    - `label` string, nullable, required
    - `site` object, required
      - `url` string, required
      - `name` string, required: The site as people say it
    - `username_masked` string, required
    - `identifier_type` 'username' | 'email' | 'phone' | 'account_number', required
    - `sign_in` 'password' | 'code', required
    - `saved_fields` string[], nullable, required: What it holds besides its username and password; null when not recorded
    - `two_factor` object, required
      - `authenticator` boolean, nullable, required
      - `sms_number` 'none' | 'linked', required
    - `status` 'unverified' | 'verified' | 'needs_attention', required
    - `needs_attention` union, required
      - object
        - `field` 'username' | 'email' | 'phone' | 'account_number' | 'password', required
      - object
        - `reason` 'account_locked', required: The website said the account is locked; unlock it on the website
    - `locked` boolean, required: Personal accounts: its identity is fixed after the first verified sign-in
    - `your_access` 'use' | 'edit' | 'manage', required: use: run and build with it. edit: also reveal and change it. manage: also share and delete it
    - `created_at` string, required: When it was saved, ISO 8601 UTC
    - `updated_at` string, required: When it last changed, ISO 8601 UTC
    - `verified_at` string, nullable, required: Its first verified sign-in, ISO 8601 UTC; null before one
  - DashboardDelivery
    - `dashboard_url` string, required: A signed-in Dashboard page where the person finishes this and sees the secret once

## Other responses

- `400`: invalid_request
- `401`: reauthentication_required, unauthorized
- `403`: forbidden
- `404`: not_found
- `409`: site_login_exists, login_identity_conflict, legacy_duplicate_saved_logins, saved_login_unsettled, login_in_use, login_save_in_progress
- `413`: request_too_large
- `422`: invalid_credential
- `500`: internal_error
- `503`: acceptance_unknown, temporarily_unavailable

---

[API](https://skmtc.dev/pomerado/apis/pomerado-api.md) · [All operations](https://skmtc.dev/pomerado/apis/pomerado-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pomerado/apis/pomerado-api/revisions/48dac2a3143e?raw)
