Api

Authenticate and make your first Rekaz public API request.

Rekaz uses HTTP Basic authentication. The dashboard gives you a ready-to-use Base64 credential and your Tenant ID.

Use the Base64 value exactly as shown. Do not decode it, edit it, or Base64-encode it again.

1. Create an API key

  1. Sign in to the Rekaz dashboard.
  2. Open Settings > API Keys.
  3. Select Create API key, enter a name, and create it.
  4. In the success window, copy both values:
    • Base64
    • Tenant ID

The Base64 value is shown only when the key is created or rotated. Store it in a server-side secret manager. Never put it in frontend code or a mobile application.

2. Add the authorization header

Put Basic, one space, then the Base64 value you copied:

Authorization: Basic YOUR_BASE64_VALUE

Do not encode the Base64 value again.

3. Add the tenant header

Every request must also include the tenant header. __tenant starts with two underscores:

__tenant: YOUR_TENANT_ID

4. Make your first request

Replace only YOUR_BASE64_VALUE and YOUR_TENANT_ID:

curl --request GET \
  'https://platform.rekaz.io/api/public/products?skipCount=0&maxResultCount=20' \
  --header 'Authorization: Basic YOUR_BASE64_VALUE' \
  --header '__tenant: YOUR_TENANT_ID' \
  --header 'Accept: application/json' \
  --header 'Accept-Language: en'

HTTPie:

http GET 'https://platform.rekaz.io/api/public/products?skipCount=0&maxResultCount=20' \
  'Authorization:Basic YOUR_BASE64_VALUE' \
  '__tenant:YOUR_TENANT_ID' \
  'Accept:application/json' \
  'Accept-Language:en'

A successful response returns HTTP 200 with this shape:

{
  "items": [],
  "totalCount": 0
}

items may contain products. An empty array is still a successful response when the tenant has no matching products.

5. Create a customer

This request writes data. Use a new mobile number each time you test it.

curl --request POST \
  'https://platform.rekaz.io/api/public/customers' \
  --header 'Authorization: Basic YOUR_BASE64_VALUE' \
  --header '__tenant: YOUR_TENANT_ID' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Test Customer",
    "mobileNumber": "+966501234567",
    "type": 1
  }'

A successful response returns HTTP 200:

{
  "customerId": "NEW_CUSTOMER_UUID"
}

Phone numbers should use E.164 format, including the leading +.

Troubleshooting

ResultCheck
400 Bad RequestRequired fields, date ranges, phone format, and page size
401 UnauthorizedThe header starts with Basic , uses the copied Base64 value without re-encoding, and the key has not been rotated or deleted
403 ForbiddenThe __tenant value is correct and belongs to the API key
404 Not FoundThe route or resource ID is correct for this tenant

Use HTTPS for every request. Rekaz does not currently provide a separate public sandbox, so use dedicated test records in an agreed test tenant.

Continue with the API Reference or Webhooks.


Did this page help you?