Create a Customer
HTTP method and endpoint
POST /api/v1/pbx/customers
Request parameters
| Parameter | Importance | Type | Description | Restriction |
| company | Required | String | Company name. |
|
| contactName | Required | String | Contact name. |
|
| Required | String | Email address. |
|
|
| position | Optional | String | Job title. |
|
| cellphone | Optional | String | Cell phone number. |
|
| telephone | Optional | String | Telephone number. |
|
| fax | Optional | String | Fax number. |
|
| address | Optional | String | Company address. |
|
| remark | Optional | String | Remark. |
|
| externalId | Optional | String | External ID. |
|
Examples
Request example
POST /api/v1/pbx/customers HTTP/1.1 Host: ympapi.yeastarcloud.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbl9uYW1lIjoiY2VjaWxpYUB5ZWFzdGFyLmNvbSIsInNjb3BlIjpbInRydXN0Il0sImV4cCI6MTU0NzAwMDA5NSwiYXV0aG9yaXRpZXMiOlsiUk9MRV9hZG1pbiJdLCJqdGkiOiIxZDNjZjU3Ny00YzNjLTRhMmMtYWM3OS00ZTc3ODAwMWFiMzQiLCJjbGllbnRfaWQiOiI5Nzg5OTNmMDk2YzQ0MTFmYTljYzgwZWUyZTYyZjFmMiJ9.IHh14j1Ro3HV6MWMjhFeHU1QTkQBc7lg4PVvKpifXnk Content-Type: application/json Cache-Control: no-cache { "contactName": "Daisy", "company": "Yeastar", "email": "daisy909@gmail.com", "externalId": "", "position": "BD", "cellphone": "283793483", "telephone": "", "fax": "", "remark": "", "address": "Xiamen" }
Response example
HTTP/1.1 200 OK { "status": "Success", "customer": { "id": 170 } }