{
  "openapi": "3.0.3",
  "info": {
    "title": "Ravi API",
    "version": "1.0.0",
    "description": "Identity provider for AI agents \u2014 provisioned phone numbers, email addresses, TOTP, OTP extraction, and E2E-encrypted passwords and secrets."
  },
  "paths": {
    "/api/passwords/": {
      "get": {
        "operationId": "passwords_list",
        "description": "CRUD for password entries + password generator endpoint.",
        "tags": [
          "Passwords"
        ],
        "security": [
          {
            "identityKeyAuth": []
          },
          {
            "managementKeyAuth": []
          },
          {
            "jwtAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PasswordEntry"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "passwords_create",
        "description": "CRUD for password entries + password generator endpoint.",
        "tags": [
          "Passwords"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordEntryRequest"
              },
              "examples": {
                "CreatePasswordEntry": {
                  "value": {
                    "domain": "github.com",
                    "username": "agent@example.com",
                    "password": "s3cur3P@ssw0rd!",
                    "notes": "CI/CD account"
                  },
                  "summary": "Create password entry"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PasswordEntryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PasswordEntryRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "identityKeyAuth": []
          },
          {
            "managementKeyAuth": []
          },
          {
            "jwtAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordEntry"
                },
                "examples": {
                  "PasswordEntryCreated": {
                    "value": {
                      "uuid": "c3d4e5f6-a7b8-9012-cdef-234567890abc",
                      "identity": 1,
                      "domain": "github.com",
                      "username": "agent@example.com",
                      "password": "s3cur3P@ssw0rd!",
                      "notes": "CI/CD account",
                      "created_dt": "2025-06-01T12:00:00Z",
                      "updated_dt": "2025-06-01T12:00:00Z"
                    },
                    "summary": "Password entry created"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/passwords/generate-password/": {
      "get": {
        "operationId": "passwords_generate_password_retrieve",
        "description": "Generate a random password with configurable constraints.",
        "parameters": [
          {
            "in": "query",
            "name": "digits",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "in": "query",
            "name": "exclude_chars",
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "in": "query",
            "name": "length",
            "schema": {
              "type": "integer",
              "default": 16
            }
          },
          {
            "in": "query",
            "name": "lowercase",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "in": "query",
            "name": "special",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "in": "query",
            "name": "uppercase",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "tags": [
          "Passwords"
        ],
        "security": [
          {
            "identityKeyAuth": []
          },
          {
            "managementKeyAuth": []
          },
          {
            "jwtAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratePasswordResponse"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/passwords/{uuid}/": {
      "get": {
        "operationId": "passwords_retrieve",
        "description": "CRUD for password entries + password generator endpoint.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Passwords"
        ],
        "security": [
          {
            "identityKeyAuth": []
          },
          {
            "managementKeyAuth": []
          },
          {
            "jwtAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordEntry"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "passwords_update",
        "description": "CRUD for password entries + password generator endpoint.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Passwords"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordEntryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PasswordEntryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PasswordEntryRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "identityKeyAuth": []
          },
          {
            "managementKeyAuth": []
          },
          {
            "jwtAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordEntry"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "passwords_partial_update",
        "description": "CRUD for password entries + password generator endpoint.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Passwords"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPasswordEntryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPasswordEntryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedPasswordEntryRequest"
              }
            }
          }
        },
        "security": [
          {
            "identityKeyAuth": []
          },
          {
            "managementKeyAuth": []
          },
          {
            "jwtAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordEntry"
                }
              }
            },
            "description": ""
          }
        }
      },
      "delete": {
        "operationId": "passwords_destroy",
        "description": "CRUD for password entries + password generator endpoint.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Passwords"
        ],
        "security": [
          {
            "identityKeyAuth": []
          },
          {
            "managementKeyAuth": []
          },
          {
            "jwtAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GeneratePasswordResponse": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string"
          }
        },
        "required": [
          "password"
        ]
      },
      "PasswordEntry": {
        "type": "object",
        "description": "Serializer for password entries.\n\n- identity is optional; the ViewSet defaults it in perform_create().\n- domain is auto-cleaned via validate_domain().\n- uuid, created_dt, updated_dt are read-only.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "identity": {
            "type": "integer"
          },
          "domain": {
            "type": "string",
            "description": "Website domain these credentials belong to (e.g. github.com).",
            "maxLength": 255
          },
          "username": {
            "type": "string",
            "description": "Username or email for this site"
          },
          "password": {
            "type": "string",
            "description": "Password for this site"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "domain",
          "updated_dt",
          "uuid"
        ]
      },
      "PasswordEntryRequest": {
        "type": "object",
        "description": "Serializer for password entries.\n\n- identity is optional; the ViewSet defaults it in perform_create().\n- domain is auto-cleaned via validate_domain().\n- uuid, created_dt, updated_dt are read-only.",
        "properties": {
          "identity": {
            "type": "integer"
          },
          "domain": {
            "type": "string",
            "minLength": 1,
            "description": "Website domain these credentials belong to (e.g. github.com).",
            "maxLength": 255
          },
          "username": {
            "type": "string",
            "description": "Username or email for this site"
          },
          "password": {
            "type": "string",
            "description": "Password for this site"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          }
        },
        "required": [
          "domain"
        ]
      },
      "PatchedPasswordEntryRequest": {
        "type": "object",
        "description": "Serializer for password entries.\n\n- identity is optional; the ViewSet defaults it in perform_create().\n- domain is auto-cleaned via validate_domain().\n- uuid, created_dt, updated_dt are read-only.",
        "properties": {
          "identity": {
            "type": "integer"
          },
          "domain": {
            "type": "string",
            "minLength": 1,
            "description": "Website domain these credentials belong to (e.g. github.com).",
            "maxLength": 255
          },
          "username": {
            "type": "string",
            "description": "Username or email for this site"
          },
          "password": {
            "type": "string",
            "description": "Password for this site"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          }
        }
      }
    }
  }
}
