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

# Subscriber Update

> Update an existing subscriber's name, gender, or labels via the ChatSyncs API. Use when a developer asks how to keep subscriber profile data in sync with their own CRM.

Updates a subscriber's `first_name`, `last_name`, `gender` and labels.

<Warning>
  **Fields you leave out are cleared, not kept.** `first_name`, `last_name` and `gender` are overwritten on every call:
  send only `first_name` and the last name and gender are blanked (verified against the live API). Even a call with no
  fields at all returns success and blanks all three. To change one field, read the subscriber with
  [Subscriber Get](/developer-api/subscriber/get-subscriber) first and send all three back.
</Warning>

<Note>
  `label_ids` behaves differently: it only **adds** labels and never removes any, and an empty value changes nothing.
  Use [Remove Labels](/developer-api/subscriber/remove-labels) to take one off. Give the ids as a comma-separated list,
  e.g. `12,15`.
</Note>

<Note>
  By REST convention this would ideally be a `PUT` request — but the ChatSyncs API only exposes
  it as `POST`. Use POST as shown below.
</Note>

<Tip>
  **Where to find a label's ID:** open **Subscriber Manager → Labels** — the ID
  is shown next to each label name, ready to copy. Or call
  [Label List](/developer-api/label/list-labels) to fetch all of them at once. See
  [Finding Your IDs & API Token](/developer-api/finding-ids#label-id-label_id) for a screenshot.
</Tip>


## OpenAPI

````yaml POST /whatsapp/subscriber/update
openapi: 3.1.0
info:
  title: ChatSyncs Developer API
  version: 1.0.0
  description: >-
    REST API for sending WhatsApp messages and managing subscribers through
    ChatSyncs.


    **Authentication.** Send your key as the `apiToken` parameter, or as
    `Authorization: Bearer <key>` — both work on every endpoint **except Custom
    Fields List**, which only accepts the `apiToken` parameter (a Bearer header
    alone is answered with *The api token field is required.*). A wrong key
    returns HTTP 401 `{"status":"0","message":"Unauthenticated."}`; no key at
    all redirects to the login page.


    **Methods.** Every endpoint accepts both GET and POST with the same
    parameters, except Upload Media, which is POST-only. Use POST for anything
    that changes data.


    **Errors.** Failures usually come back as HTTP 200 with `"status":"0"` and
    the reason in `message`, so always check `status`. `status` is the string
    `"1"` or `"0"` on most endpoints and a boolean on a few.


    **Lists.** Endpoints that return rows put them in `message` as a list; there
    is no `data` field (Custom Fields List is the exception and uses `data`).
servers:
  - url: https://platform.chatsyncs.com/api/v1
security: []
paths:
  /whatsapp/subscriber/update:
    post:
      tags:
        - Subscriber API
      summary: Subscriber Update
      description: >-
        **Fields you leave out are cleared, not kept.** `first_name`,
        `last_name` and `gender` are each overwritten on every call, so sending
        only `first_name` blanks the last name and the gender (verified live).
        To change one, read the subscriber with Subscriber Get first and send
        all three back. `label_ids` is different: it only **adds** labels and
        never removes any; use Remove Labels for that. A call with no fields at
        all still returns success while blanking the name.
      operationId: updateSubscriber
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                apiToken:
                  type: string
                  description: >-
                    Your ChatSyncs API key (not a WhatsApp/Meta access token).
                    [Where to find
                    it](/developer-api/finding-ids#api-token-apitoken).
                  example: API-KEY
                phone_number_id:
                  type: string
                  description: >-
                    The WhatsApp account's phone number ID. [Where to find
                    it](/developer-api/finding-ids#phone-number-id-phone_number_id).
                  example: PHONE-NUMBER-ID
                phone_number:
                  type: string
                  description: >-
                    The subscriber's phone number, with country code, digits
                    only.
                  example: PHONE-NUMBER
                first_name:
                  type: string
                  description: The subscriber's first name.
                  example: Rahul
                last_name:
                  type: string
                  description: The subscriber's last name.
                  example: Reddy
                gender:
                  type: string
                  description: The subscriber's gender.
                  example: male
                label_ids:
                  type: string
                  description: >-
                    Comma-separated label IDs, e.g. 1,4,5. [Where to find
                    it](/developer-api/finding-ids#label-id-label_id).
                  example: 1,4,5
              required:
                - apiToken
                - phone_number_id
                - phone_number
      responses:
        '200':
          description: >-
            Standard ChatSyncs response. `status` is `"1"` on success and `"0"`
            on failure.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '`"1"` = success, `"0"` = failure.'
                  message:
                    type: string
                    description: Human-readable result message.
              examples:
                success:
                  summary: Success
                  value:
                    status: '1'
                    message: Subscriber updated successfully
                error:
                  summary: A required field is missing
                  value:
                    status: '0'
                    message: >-
                      The phone number id field is required., The phone number
                      field is required.
                notFound:
                  summary: Unknown contact
                  value:
                    status: '0'
                    message: Subscriber not found
        '401':
          description: >-
            `apiToken` is wrong. (With no token at all the API redirects to the
            login page with HTTP 302 instead of returning JSON.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
              examples:
                unauthenticated:
                  summary: Wrong apiToken
                  value:
                    status: '0'
                    message: Unauthenticated.

````

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