> ## 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 a master password under the path account.

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


## OpenAPI

````yaml /openapi.ar.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: إنشاء كلمة مرور رئيسية
      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: خطأ في التحقق
      security:
        - PublicBearerAuth: []
components:
  schemas:
    AccountCredentialCreateRequest:
      additionalProperties: false
      description: طلب لإنشاء كلمة مرور رئيسية ضمن نطاق مسار الحساب.
      properties:
        domain:
          anyOf:
            - type: string
            - type: 'null'
          description: نطاق كلمة المرور الرئيسية حسب UUID النطاق أو اسم النطاق
          title: النطاق
        generate:
          default: false
          description: إنشاء سر كلمة مرور رئيسية بدلًا من توفيره
          title: إنشاء
          type: boolean
        name:
          description: اسم عرض كلمة المرور الرئيسية
          maxLength: 100
          minLength: 1
          title: الاسم
          type: string
        value:
          anyOf:
            - maxLength: 256
              minLength: 4
              type: string
            - type: 'null'
          description: قيمة سر كلمة المرور الرئيسية عند عدم توليدها
          title: القيمة
        workspace_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: نطاق UUID لمساحة العمل لكلمة المرور الرئيسية
          title: معرف مساحة العمل
      required:
        - name
      title: AccountCredentialCreateRequest
      type: object
    CredentialCreateResponse:
      properties:
        created_at:
          description: طابع وقت إنشاء كلمة المرور الرئيسية
          title: تاريخ الإنشاء
          type: string
        generated_secret:
          anyOf:
            - type: string
            - type: 'null'
          description: سر كلمة مرور رئيسية مولد لمرة واحدة عند الطلب
          title: السر المنشأ
        id:
          description: UUID كلمة المرور الرئيسية
          format: uuid
          title: المعرّف
          type: string
        name:
          description: اسم عرض كلمة المرور الرئيسية
          title: الاسم
          type: string
        scope_id:
          description: UUID المورد لنطاق كلمة المرور الرئيسية
          format: uuid
          title: معرف النطاق
          type: string
        scope_type:
          description: نوع نطاق المورد الذي تنطبق عليه كلمة المرور الرئيسية
          enum:
            - account
            - workspace
            - domain
          title: نوع النطاق
          type: string
        updated_at:
          description: طابع وقت آخر تحديث لكلمة المرور الرئيسية
          title: تاريخ التحديث
          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: التفاصيل
          type: array
      title: HTTPخطأ تحقق
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: الموقع
          type: array
        msg:
          title: الرسالة
          type: string
        type:
          title: نوع الخطأ
          type: string
      required:
        - loc
        - msg
        - type
      title: خطأ تحقق
      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

````