Register a new user
/v1/auth/registerRequest body
email *stringUser email address
password *stringPassword (8-128 chars, must contain uppercase, lowercase, digit, and special character)
first_name *stringUser first name
last_name *stringUser last name
account_name *stringAccount name (the customer's billing tenant + identity directory). Slug is auto-derived.
application_name *stringName of the first Application inside the new Account. Slug is auto-derived. Customers can add more Applications later.
Code samples
curl -X POST "https://api.canopy.dev/v1/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "string",
"password": "string",
"first_name": "string",
"last_name": "string",
"account_name": "string",
"application_name": "string"
}'const response = await fetch("https://api.canopy.dev/v1/auth/register", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"email": "string",
"password": "string",
"first_name": "string",
"last_name": "string",
"account_name": "string",
"application_name": "string"
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.canopy.dev/v1/auth/register",
headers={
"Content-Type": "application/json"
},
json={
"email": "string",
"password": "string",
"first_name": "string",
"last_name": "string",
"account_name": "string",
"application_name": "string",
},
)
data = response.json()package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload := map[string]interface{}{
"email": "string",
"password": "string",
"first_name": "string",
"last_name": "string",
"account_name": "string",
"application_name": "string",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.canopy.dev/v1/auth/register", bytes.NewBuffer(body))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
201 Verification email sent
{
"message": "string",
"account": {
"id": "string",
"slug": "string"
},
"application": {
"id": "string",
"slug": "string"
}
}application/json
message *stringaccount *RegisterAccountDtoapplication *RegisterApplicationDto