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

# Update contact

> Update a contact's address and/or primary flag. Provide at least one field. Changing the address resets the contact's verification.

Update a contact's address and/or its primary flag. Changing the address resets the contact's verification.


## OpenAPI

````yaml PATCH /recipients/{recipient_id}/contacts/{contact_id}
openapi: 3.0.3
info:
  title: Bodhveda Notifications API
  version: '1.0'
  description: API for sending notifications to recipients or broadcasting to all.
servers: []
security: []
paths:
  /recipients/{recipient_id}/contacts/{contact_id}:
    patch:
      tags:
        - Contacts
      summary: Update a recipient's contact
      description: >-
        Update a contact's address and/or primary flag. Provide at least one
        field. Changing the address resets the contact's verification.
      operationId: updateRecipientContact
      parameters:
        - name: recipient_id
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the recipient.
        - name: contact_id
          in: path
          required: true
          schema:
            type: integer
          description: The unique identifier of the contact.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRecipientContactPayload'
      responses:
        '200':
          description: Contact updated
          content:
            application/json:
              examples:
                Contact updated:
                  summary: Contact Updated Response
                  value:
                    message: Contact updated
                    data:
                      id: 1
                      medium: email
                      address: alice.new@example.com
                      is_primary: true
                      verified_at: null
                      created_at: '2025-11-07T05:31:56Z'
                      updated_at: '2025-11-07T06:00:00Z'
      security:
        - BearerAuthWithAPIKeyWithEitherScope: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X PATCH
            https://api.bodhveda.com/recipients/recipient_123/contacts/1 \
              -H "Authorization: Bearer bv_xxxxxxxxx" \
              -H "Content-Type: application/json" \
              -d '{
                "address": "alice.new@example.com"
              }' 
        - lang: javascript
          label: JavaScript
          source: >-
            import { Bodhveda } from "@bodhveda/js";


            const bodhveda = new Bodhveda("bv_xxxxxxxxx");


            const contact = await
            bodhveda.recipients.contacts.update("recipient_123", 1, {
                address: "alice.new@example.com",
            });
        - lang: go
          label: Go
          source: >-
            import (
                "context"

                bodhveda "github.com/MudgalLabs/bodhveda/sdk/go"
            )


            ctx := context.Background()

            client := bodhveda.NewClient("bv_xxxxxxxxx", nil)


            address := "alice.new@example.com"

            contact, _ := client.Recipients.Contacts.Update(ctx,
            "recipient_123", 1, &bodhveda.UpdateRecipientContactRequest{
                Address: &address,
            })
components:
  schemas:
    UpdateRecipientContactPayload:
      type: object
      description: Provide at least one field. Changing the address resets `verified_at`.
      properties:
        address:
          type: string
          description: New contact address.
        is_primary:
          type: boolean
          description: Set or unset this contact as the primary for its medium.
  securitySchemes:
    BearerAuthWithAPIKeyWithEitherScope:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: >-
        Bearer authentication header of the form `Bearer bv_xxxxxxxxx`, where
        `bv_xxxxxxxxx` is your **API Key** with `Full access` or `Recipient
        acess` scope.

````

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