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

# Update number (privacy + settings)

> PARTIAL update of a number: only what you send changes. There is **no** `POST /v1/numbers/{id}/settings` — this PATCH is the settings endpoint, and Evolution's `syncFullHistory` has no equivalent here (use `settings.historyImportEnabled`).

`piiMode` controls conversation retention and requires `piiRetentionDays` (1–3650) when set to `STORE_X_DAYS`.

The `settings` block has two groups. `historyImportEnabled`, `webhookHistoricalMessages` and `ignoreNewsletters` apply to every provider — the last one drops WhatsApp Channel (`@newsletter`) posts on arrival, before the conversation, the stored message and the webhook. The other six are the Evolution GO `advancedSettings` and only apply to unofficial (QR-paired) numbers — on a Meta number they are accepted and stored but never applied, which the response reports as `settings.appliesTo.advanced: "none"`. Sending `null` on a GO field **resets it to the provider default**; it does not mean `false`.

The GO fields are also pushed to the number's connected instances; the outcome comes back in `settingsSync`. That push is best-effort: a disconnected instance does not fail the PATCH, and the persisted value is reapplied on its next provisioning.

A body with no recognised field is a `400 EMPTY_PATCH`, not a silent no-op.



## OpenAPI

````yaml openapi.json PATCH /v1/numbers/{id}
openapi: 3.1.0
info:
  title: Pilot Status API
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    Public REST API for Pilot Status. Authenticate with the `x-api-key: ps_...`
    header (or `x-api-key-id`). Base URL: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/numbers/{id}:
    patch:
      tags:
        - Numbers
      summary: Update number (privacy + settings)
      description: >-
        PARTIAL update of a number: only what you send changes. There is **no**
        `POST /v1/numbers/{id}/settings` — this PATCH is the settings endpoint,
        and Evolution's `syncFullHistory` has no equivalent here (use
        `settings.historyImportEnabled`).


        `piiMode` controls conversation retention and requires
        `piiRetentionDays` (1–3650) when set to `STORE_X_DAYS`.


        The `settings` block has two groups. `historyImportEnabled`,
        `webhookHistoricalMessages` and `ignoreNewsletters` apply to every
        provider — the last one drops WhatsApp Channel (`@newsletter`) posts on
        arrival, before the conversation, the stored message and the webhook.
        The other six are the Evolution GO `advancedSettings` and only apply to
        unofficial (QR-paired) numbers — on a Meta number they are accepted and
        stored but never applied, which the response reports as
        `settings.appliesTo.advanced: "none"`. Sending `null` on a GO field
        **resets it to the provider default**; it does not mean `false`.


        The GO fields are also pushed to the number's connected instances; the
        outcome comes back in `settingsSync`. That push is best-effort: a
        disconnected instance does not fail the PATCH, and the persisted value
        is reapplied on its next provisioning.


        A body with no recognised field is a `400 EMPTY_PATCH`, not a silent
        no-op.
      operationId: patch_numbers_id
      parameters:
        - name: id
          in: path
          required: true
          description: WhatsApp number id.
          schema:
            type: string
          example: num_01HZX...
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                piiMode:
                  type: string
                  enum:
                    - STORE_INDEFINITE
                    - STORE_X_DAYS
                    - RELAY_ONLY
                  description: >-
                    Conversation retention policy. Optional — omit it to change
                    only `settings`.
                  example: STORE_X_DAYS
                piiRetentionDays:
                  type:
                    - integer
                    - 'null'
                  minimum: 1
                  maximum: 3650
                  description: >-
                    Required (1–3650) when `piiMode` is `STORE_X_DAYS`; forced
                    to null otherwise.
                  example: 30
                settings:
                  type: object
                  description: 'Per-number settings. Partial: only the keys you send change.'
                  properties:
                    historyImportEnabled:
                      type: boolean
                      description: >-
                        Import the history the provider dumps on connect.
                        Default **false**: the number starts existing at the
                        moment it connected. Ask for it HERE, on creation — the
                        provider hands the history over in a single burst right
                        after the connection and it cannot be requested again,
                        so a PATCH after creating races that burst. Numbers
                        created before 2026-08-26 keep whatever they had.
                      example: false
                    webhookHistoricalMessages:
                      type: boolean
                      description: >-
                        Deliver those historical messages to your webhooks.
                        Default `false`: every reconnect replays the history and
                        your integration cannot tell it apart from new traffic
                        (on the FREE plan it would also consume inbound quota).
                        To READ history use `GET /v1/messages/history`.
                      example: false
                    ignoreNewsletters:
                      type: boolean
                      description: >-
                        Drop WhatsApp Channel (`@newsletter`) posts on arrival:
                        no conversation, no stored message, no webhook. Default
                        `false`, so a number that receives channels today keeps
                        receiving them. This is NOT an Evolution GO field: the
                        provider has no `@newsletter` gate to push it to (unlike
                        `ignoreGroups`, which it applies itself), so a channel
                        post always reaches the platform and can only be refused
                        here. An official Meta number never receives channels at
                        all.
                      example: false
                    alwaysOnline:
                      type:
                        - boolean
                        - 'null'
                      description: >-
                        Keep the WhatsApp presence permanently online.
                        Unofficial (Evolution GO) numbers only. `null` resets to
                        the provider default.
                      example: false
                    rejectCall:
                      type:
                        - boolean
                        - 'null'
                      description: >-
                        Auto-reject incoming calls. Unofficial numbers only.
                        `null` resets to the provider default.
                      example: true
                    msgRejectCall:
                      type:
                        - string
                        - 'null'
                      maxLength: 1000
                      description: >-
                        Text replied when a call is rejected (empty string = no
                        reply). Unofficial numbers only. `null` resets to the
                        provider default.
                      example: I don't take calls here
                    readMessages:
                      type:
                        - boolean
                        - 'null'
                      description: >-
                        Mark every received message as read. Unofficial numbers
                        only. `null` resets to the provider default.
                      example: false
                    ignoreGroups:
                      type:
                        - boolean
                        - 'null'
                      description: >-
                        Drop group messages inside the provider. Note the field
                        name: this is the Evolution GO dialect (`ignoreGroups`),
                        NOT the v2 `groupsIgnore`. Setting it explicitly beats
                        the value derived from your group webhook subscriptions.
                        Unofficial numbers only.
                      example: false
                    ignoreStatus:
                      type:
                        - boolean
                        - 'null'
                      description: >-
                        Drop status/stories updates. Unofficial numbers only.
                        `null` resets to the provider default.
                      example: false
      responses:
        '200':
          description: Updated number
          content:
            application/json:
              example:
                id: num_01HZX...
                number: '+5511999999999'
                name: Atendimento
                provider: WEB
                state: OPEN
                isFullyConnected: true
                piiMode: STORE_X_DAYS
                piiRetentionDays: 30
                settings:
                  historyImportEnabled: false
                  webhookHistoricalMessages: false
                  ignoreNewsletters: false
                  alwaysOnline: null
                  rejectCall: true
                  msgRejectCall: I don't take calls here
                  readMessages: null
                  ignoreGroups: null
                  ignoreStatus: null
                  appliesTo:
                    history: all
                    advanced: evolution-go
                settingsSync:
                  applied: 1
                  failed: 0
                  skipped: 0
                health:
                  qualityRating: null
                  messagingLimitTier: null
                  metaStatus: null
                  code: null
                  reason: null
                  sendable: true
                meta: null
        '400':
          description: Invalid settings, or nothing to update
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                invalidSettings:
                  summary: INVALID_SETTINGS
                  value:
                    error: settings.rejectCall must be a boolean or null
                    code: INVALID_SETTINGS
                emptyPatch:
                  summary: EMPTY_PATCH
                  value:
                    error: Nothing to update — send `piiMode` and/or `settings`
                    code: EMPTY_PATCH
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '404':
          description: Number not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Number not found
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your ps_ API key
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: API key id (alternative to x-api-key)

````