curl -X POST "https://api.usegately.com/api/v1/auth/signup" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "newuser@example.com",
"password": "securepassword123",
"metadata": {
"name": "Jane Smith"
}
}'
const response = await fetch('https://api.usegately.com/api/v1/auth/signup', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
email: 'newuser@example.com',
password: 'securepassword123',
metadata: {
name: 'Jane Smith'
}
})
})
const data = await response.json()
{
"user": {
"id": "usr_xyz789",
"email": "newuser@example.com",
"user_metadata": {
"role": "member",
"project_id": "your-project-id",
"metadata": {
"name": "Jane Smith"
}
}
},
"session": {
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "usr_xyz789",
"email": "newuser@example.com"
}
}
}
{
"error": "Account already exists. Please sign in."
}
Authentication
Sign Up
Create a new user account
POST
/
api
/
v1
/
auth
/
signup
curl -X POST "https://api.usegately.com/api/v1/auth/signup" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "newuser@example.com",
"password": "securepassword123",
"metadata": {
"name": "Jane Smith"
}
}'
const response = await fetch('https://api.usegately.com/api/v1/auth/signup', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
email: 'newuser@example.com',
password: 'securepassword123',
metadata: {
name: 'Jane Smith'
}
})
})
const data = await response.json()
{
"user": {
"id": "usr_xyz789",
"email": "newuser@example.com",
"user_metadata": {
"role": "member",
"project_id": "your-project-id",
"metadata": {
"name": "Jane Smith"
}
}
},
"session": {
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "usr_xyz789",
"email": "newuser@example.com"
}
}
}
{
"error": "Account already exists. Please sign in."
}
Request Body
string
required
The user’s email address
string
required
The user’s password (minimum 6 characters)
object
Additional user metadata (name, etc.)
Response
object
The created user object
object
Session information with access token
curl -X POST "https://api.usegately.com/api/v1/auth/signup" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "newuser@example.com",
"password": "securepassword123",
"metadata": {
"name": "Jane Smith"
}
}'
const response = await fetch('https://api.usegately.com/api/v1/auth/signup', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
email: 'newuser@example.com',
password: 'securepassword123',
metadata: {
name: 'Jane Smith'
}
})
})
const data = await response.json()
{
"user": {
"id": "usr_xyz789",
"email": "newuser@example.com",
"user_metadata": {
"role": "member",
"project_id": "your-project-id",
"metadata": {
"name": "Jane Smith"
}
}
},
"session": {
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "usr_xyz789",
"email": "newuser@example.com"
}
}
}
{
"error": "Account already exists. Please sign in."
}
Was this page helpful?
⌘I