API Documentation
Hooks
Auth
Register
POST
/
api
/
auth
/
register
Copy
curl --request POST \
--url https://copilotz.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '{
"name": "Your Name",
"email": "your.email@example.com",
"phone": "9999999999",
"password": "123456",
"namespace": "your_namespace"
}'
Copy
{
"_id": 4,
"account": {
"_id": 3,
"provider": "email",
"username": "your_email@example.com",
"passwordHash": "cb376cae8261bd9394c1d5bf2d7c31dfc3be0e4e6777d73a1530decd34ed336c",
"salt": "b79afdd432f7cf578c43bb2a29093fd6",
"name": "Your Name",
"context": {},
"profile": 3,
"createdAt": "2024-09-17T22:47:24.270Z",
"updatedAt": "2024-09-17T22:47:24.270Z"
},
"role": 2,
"workspace": {
"_id": 6,
"name": "My Workspace",
"namespace": "my_namespace",
"host": "my_namespace.copilotz.com",
"status": "active",
"context": {},
"createdAt": "2024-09-17T22:47:22.643Z",
"updatedAt": "2024-09-17T22:47:22.643Z"
},
"createdAt": "2024-09-17T22:47:25.423Z",
"updatedAt": "2024-09-17T22:47:25.423Z"
}
Body
application/json
Request payload for user registration.
Response
200
application/json
OK
Successful registration response containing user and workspace details.
Copy
curl --request POST \
--url https://copilotz.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '{
"name": "Your Name",
"email": "your.email@example.com",
"phone": "9999999999",
"password": "123456",
"namespace": "your_namespace"
}'
Copy
{
"_id": 4,
"account": {
"_id": 3,
"provider": "email",
"username": "your_email@example.com",
"passwordHash": "cb376cae8261bd9394c1d5bf2d7c31dfc3be0e4e6777d73a1530decd34ed336c",
"salt": "b79afdd432f7cf578c43bb2a29093fd6",
"name": "Your Name",
"context": {},
"profile": 3,
"createdAt": "2024-09-17T22:47:24.270Z",
"updatedAt": "2024-09-17T22:47:24.270Z"
},
"role": 2,
"workspace": {
"_id": 6,
"name": "My Workspace",
"namespace": "my_namespace",
"host": "my_namespace.copilotz.com",
"status": "active",
"context": {},
"createdAt": "2024-09-17T22:47:22.643Z",
"updatedAt": "2024-09-17T22:47:22.643Z"
},
"createdAt": "2024-09-17T22:47:25.423Z",
"updatedAt": "2024-09-17T22:47:25.423Z"
}
Assistant
Responses are generated using AI and may contain mistakes.