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

# Update Customer

> This endpoint updates an existing customer.

### Body

<ParamField body="sso_id" type="string">
  This is the sso\_id of the customer
</ParamField>

<ParamField body="customer" type="object">
  This is the customer object.
</ParamField>

### Response

<ResponseField name="success" type="number">
  Indicates whether the call was successful. 1 if successful, 0 if not.
</ResponseField>

<ResponseField name="user_group" type="object">
  The contents of the user group

  <Expandable title="Toggle object">
    <ResponseField name="team_id" type="number">
      Indicates whether a new user group was created.
    </ResponseField>

    <ResponseField name="token" type="string">
      This is the user group token (userGroupToken or USER\_GROUP\_TOKEN) that will be
      used to identify which user group is viewing the dashboard. You should save
      this on your end to use when rendering an embedded dashboard.
    </ResponseField>

    <ResponseField name="name" type="string">
      This is the name of the user group provided in the request body.
    </ResponseField>

    <ResponseField name="provided_id" type="string">
      This is the user\_group\_id provided in the request body.
    </ResponseField>

    <ResponseField name="properties" type="JSON | Null">
      This is the properties object if it was provided in the request body
    </ResponseField>

    <ResponseField name="api_environment_tag" type="JSON or null">
      This is the environment tag of the user group. Possible values are 'Customer'
      and 'Testing'
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/customers/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": "string",
      "email": "string",
      "firstName": "string",
      "lastName": "string",
      "phone": "string",
      "stripe_customer_id": "string",
      "timestamp": "string",
      "activationDate": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "id": "string",
      "email": "string",
      "firstName": "string",
      "lastName": "string",
      "phone": "string",
      "stripe_customer_id": "string",
      "timestamp": "string",
      "activationDate": "string"
  }
  ```
</ResponseExample>
