POST
/
api
/
auth
/
login
curl --request POST \
  --url https://copilotz.com/api/auth/login \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "john.doe@example.cocommpany",
  "password": "your-password",
  "namespace": "example_namespace"
}'
{
  "accessToken": "tk_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NjRiOTBhYzEwM2ExM...",
  "expiresAt": "2024-05-23T13:53:03.591Z"
}

Body

application/json

Request payload for user authentication.

username
string
required

User's email address used for authentication.

Example:

"john.doe@example.cocommpany"

password
string
required

User's password.

Example:

"your-password"

namespace
string
required

Namespace associated with the user's account.

Example:

"example_namespace"

Response

200
application/json
OK

Successful authentication response containing access token and expiration.

accessToken
string
required

JWT access token for authenticated requests.

Example:

"tk_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NjRiOTBhYzEwM2ExM..."

expiresAt
string
required

Expiration date and time of the access token.

Example:

"2024-05-23T13:53:03.591Z"