Browse API guides

Create and look up a test guest

Create a test guest with the LineBlink API and look up the entry in cURL, JavaScript or Python.

Read as Markdown

Create a test API key

Use a dedicated test line in an active Business or Enterprise account with production API access enabled. The API has no separate sandbox. A successful test write creates a real entry on that line and counts toward the plan allowance.

Sign in as a manager with a full account and verified email. Open Business setup → API & Integrations in the dashboard. Select waitlist:read and waitlist:write. Add guest:read only if you need to read guest names, phone numbers, or custom-field values.

Save the key when it is shown and store it in your server’s secret manager. Use IDs from your test line and account. Reuse the same Idempotency-Key when retrying an action.

Test your key and select a line

Start with GET /me to verify your key and check account access. List the businesses your key can access, then choose a line. The API calls a line a queue, so use the line’s ID for QUEUE_ID. Read its services, required fields and join settings 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

Use a test line without required custom fields, or add the fields returned by line discovery. This request deliberately omits phone details and SMS consent. LineBlink will not send SMS for this example. A successful create returns HTTP 201 and the response below, with real IDs in place of the examples. Use entry.id for the lookup.

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"
json
{
  "entry": {
    "id": "390ab612-d725-4557-8c4a-eb9d7a23c91d",
    "guestId": "aa458c7e-cf62-459f-8c32-096a838e827c",
    "bookingId": null
  }
}

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"])