> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hybridbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Master Password

> Create a master password under the path account.

<script src="/locale-bridge.js" />


## OpenAPI

````yaml /openapi.en.json POST /v1/public/accounts/{account_id}/credentials
openapi: 3.1.0
info:
  title: Code API (Public)
  version: 1.0.0
servers:
  - url: https://api.hybridbox.io
security: []
paths:
  /v1/public/accounts/{account_id}/credentials:
    post:
      tags:
        - public-accounts
        - public-credentials
      summary: Create Master Password
      description: Create a master password under the path account.
      operationId: >-
        create_public_credential_v1_public_accounts__account_id__credentials_post
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountCredentialCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialCreateResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - PublicBearerAuth: []
components:
  schemas:
    AccountCredentialCreateRequest:
      additionalProperties: false
      description: Request to create a master password under an account path scope.
      properties:
        domain:
          anyOf:
            - type: string
            - type: 'null'
          description: Domain UUID or domain name scope for the master password
          title: Domain
        generate:
          default: false
          description: Generate a master password secret instead of supplying one
          title: Generate
          type: boolean
        name:
          description: Master password display name
          maxLength: 100
          minLength: 1
          title: Name
          type: string
        value:
          anyOf:
            - maxLength: 256
              minLength: 4
              type: string
            - type: 'null'
          description: Master password secret value when not generated
          title: Value
        workspace_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Workspace UUID scope for the master password
          title: Workspace Id
      required:
        - name
      title: AccountCredentialCreateRequest
      type: object
    CredentialCreateResponse:
      properties:
        created_at:
          description: Master password creation timestamp
          title: Created At
          type: string
        generated_secret:
          anyOf:
            - type: string
            - type: 'null'
          description: One-time generated master password secret, when requested
          title: Generated Secret
        id:
          description: Master password UUID
          format: uuid
          title: Id
          type: string
        name:
          description: Master password display name
          title: Name
          type: string
        scope_id:
          description: Resource UUID for the master password scope
          format: uuid
          title: Scope Id
          type: string
        scope_type:
          description: Resource scope type where the master password applies
          enum:
            - account
            - workspace
            - domain
          title: Scope Type
          type: string
        updated_at:
          description: Master password last update timestamp
          title: Updated At
          type: string
      required:
        - id
        - name
        - scope_type
        - scope_id
        - created_at
        - updated_at
      title: CredentialCreateResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    PublicBearerAuth:
      bearerFormat: JWT or Hybridbox Service account token
      description: >-
        Public API bearer credential sent as `Authorization: Bearer <token>`.
        Use either an OAuth access token or a Hybridbox Service account token.
      scheme: bearer
      type: http

````