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

# Update Email Account

> Requires the `email.write` token ability.

Every field is optional and only the ones sent are changed. A new
`password` must be strong (a zxcvbn score of at least 3). Mailboxes the
panel manages (`is_managed`) answer 409.



## OpenAPI

````yaml /api-reference/openapi.json patch /email-accounts/{email}
openapi: 3.1.2
info:
  title: Hosting Panel API
  version: 1.0.0
  description: >-
    The customer-facing hosting panel API. A request is scoped to the hosting
    account its bearer token belongs to; the token abilities decide which
    endpoints it may call.
servers:
  - url: https://hosting-panel.net/api/v1
security:
  - sanctum: []
tags:
  - name: Account
  - name: Domains
  - name: DNS
  - name: Email Accounts
  - name: Forwarders
  - name: Databases
  - name: FTP Accounts
  - name: Cron Jobs
  - name: URL Schedules
  - name: Node.js Applications
  - name: Valkey
  - name: Photon Optimizer
  - name: Statistics
  - name: PSI Metrics
  - name: PHP Versions
  - name: Reseller
paths:
  /email-accounts/{email}:
    patch:
      tags:
        - Email Accounts
      summary: Update Email Account
      description: |-
        Requires the `email.write` token ability.

        Every field is optional and only the ones sent are changed. A new
        `password` must be strong (a zxcvbn score of at least 3). Mailboxes the
        panel manages (`is_managed`) answer 409.
      operationId: emailAccount.update
      parameters:
        - name: email
          in: path
          required: true
          schema:
            type: integer
        - name: per_page
          in: query
          description: Results per page. Defaults to 50, capped at 200.
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                password:
                  type: string
                  maxLength: 255
                quota:
                  type: integer
                  minimum: 100
                  maximum: 100000
                spam_filter_enabled:
                  type: boolean
                spam_reject_score:
                  type: number
                  minimum: 7
                  maximum: 100
      responses:
        '200':
          description: '`EmailAccountResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EmailAccountResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '409':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                required:
                  - message
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    EmailAccountResource:
      type: object
      properties:
        id:
          type: integer
        address:
          type: string
        local_part:
          type: string
        domain:
          type: string
        is_managed:
          type: boolean
        managed_by:
          type:
            - string
            - 'null'
        quota_mb:
          type: integer
        used_bytes:
          type: integer
        spam:
          type: object
          properties:
            filter_enabled:
              type: boolean
            reject_score:
              type: number
          required:
            - filter_enabled
            - reject_score
        created_at:
          type:
            - string
            - 'null'
      required:
        - id
        - address
        - local_part
        - domain
        - is_managed
        - managed_by
        - quota_mb
        - used_bytes
        - spam
        - created_at
      title: EmailAccountResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    sanctum:
      type: http
      description: >-
        An API access token, sent as `Authorization: Bearer <token>`. Its
        abilities decide which endpoints it may call.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.