Browse API guides

Create and look up a test guest

Make your first server-to-server request with cURL, JavaScript or Python.

Read as Markdown

Prepare a test tenant

Use an eligible tenant with API access enabled. A verified tenant manager creates a key in Dashboard → API & Integrations. Select waitlist:read and waitlist:write; add guest:read only when the integration needs guest names, phone numbers or custom-field values.

Store the one-time key in a server secret store. The examples use placeholders and a synthetic guest. Replace BUSINESS_ID, QUEUE_ID and ENTRY_ID with IDs from your own test tenant. Keep each action’s Idempotency-Key stable when retrying it.

Test your key and select a line

GET /me identifies the tenant, key scopes, restrictions and current capabilities. Discover authorized businesses, then read the selected line’s services, required custom fields and availability before creating a guest.

cURL / shell
export LINEBLINK_API_KEY='YOUR_TEST_API_KEY'
curl --fail-with-body 'https://api.lineblink.com/v1/external/me' \
  -H "Authorization: Bearer $LINEBLINK_API_KEY"
curl --fail-with-body 'https://api.lineblink.com/v1/external/waitlist/businesses' \
  -H "Authorization: Bearer $LINEBLINK_API_KEY"
curl --fail-with-body 'https://api.lineblink.com/v1/external/waitlist/queues?businessId=BUSINESS_ID' \
  -H "Authorization: Bearer $LINEBLINK_API_KEY"
curl --fail-with-body 'https://api.lineblink.com/v1/external/waitlist/queues/QUEUE_ID' \
  -H "Authorization: Bearer $LINEBLINK_API_KEY"

Create one synthetic guest

Choose a test line without required custom fields for this example, or add the fields returned by line discovery. This request deliberately omits phone details and SMS consent. It creates a non-SMS workflow. Keep the returned entry.id.

cURL / shell
curl --fail-with-body 'https://api.lineblink.com/v1/external/waitlist/entries' \
  -H "Authorization: Bearer $LINEBLINK_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: tutorial-test-guest-001' \
  --data '{"queueId":"QUEUE_ID","fullName":"Alex Example","externalReference":"tutorial-test-guest-001"}'
curl --fail-with-body 'https://api.lineblink.com/v1/external/waitlist/entries/ENTRY_ID' \
  -H "Authorization: Bearer $LINEBLINK_API_KEY"

Use JavaScript on your server

This example creates a different logical test action. Persist its request key alongside the source action before making the request. A retry reuses both the key and body.

JavaScript
const base = 'https://api.lineblink.com/v1/external';
const headers = {
  Authorization: 'Bearer ' + process.env.LINEBLINK_API_KEY,
  'Content-Type': 'application/json',
};
const created = await fetch(base + '/waitlist/entries', {
  method: 'POST',
  headers: { ...headers, 'Idempotency-Key': 'tutorial-js-guest-001' },
  body: JSON.stringify({ queueId: 'QUEUE_ID', fullName: 'Taylor Example', externalReference: 'tutorial-js-guest-001' }),
});
if (!created.ok) throw new Error('Create failed: ' + created.status + ' ' + await created.text());
const { entry } = await created.json();
const lookup = await fetch(base + '/waitlist/entries/' + encodeURIComponent(entry.id), { headers });
if (!lookup.ok) throw new Error('Lookup failed: ' + lookup.status);
console.log((await lookup.json()).entry.id);

Use Python on your server

Python’s standard library is enough to create and safely look up a guest. Do not print authorization headers or guest response bodies to application logs.

Python
import json
import os
from urllib.request import Request, urlopen

base = "https://api.lineblink.com/v1/external"
headers = {
    "Authorization": "Bearer " + os.environ["LINEBLINK_API_KEY"],
    "Content-Type": "application/json",
}
payload = {"queueId": "QUEUE_ID", "fullName": "Jordan Example", "externalReference": "tutorial-python-guest-001"}
request = Request(base + "/waitlist/entries", data=json.dumps(payload).encode(),
    headers={**headers, "Idempotency-Key": "tutorial-python-guest-001"}, method="POST")
with urlopen(request, timeout=20) as response:
    entry_id = json.load(response)["entry"]["id"]
with urlopen(Request(base + "/waitlist/entries/" + entry_id, headers=headers), timeout=20) as response:
    print(json.load(response)["entry"]["id"])