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

# Update sender



## OpenAPI

````yaml /openapi.json patch /v1/senders/{senderId}
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url, reaction,
    template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/senders/{senderId}:
    patch:
      summary: Update sender
      operationId: updateSender
      parameters:
        - $ref: '#/components/parameters/SenderIdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SenderUpdateRequest'
      responses:
        '200':
          description: Sender updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sender'
        '400':
          description: Invalid update.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Sender not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    SenderIdParam:
      name: senderId
      in: path
      required: true
      schema:
        type: string
  schemas:
    SenderUpdateRequest:
      type: object
      properties:
        name:
          type: string
        setAsDefault:
          type: boolean
        webhookUrl:
          type: string
          format: uri
          nullable: true
          description: HTTPS URL for webhook events. Set to null to remove webhook.
        webhookEvents:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEvent'
          description: Events to subscribe to.
        webhookActive:
          type: boolean
          description: Whether the webhook is active.
        emailReceivingEnabled:
          type: boolean
          description: Enable or disable inbound email receiving for this sender.
    Sender:
      type: object
      required:
        - id
        - name
        - phoneNumber
      properties:
        id:
          type: string
          example: sender_12345
        name:
          type: string
          example: Primary sender
        phoneNumber:
          type: string
          description: Phone number in E.164 format.
          example: '+13125551212'
        isDefault:
          type: boolean
          description: Whether this sender is the project's default.
          default: false
        webhook:
          $ref: '#/components/schemas/SenderWebhook'
        whatsapp:
          type: object
          description: >-
            WhatsApp Business Account information. Only present if a WABA is
            connected.
          properties:
            phoneNumberId:
              type: string
              description: WhatsApp phone number ID from Meta.
            displayPhoneNumber:
              type: string
              description: Display phone number.
              example: '+14155551234'
            paymentStatus:
              type: object
              description: Payment configuration status from Meta.
              properties:
                setupStatus:
                  type: string
                  description: Payment setup status (COMPLETE, NOT_STARTED, etc.).
                  example: COMPLETE
                methodStatus:
                  type: string
                  description: Payment method status (VALID, NONE, etc.).
                  example: VALID
                canSendTemplates:
                  type: boolean
                  description: >-
                    Whether template messages can be sent. Requires
                    setupStatus=COMPLETE and methodStatus=VALID.
        emailReceivingEnabled:
          type: boolean
          description: Whether inbound email receiving is enabled for this sender.
          default: false
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    WebhookEvent:
      type: string
      description: >-
        Type of event that triggers the webhook.


        **Message lifecycle events:**

        - `message.queued`: Message created and queued for sending.
        `data.status` = `queued`

        - `message.sent`: Message accepted by the provider. `data.status` =
        `sent`

        - `message.delivered`: Message delivered to recipient. `data.status` =
        `delivered`

        - `message.read`: Message was read by the recipient (WhatsApp only).
        `data.status` = `read`

        - `message.failed`: Message failed to send. `data.status` = `failed`


        **Inbound events:**

        - `message.inbound`: New message received from a contact. Reactions are
        delivered as `message.inbound` with `messageType='reaction'`

        - `message.unsupported`: Received a message type that is not supported


        **Broadcast events:**

        - `broadcast.status_changed`: Broadcast status changed (pending_review,
        approved, rejected, sending, completed, cancelled)


        **Other events:**

        - `conversation.new`: New conversation started with a contact

        - `template.status_changed`: WhatsApp template approval status changed


        **Partner events:**

        - `invitation.status_changed`: A partner invitation status changed
        (pending, in_progress, completed, cancelled)
      enum:
        - message.queued
        - message.sent
        - message.delivered
        - message.read
        - message.failed
        - message.inbound
        - message.unsupported
        - broadcast.status_changed
        - conversation.new
        - template.status_changed
        - invitation.status_changed
    SenderWebhook:
      type: object
      description: Webhook configuration for the sender.
      required:
        - url
        - events
        - active
      properties:
        url:
          type: string
          format: uri
          description: HTTPS URL that will receive webhook events.
          example: https://api.example.com/webhooks/zavu
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEvent'
          description: List of events the webhook is subscribed to.
        secret:
          type: string
          description: >-
            Webhook secret for signature verification. Only returned on create
            or regenerate.
          example: whsec_abc123...
        active:
          type: boolean
          description: Whether the webhook is active.
          default: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````