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

# Set default customer email address

> Set a customer email as default. The default will be set only for the email type of the given email.

<sup>Required permissions: `customer:write`</sup>



## OpenAPI

````yaml post /customer-email-addresses/{id}/default
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /customer-email-addresses/{id}/default:
    parameters: []
    post:
      tags:
        - CustomerEmail
      summary: Set default customer email address
      description: >-
        Set a customer email as default. The default will be set only for the
        email type of the given email.


        <sup>Required permissions: `customer:write`</sup>
      operationId: setDefaultCustomerEmailAddress
      parameters:
        - name: id
          in: path
          description: CustomerEmail identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      responses:
        '201':
          description: CustomerEmail resource created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEmail-CustomerEmailDetail'
            text/html:
              schema:
                $ref: '#/components/schemas/CustomerEmail-CustomerEmailDetail'
          links: {}
        '400':
          description: Invalid input
        '422':
          description: Unprocessable entity
      deprecated: false
      security:
        - JWT:
            - customer:write
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST \
             /customer-email-addresses/{id}/default \
             --header "Authorization: Bearer <token>"
components:
  schemas:
    CustomerEmail-CustomerEmailDetail:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 00000000-0000-0000-0000-000000000000
          type: string
        email:
          format: email
          maxLength: 255
          externalDocs:
            url: https://schema.org/email
          example: john.doe@example.com
          type: string
        receiverName:
          maxLength: 255
          example: John Doe
          type: string
        isInvoiceEmail:
          description: Use this email for invoices, credits and financial documents.
          example: true
          type: boolean
        isDunningEmail:
          description: Use this email for dunning reminders and payment reminders.
          example: false
          type: boolean
        default:
          example: 'true'
          type: boolean
      required:
        - email
        - receiverName
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````