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

# Update Subscriber

> Update subscriber profile and KYC information

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer olive_live_xxx` or `Bearer eyJ...` (JWT)
</ParamField>

### Path Parameters

<ParamField path="id" type="string" required>
  Subscriber UUID (e.g., `sub_abc123`)
</ParamField>

### Body Parameters

All fields are optional. Only include fields you want to update.

<ParamField body="email" type="string">
  Updated email address
</ParamField>

<ParamField body="address" type="string">
  Updated physical address
</ParamField>

<ParamField body="kyc_level" type="integer">
  New KYC level (1-3). Requires supporting documents.
</ParamField>

<ParamField body="id_number" type="string">
  National ID number
</ParamField>

<ParamField body="id_type" type="string">
  ID type: `NATIONAL_ID`, `PASSPORT`, `DRIVERS_LICENSE`
</ParamField>

<ParamField body="id_document_url" type="string">
  URL to ID document image
</ParamField>

<ParamField body="selfie_url" type="string">
  URL to selfie image
</ParamField>

<ParamField body="vult_wallet_id" type="string">
  Link VULT wallet ID
</ParamField>

<ParamField body="category" type="string">
  Account category: `standard`, `vip`, `corporate`
</ParamField>

<ParamField body="max_child_cards" type="integer">
  Maximum child cards allowed
</ParamField>

<ParamField body="relationship_manager_id" type="integer">
  Assigned relationship manager ID
</ParamField>

***

## Response

<ResponseField name="success" type="boolean">
  Whether update succeeded
</ResponseField>

<ResponseField name="message" type="string">
  Result message
</ResponseField>

<ResponseField name="subscriber" type="object">
  Updated subscriber object
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL - Update Email theme={null}
  curl -X PUT "https://demo.api.vultlocal.com/api/v1/subscribers/sub_abc123" \
    -H "Authorization: Bearer olive_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "newemail@example.com"
    }'
  ```

  ```bash cURL - Upgrade KYC theme={null}
  curl -X PUT "https://demo.api.vultlocal.com/api/v1/subscribers/sub_abc123" \
    -H "Authorization: Bearer olive_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "kyc_level": 2,
      "id_number": "SL12345678",
      "id_type": "NATIONAL_ID",
      "id_document_url": "https://storage.olive.example.com/docs/id_front.jpg"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "message": "Subscriber updated successfully",
    "subscriber": {
      "id": "sub_abc123",
      "phone_number": "+23279123456",
      "first_name": "John",
      "last_name": "Doe",
      "email": "newemail@example.com",
      "kyc_level": 2,
      "status": "ACTIVE",
      "updated_at": "2025-01-20T14:45:00Z"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "Subscriber not found",
    "code": "NOT_FOUND"
  }
  ```
</ResponseExample>

***

## KYC Upgrade Requirements

<CardGroup cols={3}>
  <Card title="Level 1 → 2" icon="file-text">
    * Valid ID document
    * ID number
  </Card>

  <Card title="Level 2 → 3" icon="home">
    * Proof of address
    * Selfie verification
  </Card>

  <Card title="Special Categories" icon="star">
    * VIP review
    * Corporate documents
  </Card>
</CardGroup>

***

## Errors

| Status | Code              | Description                   |
| ------ | ----------------- | ----------------------------- |
| 400    | `INVALID_REQUEST` | Invalid field values          |
| 401    | `UNAUTHORIZED`    | Invalid or missing API key    |
| 403    | `FORBIDDEN`       | Cannot update this subscriber |
| 404    | `NOT_FOUND`       | Subscriber not found          |
| 500    | `INTERNAL_ERROR`  | Server error                  |


## OpenAPI

````yaml olive-openapi.json PUT /subscribers/{id}
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /subscribers/{id}:
    put:
      tags:
        - Subscribers
      summary: Update subscriber details
      description: Update subscriber information including KYC level and VULT wallet ID
      parameters:
        - description: Subscriber ID
          name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.UpdateSubscriberRequest'
        description: Update details
        required: true
      responses:
        '200':
          description: Update successful
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    handler.UpdateSubscriberRequest:
      type: object
      properties:
        address:
          type: string
          example: 456 New St
        category:
          type: string
          example: vip
        district:
          type: string
          example: Western Rural
        email:
          type: string
          example: newemail@example.com
        id_back_url:
          type: string
          example: s3://bucket/kyc/subscriber-id/id-back/file.jpg
        id_front_url:
          type: string
          example: s3://bucket/kyc/subscriber-id/id-front/file.jpg
        kyc_level:
          type: integer
          example: 2
        max_child_cards:
          type: integer
          example: 100
        national_id:
          type: string
          example: ID123456789
        relationship_manager_id:
          type: integer
          example: 1
        vult_wallet_id:
          type: string
          example: VULT123456
  securitySchemes:
    ApiKeyAuth:
      description: >-
        API Key for third-party integrations (WhatsApp, Smart PAY, VULT).
        Format: 'Bearer olive_live_xxxxxxxxxxxxx'
      type: apiKey
      name: Authorization
      in: header
    BearerAuth:
      description: >-
        JWT token from admin login for administrative operations. Format:
        'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
      type: apiKey
      name: Authorization
      in: header

````