Product

Docs

The short guide to sending customer messages into Oleracore and controlling how the AI answers.

API keys

Owners and Admins create API keys under Team & API keys in the dashboard. A key looks like olc_live_… or olc_test_… and is shown once, when you create it; only a hash is stored, so a lost key has to be replaced. Send it from your server as a bearer token:

Authorization: Bearer olc_live_xxxxxxxxxxxxxxxx

Never put a key in a web page or app: write requests from a browser origin that is not allow-listed are refused.

Each key has one scope:

  • Full access: tickets, articles, workflows, overview and analytics, any method, plus the inbound endpoint below.
  • Read-only: the same areas, read requests only (GET).
  • Tickets only: tickets and the inbound endpoint.
  • Workflows only: workflows.

Team, billing, company settings and API-key management can never be reached with a key. A request outside the key's scope gets 403; an unknown or revoked key gets 401. Keys are rate limited per minute by plan (Starter 60, Scale 150, Enterprise 600); beyond that you receive 429 with X-RateLimit-* headers.

Send a customer message

POST /api/v1/inbound/messages creates a ticket (channel “api”) from a customer's message, or adds the message to an existing ticket. It needs a Full access or Tickets only key.

curl -X POST https://YOUR-API-DOMAIN/api/v1/inbound/messages \
  -H "Authorization: Bearer olc_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "customerEmail": "maya@example.com",
    "customerName": "Maya Chen",
    "subject": "Order arrived damaged",
    "message": "The box was crushed and the sensor is cracked."
  }'

customerEmail and message (up to 10,000 characters) are required. subject (up to 200 characters) is required for a new ticket, and customerName is optional. To continue a conversation, pass ticketNumber (for example OLC-12) with the same customer email; a pending or resolved ticket is reopened. This endpoint allows 30 requests per minute per key. A successful call returns 201 with the ticket number and the stored message:

{ "ok": true, "ticketNumber": "OLC-12", "message": { ... } }

Errors always look like { "ok": false, "error": { "message": "...", "fields": { ... }, "code": "..." } }. A company whose trial has ended or whose payment has failed for longer than the grace period gets 402.

AI reply modes

An Owner or Admin chooses how the AI answers under Settings, once an operator has added at least one AI model:

  • Off: no AI replies.
  • Suggest (default): the AI writes a draft on the ticket. An agent reviews it and sends or dismisses it.
  • Auto: the AI replies to the customer directly and the reply is emailed to them.

Replies are grounded in your published knowledge-base articles, and the reply names the articles it used. If the AI cannot answer from them, for instance for prices or order details they do not state, it escalates the ticket to your team instead of guessing.

Webhooks

Oleracore does not send outbound webhooks yet.