POST
/
api
/
auth
/
me
curl --request POST \
  --url https://copilotz.com/api/auth/me \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "_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

Authorization
string
header
required

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.