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

# Update contact



## OpenAPI

````yaml /openapi/contact.json put /contacts/{contact_id}
openapi: 3.0.3
info:
  title: Beem Contacts API
  version: 1.4.0
  description: >-
    The Beem Contacts API allows developers to manage address books and contacts
    for messaging workflows.
  contact:
    name: Beem
    url: https://beem.africa
    email: support@beem.africa
servers:
  - url: https://api-contact.beem.africa/public/v1
    description: Production server
  - url: https://dev-contact.beem.africa/public/v1
    description: Staging server
security: []
tags: []
paths:
  /contacts/{contact_id}:
    put:
      summary: Update contact
      operationId: updateContact
      parameters:
        - name: contact_id
          in: path
          schema:
            description: Unique contact ID.
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  description: Contact first name.
                  nullable: true
                  type: string
                last_name:
                  description: Contact last name.
                  nullable: true
                  type: string
                title:
                  description: Salutation or title (e.g. Mr, Ms).
                  nullable: true
                  type: string
                gender:
                  description: Contact gender.
                  nullable: true
                  type: string
                mob_no2:
                  description: Secondary mobile number.
                  nullable: true
                email:
                  description: Contact email address.
                  nullable: true
                  type: string
                  format: email
                  pattern: \s*[,]\s*
                address_country:
                  description: Country of residence.
                  nullable: true
                  type: string
                address_city:
                  description: City of residence.
                  nullable: true
                  type: string
                address_area:
                  description: Area or district.
                  nullable: true
                  type: string
                dob:
                  description: Date of birth.
                  nullable: true
                  type: string
                mob_no:
                  description: Updated primary mobile number.
                  anyOf:
                    - type: string
                    - type: number
                      format: float
                addressbook_id:
                  description: Address book IDs to associate with this contact.
                  type: array
                  items:
                    type: string
              additionalProperties: false
            examples:
              updateContact:
                summary: Update contact
                value:
                  first_name: Jane
                  last_name: Doe
                  mob_no: '255700000003'
                  email: jane.doe@example.com
      responses:
        '200':
          description: Contact updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        description: Unique ID of the affected contact.
                        example: '1234567890'
                        type: string
                      message:
                        description: Human-readable status message.
                        example: Contact created successfully
                        type: string
                      status:
                        description: Operation status code or message.
                        example: 'true'
                        anyOf:
                          - type: string
                          - type: number
                            format: float
                    additionalProperties: false
                    required:
                      - message
                      - status
                additionalProperties: false
                required:
                  - data
              examples:
                contactUpdated:
                  summary: Contact updated
                  value:
                    data:
                      id: 6093ee8b46e0380018962d2a
                      message: Contact Updated Successfully
                      status: 'true'
        '400':
          description: Bad request — invalid mobile number format.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    description: HTTP status code.
                    example: 400
                    type: integer
                  message:
                    description: Error message.
                    example: Invalid Mobile Number
                    type: string
                additionalProperties: false
                required:
                  - status
                  - message
              examples:
                invalidMobileNumber:
                  summary: Invalid mobile number
                  value:
                    status: 400
                    message: Invalid Mobile Number
        '401':
          description: Unauthorized — invalid or missing API credentials.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: API error code.
                    example: 120
                  message:
                    type: string
                    description: Error message.
                    example: Invalid Authorization Parameters
                required:
                  - code
                  - message
                additionalProperties: false
              examples:
                invalidAuthorization:
                  summary: Invalid authorization
                  value:
                    code: 120
                    message: Invalid Authorization Parameters
        '404':
          description: Not found — the contact does not exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      message:
                        description: Human-readable status message.
                        example: Addressbook Not Found
                        type: string
                      status:
                        description: Operation status.
                        example: 'false'
                        type: string
                    additionalProperties: false
                    required:
                      - message
                      - status
                additionalProperties: false
                required:
                  - data
              examples:
                contactNotFound:
                  summary: Contact not found
                  value:
                    data:
                      message: Contact Not Found
                      status: 'false'
        default:
          description: Unexpected error.
      security:
        - basicAuth: []
        - accessToken: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: 'Beem API credentials: API key as username, API secret as password.'
    accessToken:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Access token only. Send as Authorization: <token> — do not use a Bearer
        prefix.

````