{
  "openapi": "3.0.3",
  "info": {
    "title": "Ravi API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.ravi.app",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Contacts"
    },
    {
      "name": "Email"
    },
    {
      "name": "Identities"
    },
    {
      "name": "Inbox"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Passwords"
    },
    {
      "name": "Phone"
    },
    {
      "name": "Secrets"
    }
  ],
  "paths": {
    "/api/contacts/": {
      "get": {
        "operationId": "contacts_list",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          },
          {
            "in": "query",
            "name": "source",
            "schema": {
              "type": "string",
              "x-spec-enum-id": "83674bf0dc9ba8e2",
              "enum": [
                "auto",
                "manual"
              ]
            },
            "description": "* `auto` - Auto\n* `manual` - Manual"
          }
        ],
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Contact"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi contacts list"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ncontacts = identity.contacts.list()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst contacts = await identity.contacts.list();"
          }
        ]
      },
      "post": {
        "operationId": "contacts_create",
        "tags": [
          "Contacts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              },
              "examples": {
                "CreateContact": {
                  "value": {
                    "email": "alice@example.com",
                    "display_name": "Alice Smith",
                    "nickname": "alice"
                  },
                  "summary": "Create contact"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi contacts create --email alice@example.com --display-name \"Alice\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ncontact = identity.contacts.create(email=\"alice@example.com\", display_name=\"Alice\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst contact = await identity.contacts.create({ email: \"alice@example.com\", display_name: \"Alice\" });"
          }
        ]
      }
    },
    "/api/contacts/find/": {
      "get": {
        "operationId": "contacts_find_retrieve",
        "parameters": [
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          },
          {
            "in": "query",
            "name": "phone_number",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ncontact = identity.contacts.find(email=\"alice@example.com\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst contact = await identity.contacts.find({ email: \"alice@example.com\" });"
          }
        ]
      }
    },
    "/api/contacts/search/": {
      "get": {
        "operationId": "contacts_search_retrieve",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi contacts search \"alice\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nresults = identity.contacts.search(\"alice\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst results = await identity.contacts.search(\"alice\");"
          }
        ]
      }
    },
    "/api/contacts/{uuid}/": {
      "get": {
        "operationId": "contacts_retrieve",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi contacts get <contact-uuid>"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ncontact = identity.contacts.get(\"<contact-uuid>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst contact = await identity.contacts.get(\"<contact-uuid>\");"
          }
        ]
      },
      "patch": {
        "operationId": "contacts_partial_update",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Contacts"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedContactRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedContactRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedContactRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi contacts update <contact-uuid> --nickname \"Ally\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ncontact = identity.contacts.update(\"<contact-uuid>\", nickname=\"Ally\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst contact = await identity.contacts.update(\"<contact-uuid>\", { nickname: \"Ally\" });"
          }
        ]
      },
      "delete": {
        "operationId": "contacts_destroy",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi contacts delete <contact-uuid>"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nidentity.contacts.delete(\"<contact-uuid>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nawait identity.contacts.delete(\"<contact-uuid>\");"
          }
        ]
      }
    },
    "/api/domains/": {
      "get": {
        "operationId": "domains_list",
        "description": "List all available email domains — platform domains and the authenticated user's custom (verified or pending) domains.",
        "tags": [
          "Email"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Domain"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi domains list"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\ndomains = ravi.domains.list()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst domains = await ravi.domains.list();"
          }
        ]
      }
    },
    "/api/email/": {
      "get": {
        "operationId": "email_list",
        "description": "List all email inboxes for the authenticated user, newest first. Scoped to the current identity when an identity-scoped token is used.",
        "tags": [
          "Email"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RaviInbox"
                  }
                }
              }
            },
            "description": ""
          }
        }
      },
      "post": {
        "operationId": "email_create",
        "description": "Create a new email inbox. Optionally provide a desired email address; if omitted, one is generated automatically. Requires an active subscription (returns 402 otherwise). Returns 409 if the requested email address is already taken.",
        "tags": [
          "Email"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaviInboxCreateRequest"
              },
              "examples": {
                "CreateInboxWithCustomEmail": {
                  "value": {
                    "email": "myagent@example.com"
                  },
                  "summary": "Create inbox with custom email"
                },
                "CreateInbox(auto-generated)": {
                  "value": {},
                  "summary": "Create inbox (auto-generated)"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RaviInboxCreateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RaviInboxCreateRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviInboxCreate"
                },
                "examples": {
                  "InboxCreated": {
                    "value": {
                      "id": 7,
                      "uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                      "email": "myagent@example.com",
                      "created_dt": "2025-06-01T12:00:00Z"
                    },
                    "summary": "Inbox created"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/email/check-availability/": {
      "get": {
        "operationId": "email_check_availability_retrieve",
        "description": "Check whether a given email address is available for inbox creation. Pass the email as a query parameter. Returns {available: true/false, email: ...}.",
        "tags": [
          "Email"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckEmailAvailability"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/email/{id}/": {
      "get": {
        "operationId": "email_retrieve",
        "description": "Retrieve a single email inbox by ID, including its generated email address.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Ravi Inbox.",
            "required": true
          }
        ],
        "tags": [
          "Email"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviInbox"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/identities/": {
      "get": {
        "operationId": "identities_list",
        "description": "Create, list, retrieve, and update identities for the authenticated user.",
        "tags": [
          "Identities"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Identity"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi identity list"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentities = ravi.identities.list()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identities = await ravi.identities.list();"
          }
        ]
      },
      "post": {
        "operationId": "identities_create",
        "description": "Create, list, retrieve, and update identities for the authenticated user.",
        "tags": [
          "Identities"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityCreateRequest"
              },
              "examples": {
                "CreateIdentity(auto-name)": {
                  "value": {},
                  "summary": "Create identity (auto-name)"
                },
                "CreateIdentityWithName": {
                  "value": {
                    "name": "shopping-agent"
                  },
                  "summary": "Create identity with name"
                },
                "CreateIdentityWithCustomEmailIdentifier": {
                  "value": {
                    "name": "shopping-agent",
                    "email_identifier": "shopping"
                  },
                  "summary": "Create identity with custom email identifier"
                },
                "CreateIdentityWithIdentifier+Domain": {
                  "value": {
                    "name": "shopping-agent",
                    "email_identifier": "shopping",
                    "domain": "example.com"
                  },
                  "summary": "Create identity with identifier + domain"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/IdentityCreateRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/IdentityCreateRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityCreate"
                },
                "examples": {
                  "IdentityCreated": {
                    "value": {
                      "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "name": "Sarah Johnson",
                      "inbox": "sarah.johnson472@example.com",
                      "phone": null,
                      "created_dt": "2025-06-01T12:00:00Z",
                      "updated_dt": "2025-06-01T12:00:00Z"
                    },
                    "summary": "Identity created"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi identity create --name \"shopping-agent\" --email-identifier shopping --provision-phone"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.create(\n    name=\"shopping-agent\",\n    email_identifier=\"shopping\",  # inbox local part; omit to auto-generate\n    provision_phone=True,         # also give it a phone number\n)\nprint(identity.email.address, identity.phone.number)"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.create({\n  name: \"shopping-agent\",\n  email_identifier: \"shopping\", // inbox local part; omit to auto-generate\n  provision_phone: true,        // also give it a phone number\n});\nconsole.log(identity.email.address, identity.phone?.number);"
          }
        ]
      }
    },
    "/api/identities/{uuid}/": {
      "get": {
        "operationId": "identities_retrieve",
        "description": "Create, list, retrieve, and update identities for the authenticated user.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Identities"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");"
          }
        ]
      },
      "put": {
        "operationId": "identities_update",
        "description": "Create, list, retrieve, and update identities for the authenticated user.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Identities"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/IdentityRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/IdentityRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "identities_partial_update",
        "description": "Create, list, retrieve, and update identities for the authenticated user.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Identities"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedIdentityRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedIdentityRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedIdentityRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.update(\"<identity-uuid>\", name=\"renamed-agent\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.update(\"<identity-uuid>\", { name: \"renamed-agent\" });"
          }
        ]
      }
    },
    "/api/identities/{uuid}/provision-phone/": {
      "post": {
        "operationId": "identities_provision_phone_create",
        "description": "Provision a new phone number and link it to the identity. Optionally specify country_code (defaults to US). Returns 409 if the identity already has a phone number. Returns 503 if phone provisioning is temporarily unavailable.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Identities"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityRequest"
              },
              "examples": {
                "ProvisionPhone(defaultUS)": {
                  "value": {},
                  "summary": "Provision phone (default US)"
                },
                "ProvisionPhoneWithCountryCode": {
                  "value": {
                    "country_code": "CA"
                  },
                  "summary": "Provision phone with country code"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/IdentityRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/IdentityRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                },
                "examples": {
                  "PhoneProvisioned": {
                    "value": {
                      "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "name": "Sarah Johnson",
                      "inbox": "sarah.johnson472@example.com",
                      "phone": "+15551234567",
                      "created_dt": "2025-06-01T12:00:00Z",
                      "updated_dt": "2025-06-01T12:00:00Z"
                    },
                    "summary": "Phone provisioned"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.provision_phone(\"<identity-uuid>\")\nprint(identity.phone.number)"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.provisionPhone(\"<identity-uuid>\");\nconsole.log(identity.phone?.number);"
          }
        ]
      }
    },
    "/api/identities/{uuid}/voice-agent/": {
      "get": {
        "operationId": "identities_voice_agent_retrieve",
        "description": "Create or update the response URL used for live voice-agent calls.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Identities"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAgentConfig"
                }
              }
            },
            "description": ""
          }
        }
      },
      "put": {
        "operationId": "identities_voice_agent_update",
        "description": "Create or update the response URL used for live voice-agent calls.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Identities"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceAgentConfigRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/VoiceAgentConfigRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/VoiceAgentConfigRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAgentConfig"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "identities_voice_agent_partial_update",
        "description": "Create or update the response URL used for live voice-agent calls.",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Identities"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedVoiceAgentConfigRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedVoiceAgentConfigRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedVoiceAgentConfigRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoiceAgentConfig"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/email-inbox/": {
      "get": {
        "operationId": "email_inbox_list",
        "description": "List email threads grouped by thread_id, newest first. Each thread includes message count, unread count, subject, preview, and attachment names. Filterable by has_unread and inbox.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmailThread"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi inbox email --unread"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nthreads = identity.email.threads()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst threads = await identity.email.threads();"
          }
        ]
      }
    },
    "/api/email-inbox/{id}/": {
      "get": {
        "operationId": "email_inbox_retrieve",
        "description": "Retrieve a single email thread by thread_id, returning all messages in chronological order. Returns 404 if the thread is not found.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "pattern": "^[^/]+$"
            },
            "required": true
          }
        ],
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailThreadDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/sms-inbox/": {
      "get": {
        "operationId": "sms_inbox_list",
        "description": "List SMS conversations grouped by sender, newest first. Each conversation includes message count, unread count, preview, and phone number. Filterable by has_unread, phone, and identity.",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope conversations to one identity."
          }
        ],
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SMSConversation"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi inbox sms --unread"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nconversations = identity.phone.conversations()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst conversations = await identity.phone?.conversations();"
          }
        ]
      }
    },
    "/api/sms-inbox/{id}/": {
      "get": {
        "operationId": "sms_inbox_retrieve",
        "description": "Retrieve a single SMS conversation by conversation_id ({phone_id}_{from_number}). Returns all messages in chronological order. Returns 400 for an invalid conversation ID format, 404 if not found.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SMSConversationDetail"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/email-messages/": {
      "get": {
        "operationId": "email_messages_list",
        "description": "List email messages for the authenticated user, sorted oldest-first. Designed for cursor-based polling: pass created_after (ISO 8601 datetime) to fetch only messages newer than the cursor. Also filterable by direction (incoming/outgoing), is_read, thread_id, and from_email. Returns paginated results with limit/offset pagination (default limit: 50, max: 200).",
        "parameters": [
          {
            "in": "query",
            "name": "created_after",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "in": "query",
            "name": "direction",
            "schema": {
              "type": "string",
              "x-spec-enum-id": "0f9b1c9d69d835bd",
              "enum": [
                "incoming",
                "outgoing"
              ]
            },
            "description": "Whether this message was received (incoming) or sent (outgoing)\n\n* `incoming` - Incoming\n* `outgoing` - Outgoing"
          },
          {
            "in": "query",
            "name": "from_email",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "is_read",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "thread_id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRaviEmailList"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi message email --unread"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ninbox = identity.email.inbox(unread=True)"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst inbox = await identity.email.inbox({ unread: true });"
          }
        ]
      }
    },
    "/api/email-messages/compose/": {
      "post": {
        "operationId": "email_messages_compose_create",
        "description": "Compose and send a new email. Identity-scoped keys send from the bound identity's inbox. Management-scoped keys must pass either the 'identity' query parameter (identity UUID) or the 'inbox' query parameter (inbox ID). Supports to_email, subject, content, cc, bcc, and attachment_uuids. Returns 400 if a management-scoped request is missing the inbox parameter or validation fails, 404 if the inbox is not found.",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Sender identity UUID. Required for identity-object calls with management-scoped keys."
          },
          {
            "in": "query",
            "name": "inbox",
            "schema": {
              "type": "integer"
            },
            "description": "Sender inbox ID. Use identity instead when sending through an identity object."
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              },
              "examples": {
                "ComposeEmail": {
                  "value": {
                    "to_email": "alice@example.com",
                    "subject": "Meeting tomorrow",
                    "content": "Hi Alice, are we still on for tomorrow at 3pm?"
                  },
                  "summary": "Compose email"
                },
                "ComposeEmailWithCCAndAttachments": {
                  "value": {
                    "to_email": "alice@example.com",
                    "subject": "Q4 Report",
                    "content": "Please find the Q4 report attached.",
                    "cc": [
                      "bob@example.com"
                    ],
                    "bcc": [
                      "manager@example.com"
                    ],
                    "attachment_uuids": [
                      "f47ac10b-58cc-4372-a567-0e02b2c3d479"
                    ]
                  },
                  "summary": "Compose email with CC and attachments"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviEmailSent"
                },
                "examples": {
                  "EmailSent": {
                    "value": {
                      "id": 42,
                      "url": "https://api.ravi.app/api/messages/42/",
                      "from_email": "shopping@example.com",
                      "from_display_name": null,
                      "to_email": "alice@example.com",
                      "cc": [],
                      "direction": "outgoing",
                      "is_read": true,
                      "message_id": "<abc123@example.com>",
                      "thread_id": null,
                      "attachments": [],
                      "created_dt": "2025-06-01T12:00:00Z"
                    },
                    "summary": "Email sent"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi identity use <identity-uuid>\nravi email compose --to user@example.com --subject \"Hello\" --body \"Hi from my agent\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nmsg = identity.email.send(\n    to=\"user@example.com\",\n    subject=\"Hello\",\n    body=\"Hi from my agent\",\n)"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst msg = await identity.email.send(\n  \"user@example.com\",\n  \"Hello\",\n  \"Hi from my agent\",\n);"
          }
        ]
      }
    },
    "/api/email-messages/{id}/": {
      "get": {
        "operationId": "email_messages_retrieve",
        "description": "Retrieve a single email message by ID. Returns full message details including content and attachments.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Email Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviEmail"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi message email <message-id>"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nmsg = identity.email.get(\"<message-id>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst msg = await identity.email.get(\"<message-id>\");"
          }
        ]
      },
      "put": {
        "operationId": "email_messages_update",
        "description": "Update a message's mutable fields (e.g. is_read). Replaces all mutable fields with the provided values.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Email Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviEmail"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "email_messages_partial_update",
        "description": "Partially update a message's mutable fields (e.g. mark as read). Only the provided fields are changed.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Email Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRaviEmailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRaviEmailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRaviEmailRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviEmail"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nmsg = identity.email.get(\"<message-id>\")\nmsg.mark_read()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst msg = await identity.email.get(\"<message-id>\");\nawait msg.markRead();"
          }
        ]
      }
    },
    "/api/email-messages/{id}/forward/": {
      "post": {
        "operationId": "email_messages_forward_create",
        "description": "Forward an email message to a new recipient. Requires to_email and content. Subject is always derived server-side from the original message. Supports optional cc, bcc, and attachment_uuids. Returns 400 if validation fails.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Email Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              },
              "examples": {
                "ForwardEmail": {
                  "value": {
                    "to_email": "bob@example.com",
                    "content": "FYI — see the original message below."
                  },
                  "summary": "Forward email"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviEmailSent"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi email forward <message-id> --to ops@acme.com --body \"FYI\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nmsg = identity.email.get(\"<message-id>\")\nmsg.forward(to=\"ops@acme.com\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst msg = await identity.email.get(\"<message-id>\");\nawait msg.forward(\"ops@acme.com\");"
          }
        ]
      }
    },
    "/api/email-messages/{id}/reply-all/": {
      "post": {
        "operationId": "email_messages_reply_all_create",
        "description": "Reply-all to an email message, sending to the original sender and all recipients. Subject is always derived server-side from the original message. Supports optional cc, bcc, and attachment_uuids. Returns 400 if validation fails.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Email Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviEmailSent"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi email reply-all <message-id> --body \"Thanks, all!\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nmsg = identity.email.get(\"<message-id>\")\nmsg.reply_all(body=\"Thanks, all!\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst msg = await identity.email.get(\"<message-id>\");\nawait msg.replyAll(\"Thanks, all!\");"
          }
        ]
      }
    },
    "/api/email-messages/{id}/reply/": {
      "post": {
        "operationId": "email_messages_reply_create",
        "description": "Reply to a single email message. Sends the reply only to the original sender. Subject is always derived server-side from the original message. Supports optional cc, bcc, and attachment_uuids. Returns 400 if validation fails.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Email Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              },
              "examples": {
                "ReplyToEmail": {
                  "value": {
                    "content": "Thanks, see you at 3pm!"
                  },
                  "summary": "Reply to email"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RaviEmailRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviEmailSent"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi email reply <message-id> --body \"Thanks!\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nmsg = identity.email.get(\"<message-id>\")\nmsg.reply(body=\"Thanks!\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst msg = await identity.email.get(\"<message-id>\");\nawait msg.reply(\"Thanks!\");"
          }
        ]
      }
    },
    "/api/messages/": {
      "get": {
        "operationId": "messages_list",
        "description": "List SMS messages for the authenticated user, newest first. Filterable by direction (incoming/outgoing), is_read, and identity.",
        "parameters": [
          {
            "in": "query",
            "name": "direction",
            "schema": {
              "type": "string",
              "x-spec-enum-id": "0f9b1c9d69d835bd",
              "enum": [
                "incoming",
                "outgoing"
              ]
            },
            "description": "Whether this message was received (incoming) or sent (outgoing)\n\n* `incoming` - Incoming\n* `outgoing` - Outgoing"
          },
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          },
          {
            "in": "query",
            "name": "is_read",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RaviPhoneMessage"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi message sms --unread"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ninbox = identity.phone.inbox(unread=True)"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst inbox = await identity.phone?.inbox({ unread: true });"
          }
        ]
      }
    },
    "/api/messages/send/": {
      "post": {
        "operationId": "messages_send_create",
        "description": "Send an SMS from the identity's provisioned phone number. Identity-scoped keys send from the bound identity's phone number. Management-scoped keys must pass the 'identity' query parameter (identity UUID). Returns 400 if no identity is selected, 404 if the identity has no phone.",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Sender identity UUID. Required for management-scoped keys."
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsSendRequest"
              },
              "examples": {
                "SendSMS": {
                  "value": {
                    "to_number": "+14155559876",
                    "body": "Your verification code is 483920"
                  },
                  "summary": "Send SMS"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SmsSendRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SmsSendRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviPhoneMessage"
                },
                "examples": {
                  "SMSSent": {
                    "value": {
                      "id": 15,
                      "url": "https://api.ravi.app/api/sms/15/",
                      "from_number": "+15551234567",
                      "to_number": "+14155559876",
                      "body": "Your verification code is 483920",
                      "message_sid": "SM1234567890abcdef1234567890abcdef",
                      "phone": "https://api.ravi.app/api/phones/3/",
                      "direction": "outgoing",
                      "is_read": true,
                      "created_dt": "2025-06-01T12:00:00Z"
                    },
                    "summary": "SMS sent"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi identity use <identity-uuid>\nravi sms send --to +15551234567 --body \"Your code is 482910\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nsms = identity.phone.send(to=\"+15551234567\", body=\"Your code is 482910\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst sms = await identity.phone?.send(\"+15551234567\", \"Your code is 482910\");"
          }
        ]
      }
    },
    "/api/messages/{id}/": {
      "get": {
        "operationId": "messages_retrieve",
        "description": "Retrieve a single SMS message by ID, including body and metadata.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Phone Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviPhoneMessage"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi message sms <message-id>"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nsms = identity.phone.get(\"<message-id>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst sms = await identity.phone?.get(\"<message-id>\");"
          }
        ]
      },
      "put": {
        "operationId": "messages_update",
        "description": "Update a message's mutable fields (e.g. is_read). Replaces all mutable fields with the provided values.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Phone Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RaviPhoneMessageRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RaviPhoneMessageRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/RaviPhoneMessageRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviPhoneMessage"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "messages_partial_update",
        "description": "Partially update a message's mutable fields (e.g. mark as read). Only the provided fields are changed.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Phone Message.",
            "required": true
          }
        ],
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRaviPhoneMessageRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRaviPhoneMessageRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedRaviPhoneMessageRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviPhoneMessage"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nsms = identity.phone.get(\"<message-id>\")\nsms.mark_read()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst sms = await identity.phone?.get(\"<message-id>\");\nawait sms?.markRead();"
          }
        ]
      }
    },
    "/api/passwords/": {
      "get": {
        "operationId": "passwords_list",
        "description": "CRUD for password entries + password generator endpoint.",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          }
        ],
        "tags": [
          "Passwords"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PasswordEntry"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi passwords list"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nentries = identity.vault.passwords.list()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst entries = await identity.vault.passwords.list();"
          }
        ]
      },
      "post": {
        "operationId": "passwords_create",
        "description": "CRUD for password entries + password generator endpoint.",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          }
        ],
        "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": [
          {
            "bearerAuth": []
          }
        ],
        "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": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi passwords create acme.com --username agent --generate"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nentry = identity.vault.passwords.create(domain=\"acme.com\", username=\"agent\", password=\"s3cret\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst entry = await identity.vault.passwords.create({ domain: \"acme.com\", username: \"agent\", password: \"s3cret\" });"
          }
        ]
      }
    },
    "/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": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratePasswordResponse"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi passwords generate --length 24"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\ngenerated = identity.vault.passwords.generate()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst generated = await identity.vault.passwords.generate();"
          }
        ]
      }
    },
    "/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": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordEntry"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi passwords get <password-uuid>"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nentry = identity.vault.passwords.get(\"<password-uuid>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst entry = await identity.vault.passwords.get(\"<password-uuid>\");"
          }
        ]
      },
      "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": [
          {
            "bearerAuth": []
          }
        ],
        "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": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasswordEntry"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi passwords update <password-uuid> --password \"new-secret\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nentry = identity.vault.passwords.update(\"<password-uuid>\", password=\"new-secret\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst entry = await identity.vault.passwords.update(\"<password-uuid>\", { password: \"new-secret\" });"
          }
        ]
      },
      "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": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi passwords delete <password-uuid>"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nidentity.vault.passwords.delete(\"<password-uuid>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nawait identity.vault.passwords.delete(\"<password-uuid>\");"
          }
        ]
      }
    },
    "/api/phone/": {
      "get": {
        "operationId": "phone_list",
        "description": "List all phone numbers provisioned for the authenticated user.",
        "tags": [
          "Phone"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RaviPhone"
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/phone/{id}/": {
      "get": {
        "operationId": "phone_retrieve",
        "description": "Retrieve a single provisioned phone number by ID.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer"
            },
            "description": "A unique integer value identifying this Phone.",
            "required": true
          }
        ],
        "tags": [
          "Phone"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RaviPhone"
                }
              }
            },
            "description": ""
          }
        }
      }
    },
    "/api/secrets/": {
      "get": {
        "operationId": "secrets_list",
        "description": "CRUD for key-value secret entries (API keys, env vars).",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          },
          {
            "in": "query",
            "name": "key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Secrets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SecretEntry"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi secrets list"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nsecrets = identity.vault.secrets.list()"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst secrets = await identity.vault.secrets.list();"
          }
        ]
      },
      "post": {
        "operationId": "secrets_create",
        "description": "CRUD for key-value secret entries (API keys, env vars).",
        "parameters": [
          {
            "in": "query",
            "name": "identity",
            "schema": {
              "type": "string"
            },
            "description": "Identity UUID to scope the request to a single identity."
          }
        ],
        "tags": [
          "Secrets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretEntryRequest"
              },
              "examples": {
                "CreateSecret": {
                  "value": {
                    "key": "OPENAI_API_KEY",
                    "value": "sk-proj-abc123def456",
                    "notes": "Production key"
                  },
                  "summary": "Create secret"
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SecretEntryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SecretEntryRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretEntry"
                },
                "examples": {
                  "SecretCreated": {
                    "value": {
                      "uuid": "d4e5f6a7-b8c9-0123-defa-345678901bcd",
                      "identity": 1,
                      "key": "OPENAI_API_KEY",
                      "value": "sk-proj-abc123def456",
                      "notes": "Production key",
                      "created_dt": "2025-06-01T12:00:00Z",
                      "updated_dt": "2025-06-01T12:00:00Z"
                    },
                    "summary": "Secret created"
                  }
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi secrets set OPENAI_API_KEY \"sk-...\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nsecret = identity.vault.secrets.create(key=\"OPENAI_API_KEY\", value=\"sk-...\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst secret = await identity.vault.secrets.create({ key: \"OPENAI_API_KEY\", value: \"sk-...\" });"
          }
        ]
      }
    },
    "/api/secrets/{uuid}/": {
      "get": {
        "operationId": "secrets_retrieve",
        "description": "CRUD for key-value secret entries (API keys, env vars).",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Secrets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretEntry"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi secrets get OPENAI_API_KEY"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nsecret = identity.vault.secrets.get(\"<secret-uuid>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst secret = await identity.vault.secrets.get(\"<secret-uuid>\");"
          }
        ]
      },
      "put": {
        "operationId": "secrets_update",
        "description": "CRUD for key-value secret entries (API keys, env vars).",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Secrets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SecretEntryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SecretEntryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SecretEntryRequest"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretEntry"
                }
              }
            },
            "description": ""
          }
        }
      },
      "patch": {
        "operationId": "secrets_partial_update",
        "description": "CRUD for key-value secret entries (API keys, env vars).",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Secrets"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSecretEntryRequest"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSecretEntryRequest"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PatchedSecretEntryRequest"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecretEntry"
                }
              }
            },
            "description": ""
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi secrets set OPENAI_API_KEY \"sk-new...\""
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nsecret = identity.vault.secrets.update(\"<secret-uuid>\", value=\"sk-new...\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nconst secret = await identity.vault.secrets.update(\"<secret-uuid>\", { value: \"sk-new...\" });"
          }
        ]
      },
      "delete": {
        "operationId": "secrets_destroy",
        "description": "CRUD for key-value secret entries (API keys, env vars).",
        "parameters": [
          {
            "in": "path",
            "name": "uuid",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true
          }
        ],
        "tags": [
          "Secrets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No response body"
          }
        },
        "x-codeSamples": [
          {
            "lang": "bash",
            "label": "Ravi CLI",
            "source": "ravi secrets delete <secret-uuid>"
          },
          {
            "lang": "python",
            "label": "Python",
            "source": "from ravi import Ravi\n\nravi = Ravi(api_key=\"ravi_mgmt_...\")\n\nidentity = ravi.identities.get(\"<identity-uuid>\")\nidentity.vault.secrets.delete(\"<secret-uuid>\")"
          },
          {
            "lang": "typescript",
            "label": "TypeScript",
            "source": "import { Ravi } from \"@ravi-hq/sdk\";\n\nconst ravi = new Ravi({ apiKey: process.env.RAVI_API_KEY! });\n\nconst identity = await ravi.identities.get(\"<identity-uuid>\");\nawait identity.vault.secrets.delete(\"<secret-uuid>\");"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PresignRequestRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "content_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "size": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "content_type",
          "filename",
          "size"
        ]
      },
      "PresignResponse": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid"
          },
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "storage_key": {
            "type": "string"
          }
        },
        "required": [
          "storage_key",
          "upload_url",
          "uuid"
        ]
      },
      "BindIdentityRequest": {
        "type": "object",
        "properties": {
          "identity": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "identity"
        ]
      },
      "BindIdentityResponse": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string"
          },
          "refresh": {
            "type": "string"
          }
        },
        "required": [
          "access",
          "refresh"
        ]
      },
      "IdentityAPIKeyCreate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 100
          },
          "identity_uuid": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "identity_uuid",
          "label"
        ]
      },
      "IdentityAPIKeyCreateRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "identity_uuid": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "identity_uuid",
          "label"
        ]
      },
      "IdentityAPIKeyList": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "masked_key": {
            "type": "string",
            "readOnly": true
          },
          "label": {
            "type": "string",
            "maxLength": 100
          },
          "identity": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "identity",
          "label",
          "masked_key",
          "uuid"
        ]
      },
      "JWT": {
        "type": "object",
        "description": "Serializer for JWT authentication.",
        "properties": {
          "access": {
            "type": "string"
          },
          "refresh": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserDetails"
          }
        },
        "required": [
          "access",
          "refresh",
          "user"
        ]
      },
      "LoginRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "password"
        ]
      },
      "ManagementAPIKeyCreate": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "label"
        ]
      },
      "ManagementAPIKeyCreateRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "label"
        ]
      },
      "ManagementAPIKeyList": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "masked_key": {
            "type": "string",
            "readOnly": true
          },
          "label": {
            "type": "string",
            "maxLength": 100
          },
          "last_used_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "label",
          "masked_key",
          "uuid"
        ]
      },
      "MasterResponse": {
        "type": "object",
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "email",
          "first_name",
          "last_name"
        ]
      },
      "PasswordChangeRequest": {
        "type": "object",
        "properties": {
          "new_password1": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "new_password2": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "new_password1",
          "new_password2"
        ]
      },
      "PasswordResetConfirmRequest": {
        "type": "object",
        "description": "Serializer for confirming a password reset attempt.",
        "properties": {
          "new_password1": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "new_password2": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "uid": {
            "type": "string",
            "minLength": 1
          },
          "token": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "new_password1",
          "new_password2",
          "token",
          "uid"
        ]
      },
      "PasswordResetRequest": {
        "type": "object",
        "description": "Serializer for requesting a password reset e-mail.",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "minLength": 1
          }
        },
        "required": [
          "email"
        ]
      },
      "PatchedUserDetailsRequest": {
        "type": "object",
        "description": "User model w/o password",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1,
            "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
            "pattern": "^[\\w.@+-]+$",
            "maxLength": 150
          },
          "first_name": {
            "type": "string",
            "maxLength": 150
          },
          "last_name": {
            "type": "string",
            "maxLength": 150
          }
        }
      },
      "RegisterRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1,
            "maxLength": 150
          },
          "email": {
            "type": "string",
            "format": "email",
            "minLength": 1
          },
          "password1": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          },
          "password2": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          }
        },
        "required": [
          "email",
          "password1",
          "password2",
          "username"
        ]
      },
      "ResendEmailVerificationRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "minLength": 1
          }
        },
        "required": [
          "email"
        ]
      },
      "RestAuthDetail": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "detail"
        ]
      },
      "TokenRefresh": {
        "type": "object",
        "properties": {
          "access": {
            "type": "string",
            "readOnly": true
          }
        },
        "required": [
          "access"
        ]
      },
      "TokenRefreshRequest": {
        "type": "object",
        "properties": {
          "refresh": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          }
        },
        "required": [
          "refresh"
        ]
      },
      "TokenVerifyRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          }
        },
        "required": [
          "token"
        ]
      },
      "UserDetails": {
        "type": "object",
        "description": "User model w/o password",
        "properties": {
          "pk": {
            "type": "integer",
            "readOnly": true,
            "title": "ID"
          },
          "username": {
            "type": "string",
            "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
            "pattern": "^[\\w.@+-]+$",
            "maxLength": 150
          },
          "email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "title": "Email address"
          },
          "first_name": {
            "type": "string",
            "maxLength": 150
          },
          "last_name": {
            "type": "string",
            "maxLength": 150
          }
        },
        "required": [
          "email",
          "pk",
          "username"
        ]
      },
      "UserDetailsRequest": {
        "type": "object",
        "description": "User model w/o password",
        "properties": {
          "username": {
            "type": "string",
            "minLength": 1,
            "description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
            "pattern": "^[\\w.@+-]+$",
            "maxLength": 150
          },
          "first_name": {
            "type": "string",
            "maxLength": 150
          },
          "last_name": {
            "type": "string",
            "maxLength": 150
          }
        },
        "required": [
          "username"
        ]
      },
      "VerifyEmailRequest": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "writeOnly": true,
            "minLength": 1
          }
        },
        "required": [
          "key"
        ]
      },
      "Subscription": {
        "type": "object",
        "description": "Serializer for Subscription model.\n\nProvides read-only access to subscription details including\na human-readable plan name derived from the plan configuration.",
        "properties": {
          "plan": {
            "enum": [
              "FREE",
              "MONTHLY",
              "YEARLY"
            ],
            "type": "string",
            "x-spec-enum-id": "5895ef8a2950d3d4",
            "readOnly": true,
            "description": "Plan code.\n\n* `FREE` - Free\n* `MONTHLY` - Monthly\n* `YEARLY` - Yearly"
          },
          "plan_name": {
            "type": "string",
            "description": "Get the human-readable plan name.",
            "readOnly": true
          },
          "status": {
            "enum": [
              "ACTIVE",
              "PAST_DUE",
              "CANCELLED",
              "INACTIVE"
            ],
            "type": "string",
            "x-spec-enum-id": "320f891467fd0452",
            "readOnly": true,
            "description": "Current status of the subscription.\n\n* `ACTIVE` - Active\n* `PAST_DUE` - Past Due\n* `CANCELLED` - Cancelled\n* `INACTIVE` - Inactive"
          },
          "current_period_end": {
            "type": "string",
            "format": "date",
            "readOnly": true,
            "nullable": true,
            "description": "End date of the current billing period (None for free plan)."
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "current_period_end",
          "plan",
          "plan_name",
          "status"
        ]
      },
      "Contact": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "identity": {
            "type": "integer"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "phone_number": {
            "type": "string",
            "pattern": "^\\+[1-9]\\d{1,14}$",
            "maxLength": 20
          },
          "display_name": {
            "type": "string",
            "maxLength": 255
          },
          "nickname": {
            "type": "string",
            "maxLength": 100
          },
          "is_trusted": {
            "type": "boolean"
          },
          "source": {
            "enum": [
              "auto",
              "manual"
            ],
            "type": "string",
            "description": "* `auto` - Auto\n* `manual` - Manual",
            "x-spec-enum-id": "83674bf0dc9ba8e2",
            "readOnly": true
          },
          "interaction_count": {
            "type": "integer",
            "readOnly": true
          },
          "last_interaction_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "interaction_count",
          "last_interaction_dt",
          "source",
          "updated_dt",
          "uuid"
        ]
      },
      "ContactRequest": {
        "type": "object",
        "properties": {
          "identity": {
            "type": "integer"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "phone_number": {
            "type": "string",
            "pattern": "^\\+[1-9]\\d{1,14}$",
            "maxLength": 20
          },
          "display_name": {
            "type": "string",
            "maxLength": 255
          },
          "nickname": {
            "type": "string",
            "maxLength": 100
          },
          "is_trusted": {
            "type": "boolean"
          }
        }
      },
      "PatchedContactRequest": {
        "type": "object",
        "properties": {
          "identity": {
            "type": "integer"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "phone_number": {
            "type": "string",
            "pattern": "^\\+[1-9]\\d{1,14}$",
            "maxLength": 20
          },
          "display_name": {
            "type": "string",
            "maxLength": 255
          },
          "nickname": {
            "type": "string",
            "maxLength": 100
          },
          "is_trusted": {
            "type": "boolean"
          }
        }
      },
      "DeviceCodeResponse": {
        "type": "object",
        "description": "Serializer for device code response.",
        "properties": {
          "device_code": {
            "type": "string",
            "description": "Code for client polling"
          },
          "user_code": {
            "type": "string",
            "description": "Code for user to enter"
          },
          "verification_uri": {
            "type": "string",
            "format": "uri",
            "description": "URL for user to visit"
          },
          "expires_in": {
            "type": "integer",
            "description": "Seconds until expiration"
          },
          "interval": {
            "type": "integer",
            "description": "Polling interval in seconds"
          }
        },
        "required": [
          "device_code",
          "expires_in",
          "interval",
          "user_code",
          "verification_uri"
        ]
      },
      "DeviceTokenErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "error_description": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "error_description"
        ]
      },
      "DeviceTokenRequestRequest": {
        "type": "object",
        "description": "Serializer for device token polling request.",
        "properties": {
          "device_code": {
            "type": "string",
            "minLength": 1,
            "description": "Device code from initial request"
          },
          "wait": {
            "type": "boolean",
            "default": false,
            "description": "Long-poll: block up to 120s until authorized or expired"
          }
        },
        "required": [
          "device_code"
        ]
      },
      "DeviceTokenSuccess": {
        "type": "object",
        "description": "Serializer for successful token response.\n\nShape varies by identity count:\n- 1 identity (signup): includes ``identity_key`` + ``identity`` dict\n- 0 or >1 identities (login): includes ``identities`` list, no auto-created key",
        "properties": {
          "access": {
            "type": "string",
            "description": "JWT access token"
          },
          "refresh": {
            "type": "string",
            "description": "JWT refresh token"
          },
          "management_key": {
            "type": "string",
            "description": "Management API key (ravi_mgmt_...)"
          },
          "user": {
            "type": "object",
            "additionalProperties": {},
            "description": "User information"
          },
          "identity_key": {
            "type": "string",
            "description": "Identity API key (ravi_id_...) — only present for single-identity (signup) flows"
          },
          "identity": {
            "type": "object",
            "additionalProperties": {},
            "description": "Default identity info (uuid, name, email) — only present for signup"
          },
          "identities": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            },
            "description": "All user identities — present for login (>1 or 0 identities)"
          }
        },
        "required": [
          "access",
          "management_key",
          "refresh",
          "user"
        ]
      },
      "CheckEmailAvailability": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "email"
        ]
      },
      "Domain": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "domain": {
            "type": "string",
            "readOnly": true
          },
          "is_platform": {
            "type": "boolean",
            "readOnly": true
          },
          "is_verified": {
            "type": "boolean",
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "domain",
          "is_platform",
          "is_verified",
          "uuid"
        ]
      },
      "RaviInbox": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "description": "Auto-generated email address for this inbox."
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "email",
          "id",
          "uuid"
        ]
      },
      "RaviInboxCreate": {
        "type": "object",
        "description": "Input serializer for creating a RaviInbox with an optional custom address.\n\nNo identity field — inbox create is standalone.",
        "properties": {
          "email": {
            "type": "string",
            "default": "",
            "maxLength": 254
          }
        }
      },
      "RaviInboxCreateRequest": {
        "type": "object",
        "description": "Input serializer for creating a RaviInbox with an optional custom address.\n\nNo identity field — inbox create is standalone.",
        "properties": {
          "email": {
            "type": "string",
            "default": "",
            "maxLength": 254
          }
        }
      },
      "Identity": {
        "type": "object",
        "description": "Serializer for Identity with nested email/phone strings.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Human-readable label for this identity, unique per user.",
            "maxLength": 100
          },
          "inbox": {
            "type": "string",
            "readOnly": true
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "inbox",
          "name",
          "phone",
          "updated_dt",
          "uuid"
        ]
      },
      "IdentityCreate": {
        "type": "object",
        "description": "Extends IdentitySerializer with the email identifier + optional domain.\n\nThe inbox address is specified as an ``email_identifier`` (the local part,\ne.g. ``\"shopping\"``) plus an optional ``domain``. Both omitted → the address\nis auto-generated. ``domain`` without an identifier is invalid.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "default": "",
            "maxLength": 100
          },
          "inbox": {
            "type": "string",
            "readOnly": true
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "provision_phone": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "created_dt",
          "inbox",
          "phone",
          "updated_dt",
          "uuid"
        ]
      },
      "IdentityCreateRequest": {
        "type": "object",
        "description": "Extends IdentitySerializer with the email identifier + optional domain.\n\nThe inbox address is specified as an ``email_identifier`` (the local part,\ne.g. ``\"shopping\"``) plus an optional ``domain``. Both omitted → the address\nis auto-generated. ``domain`` without an identifier is invalid.",
        "properties": {
          "name": {
            "type": "string",
            "default": "",
            "maxLength": 100
          },
          "email_identifier": {
            "type": "string",
            "writeOnly": true,
            "default": "",
            "maxLength": 64
          },
          "domain": {
            "type": "string",
            "writeOnly": true,
            "default": "",
            "maxLength": 253
          },
          "provision_phone": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "IdentityRequest": {
        "type": "object",
        "description": "Serializer for Identity with nested email/phone strings.",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Human-readable label for this identity, unique per user.",
            "maxLength": 100
          }
        },
        "required": [
          "name"
        ]
      },
      "PatchedIdentityRequest": {
        "type": "object",
        "description": "Serializer for Identity with nested email/phone strings.",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Human-readable label for this identity, unique per user.",
            "maxLength": 100
          }
        }
      },
      "PatchedVoiceAgentConfigRequest": {
        "type": "object",
        "properties": {
          "response_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "maxLength": 2048
          },
          "enabled": {
            "type": "boolean"
          },
          "timeout_seconds": {
            "type": "integer",
            "maximum": 32767,
            "minimum": 0
          }
        }
      },
      "VoiceAgentConfig": {
        "type": "object",
        "properties": {
          "response_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "signing_secret": {
            "type": "string",
            "readOnly": true
          },
          "enabled": {
            "type": "boolean"
          },
          "timeout_seconds": {
            "type": "integer",
            "maximum": 32767,
            "minimum": 0
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "response_url",
          "signing_secret",
          "updated_dt"
        ]
      },
      "VoiceAgentConfigRequest": {
        "type": "object",
        "properties": {
          "response_url": {
            "type": "string",
            "format": "uri",
            "minLength": 1,
            "maxLength": 2048
          },
          "enabled": {
            "type": "boolean"
          },
          "timeout_seconds": {
            "type": "integer",
            "maximum": 32767,
            "minimum": 0
          }
        },
        "required": [
          "response_url"
        ]
      },
      "EmailAttachment": {
        "type": "object",
        "description": "Full attachment representation including a presigned download URL.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "filename": {
            "type": "string",
            "description": "Original filename",
            "maxLength": 255
          },
          "content_type": {
            "type": "string",
            "description": "MIME content type",
            "maxLength": 255
          },
          "size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "description": "File size in bytes"
          },
          "content_id": {
            "type": "string",
            "description": "Content-ID for inline images (RFC 2392)",
            "maxLength": 255
          },
          "is_inline": {
            "type": "boolean",
            "description": "Whether this is an inline image (CID reference)"
          },
          "download_url": {
            "type": "string",
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "content_type",
          "created_dt",
          "download_url",
          "filename",
          "size",
          "uuid"
        ]
      },
      "EmailThread": {
        "type": "object",
        "properties": {
          "thread_id": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "preview": {
            "type": "string"
          },
          "from_email": {
            "type": "string",
            "format": "email"
          },
          "from_display_name": {
            "type": "string",
            "default": ""
          },
          "inbox": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "message_count": {
            "type": "integer"
          },
          "unread_count": {
            "type": "integer"
          },
          "attachment_names": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "latest_message_dt": {
            "type": "string",
            "format": "date-time"
          },
          "oldest_message_dt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "attachment_names",
          "from_email",
          "inbox",
          "latest_message_dt",
          "message_count",
          "oldest_message_dt",
          "preview",
          "subject",
          "thread_id",
          "unread_count"
        ]
      },
      "EmailThreadDetail": {
        "type": "object",
        "properties": {
          "thread_id": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "message_count": {
            "type": "integer"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailThreadMessage"
            }
          }
        },
        "required": [
          "message_count",
          "messages",
          "subject",
          "thread_id"
        ]
      },
      "EmailThreadMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "from_email": {
            "type": "string",
            "format": "email",
            "description": "The sender's email address",
            "maxLength": 254
          },
          "from_display_name": {
            "type": "string",
            "description": "The sender's display name from the From header",
            "maxLength": 255
          },
          "to_email": {
            "type": "string",
            "format": "email",
            "description": "The recipient's email address",
            "maxLength": 254
          },
          "cc": {
            "type": "string",
            "description": "CC recipients (comma-separated email addresses)"
          },
          "subject": {
            "type": "string"
          },
          "text_content": {
            "type": "string"
          },
          "html_content": {
            "type": "string"
          },
          "direction": {
            "enum": [
              "incoming",
              "outgoing"
            ],
            "type": "string",
            "x-spec-enum-id": "0f9b1c9d69d835bd",
            "description": "Whether this message was received (incoming) or sent (outgoing)\n\n* `incoming` - Incoming\n* `outgoing` - Outgoing"
          },
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailAttachment"
            },
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "attachments",
          "created_dt",
          "from_email",
          "id",
          "to_email"
        ]
      },
      "SMSConversation": {
        "type": "object",
        "properties": {
          "conversation_id": {
            "type": "string",
            "description": "Composite key: {phone_id}_{from_number}"
          },
          "from_number": {
            "type": "string",
            "description": "External phone number in E.164 format"
          },
          "phone": {
            "type": "string",
            "nullable": true,
            "readOnly": true,
            "description": "URL to the associated RaviPhone resource"
          },
          "phone_number": {
            "type": "string",
            "description": "The Ravi phone number in E.164 format"
          },
          "preview": {
            "type": "string",
            "description": "Truncated preview of the latest message content"
          },
          "message_count": {
            "type": "integer",
            "description": "Total number of messages in the conversation"
          },
          "unread_count": {
            "type": "integer",
            "description": "Number of unread messages in the conversation"
          },
          "latest_message_dt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the most recent message"
          }
        },
        "required": [
          "conversation_id",
          "from_number",
          "latest_message_dt",
          "message_count",
          "phone",
          "phone_number",
          "preview",
          "unread_count"
        ]
      },
      "SMSConversationDetail": {
        "type": "object",
        "properties": {
          "conversation_id": {
            "type": "string",
            "description": "Composite key: {phone_id}_{from_number}"
          },
          "from_number": {
            "type": "string",
            "description": "External phone number in E.164 format"
          },
          "phone": {
            "type": "string",
            "description": "The Ravi phone number in E.164 format"
          },
          "message_count": {
            "type": "integer",
            "description": "Total number of messages in the conversation"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SMSConversationMessage"
            },
            "description": "All messages in the conversation, ordered by date"
          }
        },
        "required": [
          "conversation_id",
          "from_number",
          "message_count",
          "messages",
          "phone"
        ]
      },
      "SMSConversationMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "body": {
            "type": "string"
          },
          "direction": {
            "enum": [
              "incoming",
              "outgoing"
            ],
            "type": "string",
            "x-spec-enum-id": "0f9b1c9d69d835bd",
            "description": "Whether this message was received (incoming) or sent (outgoing)\n\n* `incoming` - Incoming\n* `outgoing` - Outgoing"
          },
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "id"
        ]
      },
      "EmailAttachmentMeta": {
        "type": "object",
        "description": "Lightweight attachment serializer without download URL (for list views).",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "filename": {
            "type": "string",
            "description": "Original filename",
            "maxLength": 255
          },
          "content_type": {
            "type": "string",
            "description": "MIME content type",
            "maxLength": 255
          },
          "size": {
            "type": "integer",
            "maximum": 2147483647,
            "minimum": 0,
            "description": "File size in bytes"
          },
          "is_inline": {
            "type": "boolean",
            "description": "Whether this is an inline image (CID reference)"
          }
        },
        "required": [
          "content_type",
          "filename",
          "size",
          "uuid"
        ]
      },
      "PaginatedRaviEmailList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RaviEmail"
            }
          }
        }
      },
      "PatchedRaviEmailRequest": {
        "type": "object",
        "description": "Full email message representation with nested attachments.",
        "properties": {
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          }
        }
      },
      "PatchedRaviPhoneMessageRequest": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "format": "uri"
          },
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          }
        }
      },
      "RaviEmail": {
        "type": "object",
        "description": "Full email message representation with nested attachments.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "from_email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "description": "The sender's email address"
          },
          "from_display_name": {
            "type": "string",
            "readOnly": true,
            "description": "The sender's display name from the From header"
          },
          "to_email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "description": "The recipient's email address"
          },
          "cc": {
            "type": "string",
            "readOnly": true,
            "description": "CC recipients (comma-separated email addresses)"
          },
          "subject": {
            "type": "string",
            "readOnly": true
          },
          "text_content": {
            "type": "string",
            "readOnly": true
          },
          "html_content": {
            "type": "string",
            "readOnly": true
          },
          "direction": {
            "enum": [
              "incoming",
              "outgoing"
            ],
            "type": "string",
            "x-spec-enum-id": "0f9b1c9d69d835bd",
            "readOnly": true,
            "description": "Whether this message was received (incoming) or sent (outgoing)\n\n* `incoming` - Incoming\n* `outgoing` - Outgoing"
          },
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          },
          "sender_type": {
            "type": "string",
            "readOnly": true
          },
          "message_id": {
            "type": "string",
            "readOnly": true,
            "description": "The Message-ID header value (unique identifier for this email)"
          },
          "thread_id": {
            "type": "string",
            "readOnly": true,
            "description": "Thread identifier (root message ID) for grouping conversations"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailAttachment"
            },
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "attachments",
          "cc",
          "created_dt",
          "direction",
          "from_display_name",
          "from_email",
          "html_content",
          "id",
          "message_id",
          "sender_type",
          "subject",
          "text_content",
          "thread_id",
          "to_email",
          "url",
          "uuid"
        ]
      },
      "RaviEmailRequest": {
        "type": "object",
        "description": "Full email message representation with nested attachments.",
        "properties": {
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          }
        }
      },
      "RaviEmailSent": {
        "type": "object",
        "description": "Slim response for email write actions — omits content fields for brevity.",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "from_email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "description": "The sender's email address"
          },
          "from_display_name": {
            "type": "string",
            "readOnly": true,
            "description": "The sender's display name from the From header"
          },
          "to_email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "description": "The recipient's email address"
          },
          "cc": {
            "type": "string",
            "readOnly": true,
            "description": "CC recipients (comma-separated email addresses)"
          },
          "direction": {
            "enum": [
              "incoming",
              "outgoing"
            ],
            "type": "string",
            "x-spec-enum-id": "0f9b1c9d69d835bd",
            "readOnly": true,
            "description": "Whether this message was received (incoming) or sent (outgoing)\n\n* `incoming` - Incoming\n* `outgoing` - Outgoing"
          },
          "is_read": {
            "type": "boolean",
            "readOnly": true,
            "description": "Whether the user has read this message"
          },
          "message_id": {
            "type": "string",
            "readOnly": true,
            "description": "The Message-ID header value (unique identifier for this email)"
          },
          "thread_id": {
            "type": "string",
            "readOnly": true,
            "description": "Thread identifier (root message ID) for grouping conversations"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmailAttachmentMeta"
            },
            "readOnly": true
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "attachments",
          "cc",
          "created_dt",
          "direction",
          "from_display_name",
          "from_email",
          "id",
          "is_read",
          "message_id",
          "thread_id",
          "to_email",
          "url",
          "uuid"
        ]
      },
      "RaviPhoneMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "from_number": {
            "type": "string",
            "readOnly": true,
            "maxLength": 16,
            "minLength": 2
          },
          "to_number": {
            "type": "string",
            "readOnly": true,
            "maxLength": 16,
            "minLength": 2
          },
          "body": {
            "type": "string",
            "readOnly": true
          },
          "message_sid": {
            "type": "string",
            "readOnly": true,
            "description": "Upstream unique identifier for this message."
          },
          "phone": {
            "type": "string",
            "format": "uri"
          },
          "direction": {
            "enum": [
              "incoming",
              "outgoing"
            ],
            "type": "string",
            "x-spec-enum-id": "0f9b1c9d69d835bd",
            "readOnly": true,
            "description": "Whether this message was received (incoming) or sent (outgoing)\n\n* `incoming` - Incoming\n* `outgoing` - Outgoing"
          },
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "body",
          "created_dt",
          "direction",
          "from_number",
          "id",
          "message_sid",
          "phone",
          "to_number",
          "url"
        ]
      },
      "RaviPhoneMessageRequest": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "format": "uri"
          },
          "is_read": {
            "type": "boolean",
            "description": "Whether the user has read this message"
          }
        },
        "required": [
          "phone"
        ]
      },
      "SmsSendRequest": {
        "type": "object",
        "properties": {
          "to_number": {
            "type": "string",
            "minLength": 2,
            "description": "Destination phone number in E.164 format",
            "maxLength": 16
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "description": "SMS message body",
            "maxLength": 1600
          }
        },
        "required": [
          "body",
          "to_number"
        ]
      },
      "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"
          }
        }
      },
      "RaviPhone": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "phone_number": {
            "type": "string",
            "readOnly": true,
            "maxLength": 16,
            "minLength": 2
          },
          "created_dt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "required": [
          "created_dt",
          "id",
          "phone_number",
          "url"
        ]
      },
      "PatchedSecretEntryRequest": {
        "type": "object",
        "description": "Serializer for key-value secret entries.\n\n- identity is optional; the ViewSet defaults it in perform_create().\n- key is stripped, uppercased, and validated against ``^[A-Z][A-Z0-9_]*$``.",
        "properties": {
          "identity": {
            "type": "integer"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "description": "Plaintext key name, e.g. OPENAI_API_KEY",
            "maxLength": 255
          },
          "value": {
            "type": "string",
            "description": "Secret value"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          }
        }
      },
      "SecretEntry": {
        "type": "object",
        "description": "Serializer for key-value secret entries.\n\n- identity is optional; the ViewSet defaults it in perform_create().\n- key is stripped, uppercased, and validated against ``^[A-Z][A-Z0-9_]*$``.",
        "properties": {
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "identity": {
            "type": "integer"
          },
          "key": {
            "type": "string",
            "description": "Plaintext key name, e.g. OPENAI_API_KEY",
            "maxLength": 255
          },
          "value": {
            "type": "string",
            "description": "Secret value"
          },
          "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",
          "key",
          "updated_dt",
          "uuid"
        ]
      },
      "SecretEntryRequest": {
        "type": "object",
        "description": "Serializer for key-value secret entries.\n\n- identity is optional; the ViewSet defaults it in perform_create().\n- key is stripped, uppercased, and validated against ``^[A-Z][A-Z0-9_]*$``.",
        "properties": {
          "identity": {
            "type": "integer"
          },
          "key": {
            "type": "string",
            "minLength": 1,
            "description": "Plaintext key name, e.g. OPENAI_API_KEY",
            "maxLength": 255
          },
          "value": {
            "type": "string",
            "description": "Secret value"
          },
          "notes": {
            "type": "string",
            "description": "Notes"
          }
        },
        "required": [
          "key"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Ravi API key",
        "description": "Paste a Ravi API key such as ravi_id_... or ravi_mgmt_.... JWT bearer tokens also work on JWT-backed routes."
      }
    }
  }
}
