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

# Update Sender

> Change the address or the display name of a sender

Guide: [Senders and domains](https://docs.minimo.it/embedded/senders-and-sending.md). Errors: [Errors and limits](https://docs.minimo.it/embedded/errors.md).


## OpenAPI

````yaml patch /public/v1/domains/{id}/senders/{senderId}
openapi: 3.1.0
info:
  title: API Documentation
  description: Documentation for transactional and subscribe APIs
  version: 1.0.0
servers:
  - url: https://app.minimo.it
security:
  - bearerAuth: []
paths:
  /public/v1/domains/{id}/senders/{senderId}:
    servers:
      - url: https://api.minimo.it
    patch:
      summary: Update sender
      description: >-
        Changes the address or the display name. The address stays on the same
        domain: to move a sender, delete it and add it again.
      operationId: updateSender
      parameters:
        - name: id
          in: path
          required: true
          description: The domain `id` from List Domains or Add Domain.
          schema:
            type: integer
            example: 812
        - name: senderId
          in: path
          required: true
          description: The sender `id` from List Senders.
          schema:
            type: integer
            example: 34
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: New address on the same domain.
                  example: reservations@pizzeria-mario.example
                displayName:
                  type: string
                  description: New display name. An empty string clears it.
                  example: Pizzeria Da Mario
            example:
              displayName: Pizzeria Da Mario Bookings
      responses:
        '200':
          description: The sender
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Sender'
              example:
                data:
                  id: 34
                  email: bookings@pizzeria-mario.example
                  displayName: Pizzeria Da Mario Bookings
                  domainId: 812
                  domain: pizzeria-mario.example
                  verified: true
        '400':
          description: Send at least one of `email` or `displayName`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: >-
            `INVALID_TOKEN`: missing or wrong key, or a key without the
            **Domains** permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: No such domain or sender in your workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: '`SENDER_NOT_ON_DOMAIN`: the new address is not on this domain.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearerAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: |-
            curl --request PATCH \
              --url 'https://api.minimo.it/public/v1/domains/812/senders/34' \
              --header 'Authorization: Bearer YOUR_MINIMO_KEY' \
              --header 'Content-Type: application/json' \
              --data '{"displayName": "Pizzeria Da Mario Bookings"}'
        - lang: JavaScript
          source: >-
            const res = await
            fetch('https://api.minimo.it/public/v1/domains/812/senders/34', {
              method: 'PATCH',
              headers: {
                Authorization: 'Bearer YOUR_MINIMO_KEY',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({"displayName": "Pizzeria Da Mario Bookings"}),
            });

            const { data } = await res.json();

            console.log(data);
        - lang: Python
          source: |-
            import requests

            res = requests.patch(
                'https://api.minimo.it/public/v1/domains/812/senders/34',
                headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
                json={"displayName": "Pizzeria Da Mario Bookings"},
            )
            print(res.status_code, res.text)
components:
  schemas:
    Sender:
      type: object
      properties:
        id:
          type: integer
          description: Use it as `senderId` on the send endpoints.
          example: 34
        email:
          type: string
          example: bookings@pizzeria-mario.example
        displayName:
          type: string
          nullable: true
          example: Pizzeria Da Mario
        domainId:
          type: integer
          example: 812
        domain:
          type: string
          example: pizzeria-mario.example
        verified:
          type: boolean
          description: '`true` when the sender''s domain is verified.'
      required:
        - id
        - email
        - domainId
        - domain
        - verified
    ApiError:
      type: object
      properties:
        status:
          type: string
          example: FAIL
        message:
          type: string
          description: The error code to test in your code.
          example: INVALID_PARAMETERS
        userMessage:
          type: string
          description: >-
            When present, a sentence that says what to fix. You can show or log
            it.
          example: Set the origins allowed to embed the widgets first.
      description: >-
        Every error has this shape. See [Errors and limits](/embedded/errors)
        for every code.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: mn-API_CLIENT_ID-API_KEY

````

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