API reference / Vault
Add a vault item
Adds a login, API key, secret or note to a collection you may use (the default one unless you name another). Values go in sealed and never come out through the API. Cards are added in the app only. A login's urls say where it may be used; they can't be changed through the API later.
/api/v1/vault/itemsOther ways to call it
troopy vault addIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Body
application/jsoncollectionstringThe collection to add it to; the default one if left out
kind*enum<string>loginapi_keysecretnote
name*stringAt least 1 characters · At most 200 characters
tagsarray<string>At most 10 items
urlsarray<string>Logins: the pages it signs in on. API keys: the service's address
At most 10 items
environmentenum<string>testlive
expiresAtstringdate-time
valuesobjectField values by key, like {"username": "ops@acme.com", "password": "..."}. Each kind's keys: VAULT_TEMPLATES
customarray<object>Fields of your own, added after the kind's
At most 20 items
4 properties
label*stringAt least 1 characters · At most 60 characters
value*stringAt most 20000 characters
concealedbooleanDefault true
typeenum<string>textemailurlpasswordmultiline
Default "text"
Response
201 · application/jsondata*object18 properties
id*stringA 24-character id
collection*object2 properties
id*stringA 24-character id
name*stringkind*enum<string>loginapi_keysecretnotecard
name*stringtags*array<string>urls*array<string>Logins: the pages it signs in on. API keys: the service's address
sites*array<string>The domains of urls: where a teammate may use a login
environment*enum<string> | nullAPI keys: test or live
testlive
expiresAt*string | nullfields*array<object>7 properties
key*stringStable: references (troopy://vault/<item>/<key>) name it
label*stringtype*enum<string>textemailurlpasswordtotpmonthmultiline
concealed*booleanConcealed values never leave through the API; people see them in the app after unlocking
value*string | nullThe value when it isn't concealed; null when concealed or empty
hint*string | nullA long key's or card number's last four characters
set*booleanWhether it has a value
status*enum<string>unconfirmed: a login a teammate made signing up, until it signs in with it or a person confirms it
activeunconfirmed
importedFrom*enum<string> | null1passwordbitwardenlastpasschrome
createdBy*objectWho added it: a person, a teammate (type agent) or an API key
3 properties
type*enum<string>personagentapi
id*stringname*stringupdatedBy*objectWho wrote it
3 properties
type*enum<string>personagentapi
id*stringname*stringlevel*enum<string>What you may do with it
viewusemanage
createdAt*stringISO 8601 date and time
updatedAt*stringISO 8601 date and time
lastUsedAt*string | null