Skip to main content
PUT
/
vault
/
credentials
/
{id}
cURL
curl --request PUT \
  --url https://api.useanima.sh/v1/vault/credentials/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentId": "<string>",
  "reveal": false,
  "name": "<string>",
  "notes": "<string>",
  "login": {
    "username": "<string>",
    "password": "<string>",
    "uris": [
      {
        "uri": "<string>"
      }
    ],
    "totp": "<string>"
  },
  "card": {
    "cardholderName": "<string>",
    "brand": "<string>",
    "number": "<string>",
    "expMonth": "<string>",
    "expYear": "<string>",
    "code": "<string>"
  },
  "identity": {
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "jsmith@example.com",
    "phone": "<string>",
    "address1": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postalCode": "<string>",
    "country": "<string>",
    "company": "<string>",
    "ssn": "<string>"
  },
  "fields": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "favorite": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "favorite": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "notes": "<string>",
  "login": {
    "username": "<string>",
    "password": "<string>",
    "uris": [
      {
        "uri": "<string>"
      }
    ],
    "totp": "<string>"
  },
  "card": {
    "cardholderName": "<string>",
    "brand": "<string>",
    "number": "<string>",
    "expMonth": "<string>",
    "expYear": "<string>",
    "code": "<string>"
  },
  "identity": {
    "firstName": "<string>",
    "lastName": "<string>",
    "email": "jsmith@example.com",
    "phone": "<string>",
    "address1": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postalCode": "<string>",
    "country": "<string>",
    "company": "<string>",
    "ssn": "<string>"
  },
  "oauthToken": {
    "provider": "<string>",
    "accessToken": "<string>",
    "refreshToken": "<string>",
    "tokenEndpoint": "<string>",
    "clientId": "<string>",
    "scopes": [
      "<string>"
    ],
    "expiresAt": "2023-11-07T05:31:56Z",
    "clientSecret": "<string>",
    "autoRefresh": true
  },
  "apiKey": {
    "provider": "<string>",
    "key": "<string>",
    "prefix": "<string>",
    "rateLimit": {
      "requests": 1,
      "window": "<string>"
    },
    "expiresAt": "2023-11-07T05:31:56Z",
    "scopes": [
      "<string>"
    ]
  },
  "certificate": {
    "certificate": "<string>",
    "privateKey": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z",
    "chain": [
      "<string>"
    ]
  },
  "fields": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "folderId": "<string>",
  "organizationId": "<string>",
  "collectionIds": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Path Parameters

id
string
required

Credential identifier

Body

application/json
agentId

Agent identifier. Optional when using an agent API key (resolved automatically); required when using a master key.

Pattern: ^[0-9a-z]+$
reveal
boolean
default:false

Return unmasked plaintext fields. Requires master key auth. Audit-logged as 'access_reveal'.

name
string

Updated display name

Minimum string length: 1
notes
string

Updated notes

login
object

Updated login data

card
object

Updated card data

identity
object

Updated identity data

oauthToken
object

Updated OAuth token data

apiKey
object

Updated API key data

certificate
object

Updated certificate data

fields
object[]

Updated custom fields

favorite
boolean

Updated favorite status

Response

200 - application/json

OK

Full credential record returned from the vault

id
string
required

Unique credential identifier

type
enum<string>
required

Credential type

Available options:
login,
secure_note,
card,
identity,
oauth_token,
api_key,
certificate
name
string
required

User-defined credential name

favorite
boolean
required

Whether the credential is marked as a favorite

createdAt
string<date-time>
required

Timestamp when the credential was created

updatedAt
string<date-time>
required

Timestamp when the credential was last updated

notes
string

Free-form notes attached to the credential

login
object

Login credential data, present when type is login

card
object

Card credential data, present when type is card

identity
object

Identity credential data, present when type is identity

oauthToken
object

OAuth token data, present when type is oauth_token

apiKey
object

API key data, present when type is api_key

certificate
object

Certificate data, present when type is certificate

fields
object[]

Custom fields attached to the credential

folderId
string

Folder the credential belongs to

organizationId
string

Organization the credential is scoped to

collectionIds
string[]

Collections the credential is shared with