ilSend API

Send as a handle, from your own software

Create a key in the dashboard. Pass it as a bearer token. The API uses the same rules as the inbox: spam scoring, threads, file attachments, voice notes and video notes.

Auth

Authorization: Bearer ilsk_your_key
Accept: application/json

40 messages an hour, and 180 API calls an hour, for each handle. A key is stored as a SHA-256 hash and is shown in full only once.

Who am I

curl https://www.inbuiltlogic.dev/api/v1/me \
  -H "Authorization: Bearer ilsk_..."

List

GET https://www.inbuiltlogic.dev/api/v1/messages?folder=inbox

Folders: inbox, spam, archive, trash, sent. The list returns the newest 50. Each row includes parent_id, thread_id and file_count. file_count is every attachment still on disk, including voice notes and video notes.

Read one message

GET https://www.inbuiltlogic.dev/api/v1/messages/42

This marks the message read when the key belongs to the recipient. The body is plain text. attachments lists each file. thread is every message in that conversation that this handle can see, oldest first.

{
  "id": 42,
  "parent_id": null,
  "thread_id": 42,
  "from": "ada@ilsend",
  "to": "grace@ilsend",
  "subject": "Hello",
  "body": "From our app.",
  "created_at": "2026-11-13 12:00:00",
  "spam_score": 0.12,
  "attachments": [
    {
      "id": 7,
      "name": "voice-note.webm",
      "size": 184320,
      "mime": "audio/webm",
      "kind": "voice",
      "removed": false,
      "url": "https://www.inbuiltlogic.dev/api/v1/messages/42/files/7"
    }
  ],
  "thread": []
}

kind is file, voice or video. A removed file stays in the list with removed: true and an empty url.

Send text

curl -X POST https://www.inbuiltlogic.dev/api/v1/messages \
  -H "Authorization: Bearer ilsk_..." \
  -H "Content-Type: application/json" \
  -d '{"to":"ada","subject":"Hello","body":"From our app."}'

to is the handle, with or without @ilsend. Subject is at most 180 characters. Body is at most 20,000. You cannot message yourself, and the other handle must be active. The reply includes id, thread_id, folder (inbox or spam) and spam_score.

Send files, a voice note, or a video note

Send these as multipart/form-data, not JSON. Attachments use the field files[] and stay at or under 100 MB altogether. A note uses the field note plus note_kind of voice or video, and stops at 50 MB. Use webm, mp4 or ogg. If the subject or body is empty, the server fills in “Voice note”, “Video note” or “Attachment”.

curl -X POST https://www.inbuiltlogic.dev/api/v1/messages \
  -H "Authorization: Bearer ilsk_..." \
  -F "to=ada" \
  -F "subject=Listen" \
  -F "body=A short note." \
  -F "note_kind=voice" \
  -F "note=@voice-note.webm;type=audio/webm" \
  -F "files[]=@brief.pdf"

Reply

Post parent_id of a message in your box. Do not send to. The subject becomes Re: plus the original, and the new message joins that thread. Files and notes use the same fields as a new message.

curl -X POST https://www.inbuiltlogic.dev/api/v1/messages \
  -H "Authorization: Bearer ilsk_..." \
  -H "Content-Type: application/json" \
  -d '{"parent_id":42,"body":"Got it."}'

Download a file

curl -L https://www.inbuiltlogic.dev/api/v1/messages/42/files/7 \
  -H "Authorization: Bearer ilsk_..." \
  -o voice-note.webm

The same key that can read the message can download the file. Voice and video are sent inline, so a player can stream them. The response accepts Range, which lets a player seek. A file removed after 30 days answers 410. The url in the message is not public: an audio or video tag cannot attach the bearer token, so fetch the bytes in your app and play the blob, or proxy the file from your server.

Sign in with ilSend

Another site can offer registration and login with an ilSend handle, the same way a site offers sign-in with a public account. The person signs in here, agrees, and the other site receives their profile and the camera photo taken when the handle was created. The national ID number is never sent. Only a yes/no flag says whether one is on file.

In the member dashboard, open API keys and create a sign-in app. You get a client id (ilc_) and a client secret (ils_). The secret is shown once. Save one or more return addresses.

Send the browser to:

https://www.inbuiltlogic.dev/oauth?client_id=ilc_...&redirect_uri=https://example.com/callback&state=RANDOM

state is required. Check that the same value comes back. On approval the browser returns to your address with code and state. Exchange the code from your server, not from the browser:

POST https://www.inbuiltlogic.dev/api/v1/oauth/token
{"client_id":"ilc_...","client_secret":"ils_...","code":"...","redirect_uri":"https://example.com/callback"}

The reply includes access_token starting with iloa_. It lasts 14 days. Then:

GET https://www.inbuiltlogic.dev/api/v1/oauth/userinfo
Authorization: Bearer iloa_...

GET https://www.inbuiltlogic.dev/api/v1/oauth/photo
Authorization: Bearer iloa_...

userinfo includes name, nationality, address, phone, fax, date of birth, and photo_base64 (JPEG) when a camera photo exists. /photo returns that JPEG directly. If the person has no camera photo, has_photo is false. Admin handles created at install do not have one.

License activation for sold scripts

Every ilApps download includes il_license_client and IL_INSTALL_TOKEN.txt. During install, call:

POST https://www.inbuiltlogic.dev/api/license
{"action":"activate","token":"IL-....","domain":"example.com","product":"gold-blog"}

The first successful activate binds the domain and spends the token. action=verify on that same domain keeps working. Any other domain is rejected.