Skip to main content
POST
/
vault
/
credentials
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/vault/credentials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "agentId": "<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": false,
  "folderId": "<string>",
  "organizationId": "<string>",
  "collectionIds": [
    "<string>"
  ]
}
'
{
  "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

Body

application/json

Input for creating a new vault credential

type
enum<string>
required

Type of credential to create

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

Display name for the credential

Minimum string length: 1
agentId

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

Pattern: ^[0-9a-z]+$
notes
string

Free-form notes to attach

login
object

Login data, required when type is login

card
object

Card data, required when type is card

identity
object

Identity data, required when type is identity

oauthToken
object

OAuth token data, required when type is oauth_token

apiKey
object

API key data, required when type is api_key

certificate
object

Certificate data, required when type is certificate

fields
object[]

Custom fields to attach

favorite
boolean
default:false

Mark the credential as a favorite

folderId
string

Folder to place the credential in

organizationId
string

Organization to scope the credential to

collectionIds
string[]

Collections to share the credential with

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