1Password Connect
  1. Items
1Password Connect
  • Activity
    • Retrieve a list of API Requests that have been made.
      GET
  • Health
    • Get state of the server and its dependencies.
      GET
    • Ping the server for liveness
      GET
  • Metrics
    • Query server for exposed Prometheus metrics
      GET
  • Vaults
    • Get all Vaults
      GET
    • Get Vault details and metadata
      GET
  • Items
    • Get all items for inside a Vault
      GET
    • Create a new Item
      POST
    • Delete an Item
      DELETE
    • Get the details of an Item
      GET
    • Update a subset of Item attributes
      PATCH
    • Update an Item
      PUT
  • Files
    • Get all the files inside an Item
      GET
    • Get the details of a File
      GET
    • Get the content of a File
      GET
  1. Items

Create a new Item

POST
/vaults/{vaultUuid}/items
Items
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/vaults//items' \
--header 'Content-Type: application/json' \
--data-raw '{
    "category": "LOGIN",
    "favorite": false,
    "id": "string",
    "tags": [
        "string"
    ],
    "title": "string",
    "urls": [
        {
            "href": "https://example.com",
            "primary": true
        },
        {
            "href": "https://example.org"
        }
    ],
    "vault": {
        "id": "string"
    },
    "version": 0,
    "fields": [
        {
            "generate": false,
            "id": "string",
            "label": "string",
            "purpose": "",
            "recipe": {
                "characterSets": [
                    "LETTERS"
                ],
                "length": 32
            },
            "section": {
                "id": "string"
            },
            "type": "STRING",
            "value": "string"
        }
    ],
    "files": [
        {
            "content": "VGhlIGZ1dHVyZSBiZWxvbmdzIHRvIHRoZSBjdXJpb3VzLgo=",
            "content_path": "v1/vaults/ionaiwtdvgclrixbt6ztpqcxnq/items/p7eflcy7f5mk7vg6zrzf5rjjyu/files/6r65pjq33banznomn7q22sj44e/content",
            "id": "6r65pjq33banznomn7q22sj44e",
            "name": "foo.txt",
            "size": 35
        }
    ],
    "sections": [
        {
            "id": "string",
            "label": "string"
        }
    ]
}'
Response Response Example
200 - Example 1
{
  "category": "LOGIN",
  "createdAt": "2019-08-24T14:15:22Z",
  "favorite": false,
  "id": "string",
  "lastEditedBy": "string",
  "state": "ARCHIVED",
  "tags": [
    "string"
  ],
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "urls": [
    {
      "href": "https://example.com",
      "primary": true
    },
    {
      "href": "https://example.org"
    }
  ],
  "vault": {
    "id": "string"
  },
  "version": 0,
  "fields": [
    {
      "entropy": 0,
      "generate": false,
      "id": "string",
      "label": "string",
      "purpose": "",
      "recipe": {
        "characterSets": [
          "LETTERS"
        ],
        "length": 32
      },
      "section": {
        "id": "string"
      },
      "type": "STRING",
      "value": "string"
    }
  ],
  "files": [
    {
      "content": "VGhlIGZ1dHVyZSBiZWxvbmdzIHRvIHRoZSBjdXJpb3VzLgo=",
      "content_path": "v1/vaults/ionaiwtdvgclrixbt6ztpqcxnq/items/p7eflcy7f5mk7vg6zrzf5rjjyu/files/6r65pjq33banznomn7q22sj44e/content",
      "id": "6r65pjq33banznomn7q22sj44e",
      "name": "foo.txt",
      "size": 35
    }
  ],
  "sections": [
    {
      "id": "string",
      "label": "string"
    }
  ]
}

Request

Path Params
vaultUuid
string 
required
The UUID of the Vault to create an Item in
Body Params application/json
category
enum<string> 
required
Allowed values:
LOGINPASSWORDAPI_CREDENTIALSERVERDATABASECREDIT_CARDMEMBERSHIPPASSPORTSOFTWARE_LICENSEOUTDOOR_LICENSESECURE_NOTEWIRELESS_ROUTERBANK_ACCOUNTDRIVER_LICENSEIDENTITYREWARD_PROGRAMDOCUMENTEMAIL_ACCOUNTSOCIAL_SECURITY_NUMBERCUSTOM
favorite
boolean 
optional
Default:
false
id
string 
optional
Match pattern:
^[\da-z]{26}$
tags
array[string]
optional
title
string 
optional
urls
array [object {2}] 
optional
Example:
[{"href":"https://example.com","primary":true},{"href":"https://example.org"}]
href
string <url>
required
primary
boolean 
optional
vault
object 
required
id
string 
required
Match pattern:
^[\da-z]{26}$
version
integer 
optional
fields
array[object (Field) {8}] 
optional
generate
boolean 
optional
If value is not present then a new value should be generated for this field
Default:
false
id
string 
required
label
string 
optional
purpose
enum<string> 
optional
Some item types, Login and Password, have fields used for autofill. This property indicates that purpose and is required for some item types.
Allowed values:
USERNAMEPASSWORDNOTES
recipe
object 
GeneratorRecipe
optional
The recipe is used in conjunction with the "generate" property to set the character set used to generate a new secure value
section
object 
optional
type
enum<string> 
required
Allowed values:
STRINGEMAILCONCEALEDURLTOTPDATEMONTH_YEARMENU
Default:
STRING
value
string 
optional
files
array[object (File) {5}] 
optional
content
string <byte>
optional

Base64-encoded contents of the file. Only set if size <= OP_MAX_INLINE_FILE_SIZE_KB kb and inline_files is set to true.

id
string 
optional
ID of the file
name
string 
optional
Name of the file
section
object 
optional
For files that are in a section, this field describes the section.
size
integer 
optional
Size in bytes of the file
sections
array [object {2}] 
optional
id
string 
optional
label
string 
optional
Examples

Responses

🟢200OK
application/json
Body
category
enum<string> 
required
Allowed values:
LOGINPASSWORDAPI_CREDENTIALSERVERDATABASECREDIT_CARDMEMBERSHIPPASSPORTSOFTWARE_LICENSEOUTDOOR_LICENSESECURE_NOTEWIRELESS_ROUTERBANK_ACCOUNTDRIVER_LICENSEIDENTITYREWARD_PROGRAMDOCUMENTEMAIL_ACCOUNTSOCIAL_SECURITY_NUMBERCUSTOM
createdAt
string <date-time>
read-onlyoptional
favorite
boolean 
optional
Default:
false
id
string 
optional
Match pattern:
^[\da-z]{26}$
lastEditedBy
string 
read-onlyoptional
state
enum<string> 
read-onlyoptional
Allowed values:
ARCHIVEDDELETED
tags
array[string]
optional
title
string 
optional
updatedAt
string <date-time>
read-onlyoptional
urls
array [object {2}] 
optional
Example:
[{"href":"https://example.com","primary":true},{"href":"https://example.org"}]
href
string <url>
required
primary
boolean 
optional
vault
object 
required
id
string 
required
Match pattern:
^[\da-z]{26}$
version
integer 
optional
fields
array[object (Field) {9}] 
optional
entropy
number 
read-onlyoptional
For fields with a purpose of PASSWORD this is the entropy of the value
generate
boolean 
optional
If value is not present then a new value should be generated for this field
Default:
false
id
string 
required
label
string 
optional
purpose
enum<string> 
optional
Some item types, Login and Password, have fields used for autofill. This property indicates that purpose and is required for some item types.
Allowed values:
USERNAMEPASSWORDNOTES
recipe
object 
GeneratorRecipe
optional
The recipe is used in conjunction with the "generate" property to set the character set used to generate a new secure value
section
object 
optional
type
enum<string> 
required
Allowed values:
STRINGEMAILCONCEALEDURLTOTPDATEMONTH_YEARMENU
Default:
STRING
value
string 
optional
files
array[object (File) {6}] 
optional
content
string <byte>
optional

Base64-encoded contents of the file. Only set if size <= OP_MAX_INLINE_FILE_SIZE_KB kb and inline_files is set to true.

content_path
string 
read-onlyoptional
Path of the Connect API that can be used to download the contents of this file.
id
string 
optional
ID of the file
name
string 
optional
Name of the file
section
object 
optional
For files that are in a section, this field describes the section.
size
integer 
optional
Size in bytes of the file
sections
array [object {2}] 
optional
id
string 
optional
label
string 
optional
🟠400Unable to create item due to invalid input
🟠401Invalid or missing token
🟠403Unauthorized access
🟠404Item not found
Modified at 2022-09-02 07:10:37
Previous
Get all items for inside a Vault
Next
Delete an Item
Built with