Login
Authenticates a registered RubikChat user and returns an access token that can be used to access all protected API endpoints.
After a successful login, the returned access token must be included in the Authorization header as a Bearer Token when calling authenticated APIs such as Create AI Agent, Knowledge Base, API Actions, Workflows, and other protected endpoints.
Endpoint
Authorization
This endpoint does not require authentication.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | required | multipart/form-data |
| Accept | string | required | application/json |
Note
Request Body
The request must be submitted as multipart/form-data.
Form Fields
| Name | Type | Required | Description |
|---|---|---|---|
string | required | Registered RubikChat email address. | |
| password | string | required | Password associated with the registered account. |
Example Request (cURL)
curl --location 'https://api-proxy-v1.rubikchat.com/api/login' \
--form 'email="[email protected]"' \
--form 'password="your-password"'Example Request Payload
[email protected]
password=your-passwordSuccessful Response
Status: 200 OK
{
"message": "Logged in successfully.",
"user": {
"id": 7360,
"name": "john Doe",
"email": "[email protected]",
"phone": null,
"email_verified_at": "2026-08-06T12:29:29.000000Z",
"created_at": "2026-08-06T12:29:29.000000Z",
"updated_at": "2026-08-06T12:29:29.000000Z",
"session_id": null,
"stripe_customer_id": null,
"last_workspace_id": 7031,
"staff_role": null,
"created_by": null,
"status": "active"
},
"token": "4120|X2DRupRbSzETs7ZGsWfpB2bzOQ4OvKmhErEhyLWJf758fc22"
}Response Fields
User Object
| Name | Type | Description |
|---|---|---|
| id | integer | User ID. |
| name | string | User's full name. |
string | Registered email address. | |
| phone | string/null | User phone number, if available. |
| email_verified_at | datetime | Email verification timestamp. |
| last_workspace_id | integer | The workspace the user last opened. (Was organization_id.) |
| staff_role | string/null | RubikChat staff role; null for customers. (Was user_type.) |
| status | string | Current account status. |
| created_at | datetime | User creation timestamp. |
| updated_at | datetime | Last update timestamp. |
Token
| Name | Type | Description |
|---|---|---|
| token | string | Personal Access Token used to authenticate future API requests. |
Using the Access Token
After a successful login, include the returned token in the Authorization header for every protected API request.
Authorization: Bearer 4120|X2DRupRbSzETs7ZGsWfpB2bzOQ4OvKmhErEhyLWJf758fc22POST /api/agents HTTP/1.1
Host: api-proxy-v1.rubikchat.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/jsonWarning
Errors
Validation Error
Status: 422 Unprocessable Entity
Returned when one or more required fields are missing.
{
"errors": {
"email": [
"The email field is required."
]
},
"message": "Validation errors occurred. Please check your input and try again."
}Invalid Credentials
Status: 401 Unauthorized
Returned when the provided email or password is incorrect.
{
"message": "Invalid login details."
}Internal Server Error
Status: 500 Internal Server Error
{
"message": "An unexpected error occurred. Please try again later."
}Notes
- Only registered users can log in.
- Both email and password are required.
- A successful login returns a Personal Access Token that is required for all authenticated API requests.
- Include the token in the Authorization header using the Bearer scheme.
- The same token can be used to access APIs such as:
- Create AI Agent
- Knowledge Base
- API Actions
- Workflows
- Conversations
- Channels
- Organization Management
Warning