> For the complete documentation index, see [llms.txt](https://create.cloud4wi.ai/dev-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://create.cloud4wi.ai/dev-hub/labs/private-apis.md).

# Private APIs

### Create and Edit customers

## Create a new customer.

> Create a new customer\
> \<br>\<b>Role\</b>: Organization Manager\
> \<br>\<b>Scope\</b>: organization\_write, customer\_write \
> If deduplicate query params is used, the API search if the customer with the deduplicate parameters exists. If exists the abi perform an update. (During update the following values are ignored: source, username and password)<br>

```json
{"openapi":"3.0.0","info":{"title":"Cloud4Wi Private APIs","version":"0.0.1"},"servers":[{"url":"http://explore.cloud4wi.com/","description":"Production server (uses live data)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"newCustomer":{"type":"object","properties":{"organizationId":{"type":"string","description":"Organization id. (required)"},"locationId":{"type":"string","description":"locationId of new customer. If not present it's choose the default"},"hotspotId":{"type":"string","description":"hotspot id"},"source":{"type":"string","description":"required","enum":["controlpanel","splashportal","mobileapp","kiosk","external","guest_wifi","text","api","qr_code","other"]},"username":{"type":"string","description":"Username of new customer. If empty a random one is assigned"},"password":{"type":"string","description":"Password of new customer. If empty a random one is assigned"},"firstName":{"type":"string","description":"First name"},"lastName":{"type":"string","description":"Last name"},"phoneNumber":{"type":"string","description":"Phone number in E.164 format"},"phoneVerified":{"type":"boolean","description":"Phone number is verified"},"email":{"type":"string","description":"Customer email"},"emailVerified":{"type":"boolean","description":"Email address is verified"},"gender":{"type":"string","description":"Gender of customer","enum":[null,"male","female","other"]},"birthDate":{"type":"string","description":"Birthdate. Format YYYY-MM-DD"},"language":{"type":"string","description":"Customer language. Format: ISO 639-1 codes"},"country":{"type":"string","description":"Customer country. Format: ISO 3166-2 codes"},"zipCode":{"type":"string","description":"Zipcode"},"companyName":{"type":"string","description":"Company name"},"civilStatus":{"type":"string","description":"Civil status","enum":[null,"Mr","Miss","Lady"]},"doubleOptin":{"type":"string","description":"Double optin","enum":[null,"confirmed","confirm_waiting"]},"custom":{"type":"object","description":"Custom attributes"},"picture":{"type":"string","description":"Customer picture"},"policies":{"type":"object","description":"policies","properties":{"privacy":{"type":"boolean","description":"Acceptance of Privacy policy. If not true customer is not created. Required"},"termsOfUse":{"type":"boolean","description":"Acceptance of Terms of Use policy. If not true customer is not created. Required"},"minimumAgeVerification":{"type":"boolean","description":"Acceptance of Minimum age verifiation policy"},"mktgCommunications":{"type":"boolean","description":"Acceptance of Marketing communications policy"},"customs.*":{"type":"boolean","description":"Customs policy"}}},"document":{"type":"object","properties":{"memberId":{"type":"string"},"number":{"type":"string"},"passportNumber":{"type":"string"},"personalId":{"type":"string"},"type":{"type":"string"}}},"lock":{"type":"boolean","description":"If true new customer cannot login. Need to be unlocked. Default vaule true"},"profileId":{"type":"string","description":"Internet plan."},"extId":{"type":"string","description":"External id."},"extProp1":{"type":"string","description":"External property n 1."},"extProp2":{"type":"string","description":"External property n 2."},"processingData":{"type":"object","properties":{"profiling":{"type":"boolean"},"processingPersonalData":{"type":"boolean"}}},"device":{"type":"object","properties":{"source":{"type":"string"},"bundle":{"type":"string"},"vendorId":{"type":"string"},"advId":{"type":"string"},"installId":{"type":"string"},"os":{"type":"string"},"device":{"type":"string"},"created":{"type":"string"},"guid":{"type":"string"},"modified":{"type":"string"},"lastSeen":{"type":"string"}}}}},"newCustomerResponse":{"type":"object","properties":{"status":{"type":"string","description":"Request status. OK or KO if there is any error"},"generated":{"type":"string","description":"Time of current response"},"id":{"type":"string","description":"New customer id"},"organizationId":{"type":"string","description":"New customer's organization id"},"locationId":{"type":"string","description":"New customer's location id"},"hotspotId":{"type":"string","description":"New customer's hotspot id"},"username":{"type":"string","description":"New customer's username"},"password":{"type":"string","description":"New customer's password"},"locked":{"type":"boolean","description":"New customer's lock status"}}}}},"paths":{"/v3/customers":{"post":{"summary":"Create a new customer.","description":"Create a new customer\n<br><b>Role</b>: Organization Manager\n<br><b>Scope</b>: organization_write, customer_write \nIf deduplicate query params is used, the API search if the customer with the deduplicate parameters exists. If exists the abi perform an update. (During update the following values are ignored: source, username and password)\n","tags":["customers"],"parameters":[{"in":"query","name":"deduplicate","description":"This field could have the following values: phoneNumber, email, extId, extProp1, extPro2, guid. Multiple values are allowed and comma separated. Values are case sensitive ","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"Body","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/newCustomer"}}}},"responses":{"200":{"description":"status OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/newCustomerResponse"}}}}}}}}}
```

{% openapi src="<https://exp.cloud4wi.com/product/apis/cloud4wi-post-put-customers-v2.yaml>" path="/v3/customers/{cid}" method="put" %}
<https://exp.cloud4wi.com/product/apis/cloud4wi-post-put-customers-v2.yaml>
{% endopenapi %}

### Token-based customer authentication

Retrieve a temporary authentication token for a customer.&#x20;

This can be used, for example, to access the Passpoint Download page for a specific customer by redirecting the user to

```
https://osu.cloud4wi.com/activate/[customerToken]
```

{% openapi src="<https://exp.cloud4wi.com/product/apis/cloud4wi-post-put-customers-v2.yaml>" path="/v2/customers/tokens/{token}" method="get" %}
<https://exp.cloud4wi.com/product/apis/cloud4wi-post-put-customers-v2.yaml>
{% endopenapi %}

{% openapi src="<https://exp.cloud4wi.com/product/apis/cloud4wi-post-put-customers-v2.yaml>" path="/v2/customers/{cid}/token" method="get" %}
<https://exp.cloud4wi.com/product/apis/cloud4wi-post-put-customers-v2.yaml>
{% endopenapi %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://create.cloud4wi.ai/dev-hub/labs/private-apis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
