OkiMe Developer APIv1 TREN

1.Introduction

The OkiMe developer API is for your own site or app: send a verification code under your brand name to a user who enters their Oki number, link the user's OkiMe account to your site, send transaction notifications to linked users and promotional messages to those who opt in. You can also put a callable phone number behind your sender header.

Verification codeInstead of SMS: the code arrives in OkiMe under your brand; you check it with one call.
Account linkingVia QR / code; you never see the number, you get a user id just for you.
Notifications and promotionsLand in your own header; users control permissions.
Phone numberCalls and (optionally) chat from your header; voice menu, CRM link.

This document is for individual developers and sites (key okd_…). For business customer messaging (inbox, team, bot, approval cards) see the Oki Business API (key okb_…).

2.Getting started

Developer mode

In the OkiMe app open Settings → Developer mode (your phone number must be verified). From the same screen you turn features on and off, create keys, invite test recipients and apply for live use (sender name, domain, purpose). Once your sender name is approved you can create a live key.

Base URL and key

All endpoints live under:

https://okime.com/v1/api

Send the key in the Authorization header on every request. Requests with a body use Content-Type: application/json.

Authorization: Bearer okd_live_xxxxxxxxxxxxxxxxxxxxxxxx

A key is shown only once, when it is created; we do not store it. If you lose it, delete it and create a new one. At most 3 keys of each kind per account.

Test and live keys

Test (okd_test_)Live (okd_live_)
RecipientsYour own number and test recipients who accepted your invite (up to 5)Anyone (subject to linking / permission rules)
LabelMessages start with “TEST ·”, sender “OkiMe Test”Your approved sender name
PriceFreeFrom your prepaid balance (see Pricing)
AvailableAs soon as the mode is onAfter your application is approved

Account info

GET/v1/api/hesap

Validates the key; returns mode, status, sender name, balance and enabled features.

Example request

curl -X GET "https://okime.com/v1/api/hesap" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI"

Example response 200

{
  "kip": "canli",
  "durum": "onayli",
  "ad": "Örnek Mağaza",
  "bakiyeMikro": 12500000,
  "bakiye": "$12.50",
  "ozellikler": {
    "otp": true,
    "eslesme": true,
    "islem": true,
    "kampanya": false
  }
}

Possible errors

HTTPkodWhen
401anahtarMissing or invalid key.
402aylik_ucretLive key: balance too low for the monthly fee.
403hesapAccount suspended or not approved for live use.

3.Verification code

The code arrives in the user’s OkiMe under the Oki OTP header with your brand name: “Your Example Store verification code: 482913”. The user copies it into your site; you check it with one call.

Send a code

POST/v1/api/otp

Sends a code to a number or to a linked user. We generate the code unless you pass your own.

Request body

FieldTypeRequiredDescription
numarastringone ofOki number (digits only).
kullanicistringone ofLinked user id (u_…), instead of a number.
uzunlukintnoCode length 4–10 (default 6).
sureintnoValidity 60–1800 seconds (default 300).
kodstringnoYour own code (4–10 digits).

Example request

curl -X POST "https://okime.com/v1/api/otp" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI" \
  -H "Content-Type: application/json" \
  -d '{"numara": "5321234567"}'

Example response 200

{
  "id": "otp_7Hq2kR9a",
  "durum": "gonderildi",
  "bitis": "2026-11-25T18:05:00Z",
  "ucretMikro": 5000
}

Possible errors

HTTPkodWhen
400numaraNeither number nor user given.
402bakiyeInsufficient balance.
403ozellik_kapaliVerification code feature is off.
403deneme_alicisiTest keys send only to you and your test recipients.
404kullaniciNo linked user with this id.
429alici_siniriToo many codes to this number.
429ulasilamaz_siniriToo many unreachable numbers today.

If the number is not on OkiMe the response is "durum": "ulasilamadi" and you are not charged; send via your own SMS provider instead.

Code status

GET/v1/api/otp/{id}

Status: bekliyor (pending), dogrulandi (verified), suresi_doldu (expired), deneme_bitti (attempts used up), ulasilamadi (unreachable).

Example request

curl -X GET "https://okime.com/v1/api/otp/otp_7Hq2kR9a" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI"

Example response 200

{
  "id": "otp_7Hq2kR9a",
  "durum": "bekliyor",
  "kip": "canli",
  "olusturma": "2026-11-25T18:00:00Z",
  "bitis": "2026-11-25T18:05:00Z"
}

Possible errors

HTTPkodWhen
404otpVerification not found.

Check the code

POST/v1/api/otp/{id}/kontrol

Checks the code the user typed. Result: dogrulandi (verified), yanlis (wrong), kullanildi (already used), suresi_doldu (expired), deneme_bitti (attempts used up). Wrong attempts are limited.

Request body

FieldTypeRequiredDescription
kodstringyes4–10 digits.

Example request

curl -X POST "https://okime.com/v1/api/otp/otp_7Hq2kR9a/kontrol" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI" \
  -H "Content-Type: application/json" \
  -d '{"kod": "482913"}'

Example response 200

{
  "sonuc": "dogrulandi",
  "dogrulandi": true
}

Possible errors

HTTPkodWhen
400kodInvalid code format.
404otpVerification not found.

Recommended flow: Oki first, SMS fallback

  1. The user enters their number; call POST /otp.
  2. If gonderildi, show “Code sent to OkiMe”; if ulasilamadi, send an SMS.
  3. When the user enters the code, call POST /otp/{id}/kontrol.

4.Account linking

You show a QR or a code on your site; the user scans it in OkiMe and approves. You get a user id unique to you (u_…), not their number; you send notifications, promotions and codes with it. The user can remove the link at any time.

Create a linking code

POST/v1/api/eslesme

Returns a code valid for 10 minutes and an okime.com/l/… link. Show the link as a QR; tapped on a phone it opens OkiMe.

Request body

FieldTypeRequiredDescription
disKimlikstringnoYour own user id (1–128); echoed back in the status.

Example request

curl -X POST "https://okime.com/v1/api/eslesme" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI" \
  -H "Content-Type: application/json" \
  -d '{"disKimlik": "musteri-1042"}'

Example response 200

{
  "kod": "K7Q4MZ",
  "kodGosterim": "K7Q-4MZ",
  "baglanti": "https://okime.com/l/K7Q4MZ",
  "durum": "bekliyor",
  "bitis": "2026-11-25T18:10:00Z"
}

Possible errors

HTTPkodWhen
403ozellik_kapaliLinking feature is off.

Linking status

GET/v1/api/eslesme/{kod}

Status is bekliyor (pending), tamam (done) or red (declined). When tamam, the kullanici field is present; store it.

Example request

curl -X GET "https://okime.com/v1/api/eslesme/K7Q4MZ" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI"

Example response 200

{
  "kod": "K7Q4MZ",
  "durum": "tamam",
  "bitis": "2026-11-25T18:10:00Z",
  "disKimlik": "musteri-1042",
  "kullanici": "u_3f9c1a7b2d"
}

Possible errors

HTTPkodWhen
404eslesmeLinking not found.

User side

The user scans the QR or enters the code under Settings → Connections, sees your sender name and domain, and approves. From the same screen they turn transaction and promotional messages on or off for each site, or remove the link.

5.Notifications and promotions

Messages land in your header (your approved sender name) in the user’s OkiMe. Transaction notifications (orders, payments, appointments) are on once linked; text with promotional language cannot be sent as a transaction. Promotions are off until the user turns them on, and at most 1 per user per day. Message text is not stored.

Send a notification

POST/v1/api/bildirim

Request body

FieldTypeRequiredDescription
kullanicistringyesLinked user id. With a test key use numara instead (yourself / a test recipient).
turstringyesislem (transaction) or kampanya (promotion).
metinstringyes1–1000 characters.
istemciKimligistringno8–64 characters; the same id is never sent twice (safe retries).

Example request

curl -X POST "https://okime.com/v1/api/bildirim" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI" \
  -H "Content-Type: application/json" \
  -d '{"kullanici": "u_3f9c1a7b2d", "tur": "islem", "metin": "Your order has shipped. Tracking: 1Z999", "istemciKimligi": "siparis-1042-kargo"}'

Example response 200

{
  "id": "b_9m2x",
  "durum": "gonderildi",
  "ucretMikro": 5000
}

Possible errors

HTTPkodWhen
402bakiyeInsufficient balance.
403izin_yokThe user has not allowed this type.
404kullaniciNo linked user (the link may have been removed).
422kampanya_gibiText looks promotional; send with tur: kampanya.
429kampanya_gunlukA promotion was already sent to this user today.
429alici_siniriToo many transaction notifications to this user this hour.

If the user muted your header the response is "durum": "sessizde" and you are not charged.

User and permissions

GET/v1/api/kullanicilar/{kullanici}

Returns whether the link still exists and the user’s permissions.

Example request

curl -X GET "https://okime.com/v1/api/kullanicilar/u_3f9c1a7b2d" \
  -H "Authorization: Bearer $OKI_GELISTIRICI_ANAHTARI"

Example response 200

{
  "kullanici": "u_3f9c1a7b2d",
  "eslesmis": true,
  "izinler": {
    "islem": true,
    "kampanya": false
  }
}

Possible errors

HTTPkodWhen
404kullaniciNo linked user.

6.Phone number and two-way header

You put a callable Oki number behind your sender header: users call you from your header (voice menu, departments, agents) and, if two-way is on, write to you. The phone menu and chats run on the Oki Business phone and inbox infrastructure; you connect your own CRM with webhooks and the API.

Getting a number

An approved developer taps Settings → Developer mode → Phone number → Get a phone number. The monthly fee is charged from your balance; after 30 days it renews automatically if the balance is enough, otherwise the number is suspended and the header becomes read-only (it comes back when you top up). In the same section turn on Two-way header: users see a message box and a call button in your header (older app versions show the header read-only).

Messaging rule (48 hours)

  • You can message a person in chat only if they wrote to you (a single word is enough).
  • Within 48 hours of their last message; after that you cannot write until they write again (403 pencere_kapali).
  • Sending a code or notification does not open the chat; notifications and promotions are separate, permission-based types (POST /bildirim).
  • Incoming messages and your replies are free.

Chats, phone menu and webhooks

Your number is created as an Oki Business record: in the app, under Settings → Oki Business, you set up the phone menu (voice menu, departments, hours) and reply to chats. To manage it from your own panel, create an okb_ key in the Oki Business panel; these endpoints are open: conversations (list, read, reply), phone menu, phone menu queries, webhooks and media. Oki Business features such as broadcasts, approval cards, automations and appointments are off for this number (403 gelistirici_santral).

7.Pricing

Prices are in US dollars and are the same in every country. They are charged from your prepaid balance, which never goes negative. Test keys are free.

ItemPriceNote
Verification code$0.005Not charged for unreachable numbers
Transaction notification$0.005Not charged if muted
Promotional message$0.011 per user per day
Developer account$5 / monthOn the first live request, then every 30 days
Phone number$20 / monthIncoming messages and replies are free

Current prices are shown in the app under Developer mode → Pricing; for now, top up your balance by contacting OkiMe.

8.Errors and limits

Every endpoint returns errors in the same shape:

{
  "kod": "bakiye",
  "hata": "insufficient balance; top up"
}
HTTPMeaning
400Invalid request (field name in kod).
401Missing or invalid key.
402Insufficient balance (bakiye, aylik_ucret).
403Feature off, no permission or account suspended.
404Not found.
422Text cannot be a transaction (kampanya_gibi).
429Limit exceeded; honour the Retry-After header.
503The developer API is temporarily unavailable.

Limits

  • 300 requests per minute per developer.
  • At most 10 verification codes per hour to the same number (across all developers), 5 per 10 minutes per developer.
  • At most 200 “unreachable” responses per day (to prevent number scanning).
  • 30 transaction notifications per user per hour, 1 promotion per day.

Rules

  • You may not use a company or brand name that belongs to someone else as your sender name.
  • Use numbers and user ids only for what the user asked for; do not sell or share them.
  • Abuse leads to suspension.