Create User
Creates a new user profile in Firestore after authentication
curl --request POST \
--url http://localhost:3000/api/users/create-userimport requests
url = "http://localhost:3000/api/users/create-user"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://localhost:3000/api/users/create-user', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/users/create-user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/users/create-user"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/users/create-user")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/users/create-user")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"displayName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pronouns": "Don't Specify",
"photoURL": "<string>",
"createdAt": 123,
"preferences": {
"notifications": {
"bookings": {
"newRequests": true,
"bookingUpdates": true,
"payments": true,
"conversations": true
},
"marketing": true
},
"integrations": {
"stripe": {
"isEnabled": true,
"accountId": "<string>",
"isChargesEnabled": true,
"isPayoutsEnabled": true
}
}
},
"otherPronouns": "<string>",
"phoneNumber": "<string>",
"userType": "artist",
"howDidYouHearAboutUs": "<string>",
"integrations": {
"instagram": {
"userId": "<string>",
"username": "<string>",
"connectedAt": 123
}
},
"artistInfo": {
"username": "<string>",
"workLocations": [
{
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
}
],
"tattooStyles": [
"<string>"
],
"bio": "<string>",
"links": [
{
"url": "<string>",
"order": 123
}
],
"useCustomBookingFlow": true,
"customBookingType": "<string>",
"customBookingUrl": "<string>",
"isVerified": true,
"bookingFaqs": [
{
"type": "Cancellation/Rescheduling Policy",
"description": "<string>",
"title": "<string>"
}
],
"displayDailyAvailability": true
},
"clientInfo": {
"preferredStyles": [
"<string>"
],
"homeLocation": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
}
},
"studioInfo": {
"studioName": "<string>",
"studioLocation": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"studioStyles": [
"<string>"
],
"email": "<string>",
"phoneNumber": "<string>",
"artistEmailInvites": [
"<string>"
]
},
"isEmailVerified": true
}{
"message": "<string>"
}Response
User created successfully
The user's unique identifier
The user's email address
The user's display name
The user's first name
The user's last name
The user's preferred pronouns
Don't Specify, He/Him, She/Her, They/Them, Other URL to the user's profile photo
Timestamp when the user was created
User preferences merged with defaults
Show child attributes
Show child attributes
Custom pronouns when pronouns is 'Other'
The user's phone number
The type of user account
artist, client, studio How the user discovered the platform
Connected third-party services (public info only)
Show child attributes
Show child attributes
Artist-specific information if userType is 'artist'
Show child attributes
Show child attributes
Client-specific information if userType is 'client'
Show child attributes
Show child attributes
Studio-specific information if userType is 'studio'
Show child attributes
Show child attributes
Whether the user's email is verified
curl --request POST \
--url http://localhost:3000/api/users/create-userimport requests
url = "http://localhost:3000/api/users/create-user"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('http://localhost:3000/api/users/create-user', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/users/create-user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/users/create-user"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/users/create-user")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/users/create-user")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"displayName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"pronouns": "Don't Specify",
"photoURL": "<string>",
"createdAt": 123,
"preferences": {
"notifications": {
"bookings": {
"newRequests": true,
"bookingUpdates": true,
"payments": true,
"conversations": true
},
"marketing": true
},
"integrations": {
"stripe": {
"isEnabled": true,
"accountId": "<string>",
"isChargesEnabled": true,
"isPayoutsEnabled": true
}
}
},
"otherPronouns": "<string>",
"phoneNumber": "<string>",
"userType": "artist",
"howDidYouHearAboutUs": "<string>",
"integrations": {
"instagram": {
"userId": "<string>",
"username": "<string>",
"connectedAt": 123
}
},
"artistInfo": {
"username": "<string>",
"workLocations": [
{
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
}
],
"tattooStyles": [
"<string>"
],
"bio": "<string>",
"links": [
{
"url": "<string>",
"order": 123
}
],
"useCustomBookingFlow": true,
"customBookingType": "<string>",
"customBookingUrl": "<string>",
"isVerified": true,
"bookingFaqs": [
{
"type": "Cancellation/Rescheduling Policy",
"description": "<string>",
"title": "<string>"
}
],
"displayDailyAvailability": true
},
"clientInfo": {
"preferredStyles": [
"<string>"
],
"homeLocation": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
}
},
"studioInfo": {
"studioName": "<string>",
"studioLocation": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"studioStyles": [
"<string>"
],
"email": "<string>",
"phoneNumber": "<string>",
"artistEmailInvites": [
"<string>"
]
},
"isEmailVerified": true
}{
"message": "<string>"
}