Meta Pixel
RubikChat
RubikChat
Get Started Free

No credit card required · 14-day free trial

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

POST/login

Authorization

This endpoint does not require authentication.

Headers

NameTypeRequiredDescription
Content-Typestringrequiredmultipart/form-data
Acceptstringrequiredapplication/json

Note

The Cookie header shown in the cURL example is automatically generated by the client during testing and is not required when integrating with the API.

Request Body

The request must be submitted as multipart/form-data.

Form Fields

NameTypeRequiredDescription
emailstringrequiredRegistered RubikChat email address.
passwordstringrequiredPassword associated with the registered account.

Example Request (cURL)

Example Request (cURL) · bash
curl --location 'https://api-proxy-v1.rubikchat.com/api/login' \
  --form 'email="[email protected]"' \
  --form 'password="your-password"'

Example Request Payload

Example Request Payload · bash
[email protected]
password=your-password

Successful Response

Status: 200 OK

Successful Response · json
{
  "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

NameTypeDescription
idintegerUser ID.
namestringUser's full name.
emailstringRegistered email address.
phonestring/nullUser phone number, if available.
email_verified_atdatetimeEmail verification timestamp.
last_workspace_idintegerThe workspace the user last opened. (Was organization_id.)
staff_rolestring/nullRubikChat staff role; null for customers. (Was user_type.)
statusstringCurrent account status.
created_atdatetimeUser creation timestamp.
updated_atdatetimeLast update timestamp.

Token

NameTypeDescription
tokenstringPersonal 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.

Example Header · http
Authorization: Bearer 4120|X2DRupRbSzETs7ZGsWfpB2bzOQ4OvKmhErEhyLWJf758fc22
Example · http
POST /api/agents HTTP/1.1
Host: api-proxy-v1.rubikchat.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

Warning

Important: Store the access token securely. Any API endpoint that requires authentication expects this token to be sent as a Bearer Token in the Authorization header.

Errors

Validation Error

Status: 422 Unprocessable Entity

Returned when one or more required fields are missing.

Validation Error · json
{
  "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.

Invalid Credentials · json
{
  "message": "Invalid login details."
}

Internal Server Error

Status: 500 Internal Server Error

Internal Server Error · json
{
  "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

Keep your access token secure and never expose it in client-side code or public repositories.