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

# Update customer

> Updates native Customer Data Platform fields for the specified customer.

Set `relationship_level` to `vip` to assign the relationship level, or set it to `null` to remove the relationship level.

To remove the relationship level, send:

```json
{
  "customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786",
  "relationship_level": null
}
```

**Required scopes:** `customers:rw`


## OpenAPI

````yaml /api/customer-data-platform/openapi.json post /v1/update_customer
openapi: 3.0.0
info:
  title: Customer Data Platform API
  description: A service for collecting, storing, and managing end-user data.
  version: 0.0.1
servers:
  - url: https://api.text.com/cdp
    description: Main production server URL
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken:
      - customers:ro
paths:
  /v1/update_customer:
    post:
      tags:
        - Customers
      summary: Update customer
      description: >-
        Updates native Customer Data Platform fields for the specified customer.


        Set `relationship_level` to `vip` to assign the relationship level, or
        set it to `null` to remove the relationship level.


        To remove the relationship level, send:


        ```json

        {
          "customer_id": "cf89fa3a-5ee9-4bdb-84ec-38824b2e2786",
          "relationship_level": null
        }

        ```
      operationId: updateCustomer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerRequest'
            example:
              customer_id: cf89fa3a-5ee9-4bdb-84ec-38824b2e2786
              relationship_level: vip
      responses:
        '200':
          description: Customer has been updated successfully.
        '401':
          description: Invalid access token
        '403':
          description: Insufficient scopes
        '404':
          description: Customer not found
        '422':
          description: >-
            Invalid request body, missing `customer_id` or `relationship_level`,
            or unsupported relationship level.
        '500':
          description: Internal error
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - customers:rw
components:
  schemas:
    UpdateCustomerRequest:
      type: object
      required:
        - customer_id
        - relationship_level
      additionalProperties: false
      properties:
        customer_id:
          type: string
          format: uuid
          description: The customer ID.
        relationship_level:
          type: string
          enum:
            - vip
          nullable: true
          description: >-
            The relationship level to assign. Use `null` to remove the
            relationship level.
  securitySchemes:
    PersonalAccessToken:
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
      type: http
      scheme: basic
    OAuth2BearerToken:
      description: >-
        This API uses OAuth2 with the implicit grant flow. <a
        href="/authentication/oauth-authorization#implicit-grant">Learn about
        the implicit grant flow.</a>
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes: {}
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes: {}

````