Account
Create or find user
Overview
This endpoint creates a new user on the customhost or returns an existing user if a match is found by email or phone. At least one of email or phone is required.
Fails with a 400 if the Add Customers feature is not enabled for this creator.
Authorization
bearer AuthorizationBearer <token>
In: header
Header Parameters
x-whitelabel-host*string
Host name of the dashboard, ex: mydomain.tagmango.com
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-prod-new.tagmango.com/api/v1/external/users" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "phone": 9876543210, "name": "John Doe", "country": "IN" }'{
"_id": "6659ca9e5f2acb7abfdcd8fd",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": 1234567890,
"country": "India",
"dialCode": "+91",
"currency": "USD",
"isNew": true
}{
"code": 400,
"type": "Bad Request",
"statusMessage": "BAD_REQUEST",
"success": false,
"message": "Invalid request",
"result": "Invalid request"
}{
"code": 401,
"type": "Unauthorized",
"statusMessage": "UNAUTHORIZED",
"message": "Invalid token",
"result": "Invalid token",
"success": false
}{
"code": 403,
"type": "Forbidden",
"statusMessage": "FORBIDDEN",
"errorCode": "WORKSHOP_MANGO_FORBIDDEN",
"message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
"success": false
}{
"code": 429,
"type": "Too Many Requests",
"statusMessage": "TOO_MANY_REQUESTS",
"message": "Request limit exceeded. try after 10 seconds",
"result": "Request limit exceeded. try after 10 seconds",
"success": false
}