---
title: "Validation of the customer data"
method: POST
path: "/customers/actions/validate-customer-data"
tags: ["Customers actions"]
---

# Validation of the customer data

`POST /customers/actions/validate-customer-data`

Validate customer data following CareCloud validation standards. Supports validation of passwords and referral codes.

**Validation types**

- `password` - validates that the value meets the CareCloud password strength requirements. Call this before [POST /customers](https://carecloud.readme.io/reference/postcustomer) to verify the proposed password.
- `referral_code` - validates that the value is an existing, active referral code for a valid referral campaign. Call this before [POST /customers](https://carecloud.readme.io/reference/postcustomer) to confirm a referral code is valid before attempting registration. This endpoint does not create or generate referral codes; it only validates an existing one.

This endpoint does not require authentication.

## Request body

- object
  - `type` 'password' | 'referral_code', required — Type of the customer data to validate. Possible values: - `password` - validates the value against CareCloud password strength requirements. - `referral_code` - validates that the value is an existing, active referral code.
  - `value` string, required — Value of the customer data to validate. For `password`, provide the proposed password. For `referral_code`, provide the referral code string.

## Response `200`

OK

- object
  - `data` object
    - `is_valid` boolean — Result of the CareCloud validation. *Possible results are: false - The parameter does not have a valid value by CareCloud standard / true - The parameter has a valid value by CareCloud standard*

## Other responses

- `400` — Bad input parameter. The response body's `error.error_data.invalid_params[]` array lists the parameters that caused the failure, each carrying a `reason` code. See the `BadRequestErrorBody` schema for the generic reason taxonomy. Operations with domain-specific business rules document additional reasons at the operation level.
- `403` — The client does not exist or the client tried to access an unauthorized property or resource.
- `404` — The resource was not found.
- `405` — The resource does not support the specified HTTP method.
- `429` — Too many requests - more than the resource limit.
- `500` — Server is not working as expected.
- `503` — Temporary state when the service is temporarily unavailable, overloaded or there is a maintenance window.

---

[API](https://skmtc.net/crmcarecloud/apis/rest-api-reference.md) · [All operations](https://skmtc.net/crmcarecloud/apis/rest-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crmcarecloud/rest-api-reference/revisions/329c06dbf8d9/schema)
