API Documentation
Hooks
Auth
Me
POST
/
api
/
auth
/
me
Copy
curl --request POST \
--url https://copilotz.com/api/auth/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'
Copy
{
"_id": 1,
"provider": "email",
"username": "your-email@example.com",
"name": "John Doe",
"context": {},
"profile": 1,
"workspace": {
"_id": 4,
"name": "My Workspace",
"namespace": "my-workspace-namespace",
"host": "my-workspace-namespace.copilotz.com",
"status": "active",
"context": {},
"createdAt": "2024-09-17T16:52:28.684Z",
"updatedAt": "2024-09-17T16:52:28.684Z"
},
"role": {
"_id": 2,
"name": "WORKSPACE_ADMIN",
"permissions": [
{
"schema": "['users', 'roles'].indexOf({{resource}}) < 0",
"read": "{{account.workspace._id}}",
"write": "{{account.workspace._id}}"
}
],
"createdAt": "2024-08-14T18:38:39.118Z",
"updatedAt": "2024-08-14T18:38:39.118Z"
},
"createdAt": "2024-08-15T18:49:02.068Z",
"updatedAt": "2024-08-15T18:49:02.068Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json · object
Response
200
application/json
OK
Response containing current authenticated user information.
Copy
curl --request POST \
--url https://copilotz.com/api/auth/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'
Copy
{
"_id": 1,
"provider": "email",
"username": "your-email@example.com",
"name": "John Doe",
"context": {},
"profile": 1,
"workspace": {
"_id": 4,
"name": "My Workspace",
"namespace": "my-workspace-namespace",
"host": "my-workspace-namespace.copilotz.com",
"status": "active",
"context": {},
"createdAt": "2024-09-17T16:52:28.684Z",
"updatedAt": "2024-09-17T16:52:28.684Z"
},
"role": {
"_id": 2,
"name": "WORKSPACE_ADMIN",
"permissions": [
{
"schema": "['users', 'roles'].indexOf({{resource}}) < 0",
"read": "{{account.workspace._id}}",
"write": "{{account.workspace._id}}"
}
],
"createdAt": "2024-08-14T18:38:39.118Z",
"updatedAt": "2024-08-14T18:38:39.118Z"
},
"createdAt": "2024-08-15T18:49:02.068Z",
"updatedAt": "2024-08-15T18:49:02.068Z"
}
Assistant
Responses are generated using AI and may contain mistakes.