{
  "openapi": "3.0.2",
  "info": {
    "contact": {
      "email": "passwd@passwd.team"
    },
    "description": "Programmatic access to password records stored in Passwd. See https://passwd.team/docs/features/public-api/ for a quickstart and API key management.",
    "title": "Passwd Public API",
    "version": "2.28.0"
  },
  "servers": [
    {
      "url": "https://{passwdUrl}/api/v2",
      "variables": {
        "passwdUrl": {
          "default": "your-passwd-url",
          "description": "Host where your Passwd instance runs"
        }
      }
    }
  ],
  "tags": [
    {
      "description": "Public API endpoints authenticated with a personal API key generated in the Passwd app (profile menu → API keys) — see [Managing API keys](https://passwd.team/docs/features/public-api/api-keys/) and the [quickstart](https://passwd.team/docs/features/public-api/). Send the key as a Bearer token: `Authorization: Bearer pswd_ak_...`. The key acts on behalf of the user who created it and stops working when the user is removed from the Google Workspace.",
      "name": "Public API"
    }
  ],
  "paths": {
    "/public/secrets": {
      "get": {
        "description": "Returns only password-type secrets. The password value is never included; the hasPassword flag indicates whether the secret has one. The X-Total-Count response header carries the total number of secrets.\n",
        "operationId": "publicListSecrets",
        "parameters": [
          {
            "allowEmptyValue": false,
            "description": "View secrets as given user (admins only)",
            "explode": true,
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "example": "110174204010487917951",
              "type": "string"
            },
            "style": "form"
          },
          {
            "allowEmptyValue": false,
            "description": "View secrets as given group (admins only)",
            "explode": true,
            "in": "query",
            "name": "groupId",
            "required": false,
            "schema": {
              "example": "03whwml415ziph6",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/listSecret_200_response_inner"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Successful operation",
            "headers": {
              "X-Total-Count": {
                "description": "Total number of secrets",
                "explode": false,
                "schema": {
                  "type": "integer"
                },
                "style": "simple"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Unauthorized access"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Permission denied - forbidden"
          },
          "428": {
            "content": {
              "application/json": {
                "examples": {
                  "userNotActive": {
                    "description": "The authenticated user's account has been deactivated",
                    "summary": "User account is not active",
                    "value": {
                      "message": "User is not active",
                      "status": 428,
                      "errorData": {
                        "message": "User is not active",
                        "code": "e2005"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Precondition Required - User account is not active"
          }
        },
        "security": [
          {
            "publicApiKeyAuth": []
          }
        ],
        "summary": "List secrets",
        "tags": [
          "Public API"
        ]
      },
      "post": {
        "description": "Creates a record owned by the API key's user. name is required and type defaults to password. On the Starter plan at most 50 records are allowed per organization and TOTP or passkey fields are rejected.\n",
        "operationId": "publicCreateSecret",
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateSecretRequestBody"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Secret"
                }
              }
            },
            "description": "Successful operation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Unauthorized access"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Permission denied - forbidden"
          },
          "428": {
            "content": {
              "application/json": {
                "examples": {
                  "userNotActive": {
                    "description": "The authenticated user's account has been deactivated",
                    "summary": "User account is not active",
                    "value": {
                      "message": "User is not active",
                      "status": 428,
                      "errorData": {
                        "message": "User is not active",
                        "code": "e2005"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Precondition Required - User account is not active"
          }
        },
        "security": [
          {
            "publicApiKeyAuth": []
          }
        ],
        "summary": "Create secret",
        "tags": [
          "Public API"
        ]
      }
    },
    "/public/secrets/{id}": {
      "delete": {
        "operationId": "publicDeleteSecret",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "eStFg+5eAObcu0nDjNKB1A==",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "204": {
            "description": "Secret successfully deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Unauthorized access"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Permission denied - forbidden"
          },
          "428": {
            "content": {
              "application/json": {
                "examples": {
                  "userNotActive": {
                    "description": "The authenticated user's account has been deactivated",
                    "summary": "User account is not active",
                    "value": {
                      "message": "User is not active",
                      "status": 428,
                      "errorData": {
                        "message": "User is not active",
                        "code": "e2005"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Precondition Required - User account is not active"
          }
        },
        "security": [
          {
            "publicApiKeyAuth": []
          }
        ],
        "summary": "Delete secret",
        "tags": [
          "Public API"
        ]
      },
      "get": {
        "description": "Returns the full record of any type, including fields the list endpoint omits. Sensitive fields (listed in the record's sensitiveFields array) are included only when the key's user has the permission to read them. URL-encode the id — it may contain characters like + and =.\n",
        "operationId": "publicGetSecret",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "eStFg+5eAObcu0nDjNKB1A==",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Secret_Detail_200_response"
                }
              }
            },
            "description": "Successful operation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Unauthorized access"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Permission denied - forbidden"
          },
          "428": {
            "content": {
              "application/json": {
                "examples": {
                  "userNotActive": {
                    "description": "The authenticated user's account has been deactivated",
                    "summary": "User account is not active",
                    "value": {
                      "message": "User is not active",
                      "status": 428,
                      "errorData": {
                        "message": "User is not active",
                        "code": "e2005"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Precondition Required - User account is not active"
          }
        },
        "security": [
          {
            "publicApiKeyAuth": []
          }
        ],
        "summary": "Get secret detail",
        "tags": [
          "Public API"
        ]
      },
      "put": {
        "description": "Merge update — fields omitted from the body keep their current values. name is required and the record's type cannot be changed.\n",
        "operationId": "publicUpdateSecret",
        "parameters": [
          {
            "explode": false,
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "eStFg+5eAObcu0nDjNKB1A==",
              "type": "string"
            },
            "style": "simple"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateSecretRequestBody"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Secret"
                }
              }
            },
            "description": "Successful opertaion"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Unauthorized access"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Permission denied - forbidden"
          },
          "428": {
            "content": {
              "application/json": {
                "examples": {
                  "userNotActive": {
                    "description": "The authenticated user's account has been deactivated",
                    "summary": "User account is not active",
                    "value": {
                      "message": "User is not active",
                      "status": 428,
                      "errorData": {
                        "message": "User is not active",
                        "code": "e2005"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/HttpError"
                }
              }
            },
            "description": "Precondition Required - User account is not active"
          }
        },
        "security": [
          {
            "publicApiKeyAuth": []
          }
        ],
        "summary": "Update secret",
        "tags": [
          "Public API"
        ]
      }
    }
  },
  "components": {
    "requestBodies": {
      "CreateSecretRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/createSecret_request"
            }
          }
        }
      },
      "UpdateSecretRequestBody": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Secret_Update_request"
            }
          }
        }
      }
    },
    "schemas": {
      "APISecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "apiCredentials"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "credentials": {
                "example": "4U+w[Lg!edqe-odms",
                "type": "string"
              },
              "hostname": {
                "example": "nymbus3000.com",
                "type": "string"
              }
            }
          }
        ]
      },
      "APISecretInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSecretInput"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "apiCredentials"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "credentials": {
                "example": "4U+w[Lg!edqe-odms",
                "type": "string"
              },
              "hostname": {
                "example": "nymbus3000.com",
                "type": "string"
              }
            }
          }
        ]
      },
      "APISecretListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "apiCredentials"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "hostname": {
                "example": "nymbus3000.com",
                "type": "string"
              }
            }
          }
        ]
      },
      "BaseSecretInput": {
        "properties": {
          "name": {
            "example": "nymbus3000",
            "type": "string"
          },
          "note": {
            "example": "my note",
            "type": "string"
          },
          "tags": {
            "items": {
              "example": "pablo",
              "type": "string"
            },
            "type": "array"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ReferenceToWrite"
            },
            "type": "array"
          },
          "whitelistUsers": {
            "items": {
              "$ref": "#/components/schemas/ReferenceToWrite"
            },
            "type": "array"
          },
          "vaultId": {
            "description": "The vault the secret belongs to. Setting, changing or clearing it requires\nWRITE on the secret and the editor role in the target vault (and, when moving\na secret out of a vault, the editor role in the source vault too).\n",
            "example": "J1M3hGS2VJ12nz4QQ75N",
            "nullable": true,
            "type": "string"
          }
        }
      },
      "BaseUserObject": {
        "properties": {
          "id": {
            "example": "115494973255887",
            "type": "string"
          },
          "email": {
            "example": "pepa.novak@ackee.cz",
            "type": "string"
          },
          "name": {
            "example": "Pepa Novak",
            "type": "string"
          }
        },
        "required": [
          "email",
          "id",
          "name"
        ]
      },
      "CardSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "paymentCard"
                ],
                "type": "string"
              },
              "cardNumber": {
                "example": "4111111111111111",
                "type": "string"
              },
              "cardholderName": {
                "example": "John Doe",
                "type": "string"
              },
              "expirationDate": {
                "example": "12/23",
                "type": "string"
              },
              "cvvCode": {
                "example": "123",
                "type": "string"
              }
            }
          }
        ]
      },
      "CardSecretInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSecretInput"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "paymentCard"
                ],
                "type": "string"
              },
              "cardNumber": {
                "example": "4111111111111111",
                "type": "string"
              },
              "cardholderName": {
                "example": "John Doe",
                "type": "string"
              },
              "expirationDate": {
                "example": "12/23",
                "type": "string"
              },
              "cvvCode": {
                "example": "123",
                "type": "string"
              }
            }
          }
        ]
      },
      "CardSecretListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "paymentCard"
                ],
                "type": "string"
              },
              "cardNumber": {
                "example": "4111111111111111",
                "type": "string"
              },
              "cardholderName": {
                "example": "John Doe",
                "type": "string"
              },
              "expirationDate": {
                "example": "12/23",
                "type": "string"
              }
            }
          }
        ]
      },
      "createSecret_request": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PasswordSecretInput"
          },
          {
            "$ref": "#/components/schemas/CardSecretInput"
          },
          {
            "$ref": "#/components/schemas/APISecretInput"
          },
          {
            "$ref": "#/components/schemas/DatabaseSecretInput"
          },
          {
            "$ref": "#/components/schemas/SSHSecretInput"
          },
          {
            "$ref": "#/components/schemas/SecureNoteSecretInput"
          }
        ]
      },
      "DatabaseSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "databaseCredentials"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "password": {
                "example": "4U+w[Lg!edqe-odms",
                "type": "string"
              },
              "server": {
                "example": "nymbus3000.com",
                "type": "string"
              },
              "port": {
                "example": 5432,
                "type": "number"
              },
              "databaseName": {
                "example": "my_db",
                "type": "string"
              },
              "databaseType": {
                "example": "postgres",
                "type": "string"
              }
            }
          }
        ]
      },
      "DatabaseSecretInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSecretInput"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "databaseCredentials"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "password": {
                "example": "4U+w[Lg!edqe-odms",
                "type": "string"
              },
              "server": {
                "example": "nymbus3000.com",
                "type": "string"
              },
              "port": {
                "example": 5432,
                "type": "number"
              },
              "databaseName": {
                "example": "my_db",
                "type": "string"
              },
              "databaseType": {
                "example": "postgres",
                "type": "string"
              }
            }
          }
        ]
      },
      "DatabaseSecretListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "databaseCredentials"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "server": {
                "example": "nymbus3000.com",
                "type": "string"
              },
              "port": {
                "example": 5432,
                "type": "number"
              },
              "databaseName": {
                "example": "my_db",
                "type": "string"
              },
              "databaseType": {
                "example": "postgres",
                "type": "string"
              }
            }
          }
        ]
      },
      "GroupObject": {
        "properties": {
          "id": {
            "example": "03o7alnk0ilemlb",
            "type": "string"
          },
          "email": {
            "example": "backend@ackee.cz",
            "type": "string"
          },
          "name": {
            "example": "backend",
            "type": "string"
          },
          "visible": {
            "example": true,
            "type": "boolean"
          }
        }
      },
      "HttpError": {
        "properties": {
          "message": {
            "type": "string"
          },
          "status": {
            "type": "number"
          },
          "errorCode": {
            "type": "string"
          },
          "errorData": {
            "$ref": "#/components/schemas/HttpError_errorData"
          },
          "errorClass": {
            "type": "string"
          },
          "stack": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "HttpError_errorData": {
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "listSecret_200_response_inner": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretList"
          },
          {
            "$ref": "#/components/schemas/ReferenceObjectWithoutPermissions"
          }
        ]
      },
      "NoteSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "secureNote"
                ],
                "type": "string"
              },
              "secureNote": {
                "example": "my secure note",
                "type": "string"
              }
            }
          }
        ]
      },
      "NoteSecretListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "secureNote"
                ],
                "type": "string"
              },
              "secureNote": {
                "example": "my secure note",
                "type": "string"
              }
            }
          }
        ]
      },
      "PasswordSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "password"
                ],
                "type": "string"
              },
              "password": {
                "example": "4U+w[Lg!edqe-odms",
                "type": "string"
              },
              "hasTOTP": {
                "example": true,
                "type": "boolean"
              },
              "TOTP": {
                "$ref": "#/components/schemas/PasswordSecret_allOf_TOTP"
              },
              "ignoreSecurityReport": {
                "example": true,
                "type": "boolean"
              },
              "securityLevel": {
                "example": 4,
                "type": "number"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "web": {
                "example": "https://nymbus3000.com",
                "type": "string"
              },
              "passkey": {
                "$ref": "#/components/schemas/PasswordSecret_allOf_passkey"
              },
              "passwordUpdatedAt": {
                "example": "2023-01-10T10:34:41.373Z",
                "format": "date-time",
                "type": "string"
              },
              "passwordHashed": {
                "example": "4U+w[Lg!edqe-odms",
                "type": "string"
              }
            }
          }
        ]
      },
      "PasswordSecret_allOf_passkey": {
        "properties": {
          "credentialId": {
            "example": "12345678-1234-5678-1234-567812345678",
            "type": "string"
          },
          "createdAt": {
            "example": "2023-01-10T10:34:41.373Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "PasswordSecret_allOf_TOTP": {
        "properties": {
          "algorithm": {
            "example": "sha1",
            "type": "string"
          },
          "codeLength": {
            "example": 6,
            "type": "number"
          },
          "period": {
            "example": 30,
            "type": "number"
          }
        },
        "type": "object"
      },
      "PasswordSecretInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSecretInput"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "password"
                ],
                "type": "string"
              },
              "username": {
                "example": "ackeexamazon",
                "type": "string"
              },
              "password": {
                "example": "2qtysujy56r4y5kd",
                "type": "string"
              },
              "web": {
                "example": "http://example.com/amazon",
                "type": "string"
              },
              "note": {
                "example": "This is my new password",
                "type": "string"
              },
              "passkeyCredentialId": {
                "description": "Credential ID returned by /passkeys/register. When set, passkeyRpId and\npasskeyOrigin must also be supplied — they are pinned to this credential\nand enforced at authentication time.\n",
                "example": "12345678-1234-5678-1234-567812345678",
                "type": "string"
              },
              "passkeyRpId": {
                "description": "Relying party ID this passkey is registered for. Pinned at registration; required when passkeyCredentialId is set.",
                "example": "example.com",
                "type": "string"
              },
              "passkeyOrigin": {
                "description": "HTTPS origin this passkey is registered for. Pinned at registration; required when passkeyCredentialId is set.",
                "example": "https://app.example.com",
                "format": "uri",
                "type": "string"
              },
              "TOTP": {
                "example": "{\"plainSecret\":{\"value\":\"JBSWY3DPEHPK3PXP\",\"summary\":\"Plain Base32 encoded secret\"},\"KeyURI\":{\"value\":\"otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example\",\"summary\":\"Key URI format\"}}",
                "type": "string"
              }
            }
          }
        ]
      },
      "PasswordSecretListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "password"
                ],
                "type": "string"
              },
              "hasPassword": {
                "example": true,
                "type": "boolean"
              },
              "hasTOTP": {
                "example": true,
                "type": "boolean"
              },
              "TOTP": {
                "$ref": "#/components/schemas/PasswordSecret_allOf_TOTP"
              },
              "ignoreSecurityReport": {
                "example": true,
                "type": "boolean"
              },
              "securityLevel": {
                "example": 4,
                "type": "number"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "web": {
                "example": "https://nymbus3000.com",
                "type": "string"
              }
            }
          }
        ]
      },
      "Permissions": {
        "items": {
          "enum": [
            "read",
            "write",
            "autofillOnly",
            "passkeyOnly",
            "limited"
          ],
          "type": "string"
        },
        "type": "array"
      },
      "ReferenceObjectWithoutPermissions": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/GroupObject"
            },
            "type": "array"
          },
          "whitelistUsers": {
            "items": {
              "$ref": "#/components/schemas/UserObject"
            },
            "type": "array"
          }
        }
      },
      "ReferenceObjectWithPermissions": {
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/ReferenceObjectWithPermissions_groups_inner"
            },
            "type": "array"
          },
          "whitelistUsers": {
            "items": {
              "$ref": "#/components/schemas/ReferenceObjectWithPermissions_whitelistUsers_inner"
            },
            "type": "array"
          }
        }
      },
      "ReferenceObjectWithPermissions_groups_inner": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GroupObject"
          },
          {
            "properties": {
              "accessPermissions": {
                "$ref": "#/components/schemas/Permissions"
              }
            }
          }
        ]
      },
      "ReferenceObjectWithPermissions_whitelistUsers_inner": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserObject"
          },
          {
            "properties": {
              "accessPermissions": {
                "$ref": "#/components/schemas/Permissions"
              }
            }
          }
        ]
      },
      "ReferenceToWrite": {
        "properties": {
          "id": {
            "example": "09asdflaksdf",
            "type": "string"
          },
          "accessPermissions": {
            "$ref": "#/components/schemas/Permissions"
          }
        },
        "type": "object"
      },
      "Secret": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PasswordSecret"
          },
          {
            "$ref": "#/components/schemas/CardSecret"
          },
          {
            "$ref": "#/components/schemas/APISecret"
          },
          {
            "$ref": "#/components/schemas/DatabaseSecret"
          },
          {
            "$ref": "#/components/schemas/SSHSecret"
          },
          {
            "$ref": "#/components/schemas/NoteSecret"
          }
        ]
      },
      "Secret_Detail_200_response": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Secret"
          },
          {
            "$ref": "#/components/schemas/ReferenceObjectWithPermissions"
          },
          {
            "properties": {
              "visibleToAll": {
                "example": true,
                "type": "boolean"
              },
              "userPermissions": {
                "$ref": "#/components/schemas/Permissions"
              }
            }
          }
        ]
      },
      "Secret_Update_request": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PasswordSecretInput"
          },
          {
            "$ref": "#/components/schemas/CardSecretInput"
          },
          {
            "$ref": "#/components/schemas/APISecretInput"
          },
          {
            "$ref": "#/components/schemas/DatabaseSecretInput"
          },
          {
            "$ref": "#/components/schemas/SSHSecretInput"
          },
          {
            "$ref": "#/components/schemas/SecureNoteSecretInput"
          }
        ],
        "required": [
          "name"
        ]
      },
      "SecretInfo": {
        "properties": {
          "id": {
            "example": "cTOSDubTMqMZN54",
            "type": "string"
          },
          "name": {
            "example": "nymbus3000",
            "type": "string"
          },
          "note": {
            "example": "my note",
            "type": "string"
          },
          "tags": {
            "items": {
              "example": "pablo",
              "type": "string"
            },
            "type": "array"
          },
          "vaultId": {
            "description": "The vault the secret belongs to, if any",
            "example": "J1M3hGS2VJ12nz4QQ75N",
            "nullable": true,
            "type": "string"
          },
          "file": {
            "$ref": "#/components/schemas/SecretInfo_file"
          },
          "createdAt": {
            "$ref": "#/components/schemas/TimestampDateTime"
          },
          "updatedAt": {
            "$ref": "#/components/schemas/TimestampDateTime"
          },
          "createdBy": {
            "$ref": "#/components/schemas/BaseUserObject"
          },
          "userPermissions": {
            "$ref": "#/components/schemas/Permissions"
          },
          "sensitiveFields": {
            "items": {
              "$ref": "#/components/schemas/SensitiveField"
            },
            "type": "array"
          },
          "share": {
            "$ref": "#/components/schemas/SecretInfo_share"
          },
          "favicon": {
            "format": "base64",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "SecretInfo_file": {
        "properties": {
          "name": {
            "example": "example.png",
            "type": "string"
          },
          "data": {
            "format": "base64",
            "type": "string"
          }
        },
        "required": [
          "data",
          "name"
        ],
        "type": "object"
      },
      "SecretInfo_share": {
        "properties": {
          "until": {
            "example": "2023-01-10T10:34:41.373Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "share id of the public share object",
            "example": "J1M3hGS2VJ12nz4QQ75N",
            "type": "string"
          }
        },
        "type": "object"
      },
      "SecretList": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PasswordSecretListResponse"
          },
          {
            "$ref": "#/components/schemas/CardSecretListResponse"
          },
          {
            "$ref": "#/components/schemas/APISecretListResponse"
          },
          {
            "$ref": "#/components/schemas/DatabaseSecretListResponse"
          },
          {
            "$ref": "#/components/schemas/SSHSecretListResponse"
          },
          {
            "$ref": "#/components/schemas/NoteSecretListResponse"
          }
        ]
      },
      "SecureNoteSecretInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSecretInput"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "secureNote"
                ],
                "type": "string"
              },
              "secureNote": {
                "example": "my secure note",
                "type": "string"
              }
            }
          }
        ]
      },
      "SensitiveField": {
        "enum": [
          "password",
          "privateKey",
          "cvvCode",
          "TOTP.secret",
          "passkey",
          "credentials",
          "secureNote"
        ],
        "example": "password",
        "type": "string"
      },
      "SSHSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "sshKey"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "privateKey": {
                "type": "string"
              },
              "publicKey": {
                "type": "string"
              }
            }
          }
        ]
      },
      "SSHSecretInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseSecretInput"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "sshKey"
                ],
                "type": "string"
              },
              "privateKey": {
                "type": "string"
              },
              "publicKey": {
                "type": "string"
              }
            }
          }
        ]
      },
      "SSHSecretListResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SecretInfo"
          },
          {
            "properties": {
              "type": {
                "enum": [
                  "sshKey"
                ],
                "type": "string"
              },
              "username": {
                "example": "nymbus",
                "type": "string"
              },
              "publicKey": {
                "type": "string"
              }
            }
          }
        ]
      },
      "TimestampDateTime": {
        "example": "2022-04-30T21:57:13.281Z",
        "format": "date-time",
        "type": "string"
      },
      "UserObject": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseUserObject"
          },
          {
            "properties": {
              "isAdmin": {
                "example": false,
                "type": "boolean"
              },
              "domain": {
                "example": "ackee.cz",
                "type": "string"
              }
            },
            "type": "object"
          }
        ]
      }
    },
    "securitySchemes": {
      "publicApiKeyAuth": {
        "bearerFormat": "API Key",
        "description": "API key authentication for public API. Use the API key as the Bearer token.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
