Meta Pixel
RubikChat
RubikChat
Get Started Free

No credit card required · 14-day free trial

Authentication

Every CRM API request is made as a RubikChat user, on one of that user's organizations. Send a Bearer token and the organization slug with each request.

Access Token

Get an access token from the Login API. The token it returns is sent in the Authorization header as a Bearer Token.

Get a token · bash
curl --location 'https://api-proxy-v1.rubikchat.com/api/login' \
  --form 'email="[email protected]"' \
  --form 'password="your-password"'
Example Header · http
Authorization: Bearer 4120|X2DRupRbSzETs7ZGsWfpB2bzOQ4OvKmhErEhyLWJf758fc22

Organization

CRM data belongs to an organization. Name the organization in the X-Organization-Slug header on every request:

Example Header · http
X-Organization-Slug: your-organization-slug
  • The slug is the short name of your organization, the same one used in your RubikChat dashboard links.
  • The signed-in user must be a member of that organization. Otherwise the request is refused with 403.
  • Always send the header, also when your user belongs to only one organization.

Headers

Headers

NameTypeRequiredDescription
AuthorizationstringrequiredBearer YOUR_ACCESS_TOKEN
X-Organization-SlugstringrequiredThe slug of your organization.
Content-Typestringrequiredapplication/json (for requests with a body)
Acceptstringoptionalapplication/json

Example Request

Example Request (cURL) · bash
curl --location --request GET 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/contacts?limit=1' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Accept: application/json'
Example · http
GET /api/crm/v3/objects/contacts?limit=1 HTTP/1.1
Host: api-proxy-v1.rubikchat.com
Authorization: Bearer YOUR_ACCESS_TOKEN
X-Organization-Slug: your-organization-slug
Accept: application/json

Warning

Important: Your access token gives full access to your CRM data. Keep it on your server and never expose it in browser code or public repositories.

Errors

Missing or invalid token

Status: 401 Unauthorized

Returned when the Authorization header is missing, or the token is invalid or revoked.

Unauthorized · json
{
  "error": "Unauthenticated"
}

Not a member of the organization

Status: 403 Forbidden

Returned when the signed-in user is not a member of the organization named in X-Organization-Slug.

Forbidden · json
{
  "message": "Unauthorized",
  "code": "forbidden"
}

These two checks run before the CRM API, so their replies are shorter than the CRM error format.