Testing and go-live

Testing

How to test an integration safely — a test app, self-tests a coding agent can run, the dashboard's webhook test and an end-to-end check.

Test safely

  • There is no sandbox. Every API key writes to the real system, whatever its prefix. Create a separate test app in the dashboard (for example myapp-test) with its own API key and webhook, and use it for development, CI and staging.
  • Test reports appear as real cases in the test app. Decide them there; they never touch the production app.
  • Use made-up external IDs (selftest_author) and no real content or personal data in tests.
  • Your own production users are never affected by a test app: user files, cases and keys are separate per app.
  • The device connector has a test mode per app that accepts platform: "test" tokens on emulators and simulators.
  • Unit-test your webhook receiver with the signature test vector and an injected clock.

Self-test

Steps a coding agent can run itself. They need LIMENIA_API_KEY set in the shell by the user (do not ask for the value) and, for a real end-to-end test, a test app in the dashboard.

1. Key and address.

Shell
curl -sS -w '\nHTTP %{http_code}\n' "$LIMENIA_BASE_URL/v1/ping" -H "Authorization: Bearer $LIMENIA_API_KEY"

Expected: HTTP 200 and "tenantStatus":"active". 401 unauthenticated: wrong or revoked key. "tenantStatus":"onboarding": the tenant has not finished setup; reports will answer 403 tenant_not_active.

2. Send a test report (to the test app only):

Shell
KEY="report-selftest-$(date +%s)"
BODY='{"source":"user","reasonCategory":"spam","reporter":{"externalUserId":"selftest_reporter"},"subject":{"externalUserId":"selftest_author","displayName":"Self test"},"content":{"externalContentId":"selftest_content_1","contentType":"comment","text":"Limenia integration self test"},"externalReportId":"selftest_1"}'
curl -sS -w '\nHTTP %{http_code}\n' -X POST "$LIMENIA_BASE_URL/v1/reports" \
  -H "Authorization: Bearer $LIMENIA_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: $KEY" --data "$BODY"

Expected: HTTP 201 with reportId, caseId and "caseCreated":true (false if a case on selftest_content_1 is still open).

3. Idempotency. Send the same command again (same KEY, same BODY): HTTP 201 with the same reportId and caseId. Change the body (e.g. "reasonCategory":"other") with the same key: HTTP 409 with "code":"idempotency_key_reused".

4. Validation. Without the Idempotency-Key header: HTTP 400, "code":"validation_failed", errors with "field":"Idempotency-Key".

5. Status.

Shell
curl -sS "$LIMENIA_BASE_URL/v1/subjects/selftest_author/status" -H "Authorization: Bearer $LIMENIA_API_KEY"
# {"externalUserId":"selftest_author","status":"active"}

6. Your webhook receiver, locally. Unit-test the signature check against the test vector. Then send a signed test.ping to your running receiver:

Shell
BODY='{"id":"evt_local_1","type":"test.ping","createdAt":"2026-10-01T10:00:00Z","app":{"id":"a","slug":"demo"}}'
T=$(date +%s)
SIG=$(printf '%s' "$T.$BODY" | openssl dgst -sha256 -hmac "$LIMENIA_WEBHOOK_SECRET" -hex | sed 's/.* //')
curl -sS -w 'HTTP %{http_code}\n' -X POST http://localhost:3000/limenia/webhook \
  -H 'Content-Type: application/json' -H "Limenia-Signature: t=$T,v1=$SIG" --data "$BODY"

Expected: HTTP 204 (or another 2xx). Send it again: still 2xx (duplicate). With a wrong v1, a changed body or T=$(( $(date +%s) - 600 )): HTTP 401.

The dashboard’s webhook test

There is no API to trigger it; ask the user to open the test app, tab Connection → Webhook, and press Send test webhook. It sends one test.ping (5 s timeout, no retry; again after 10 s at the earliest) and works even while the webhook is switched off, as long as URL and secret are set. Your receiver must be reachable over public HTTPS (deployed, or through an HTTPS tunnel). Expected in the dashboard: an HTTP status 2xx and a duration; in your receiver’s log: a test.ping event ID.

Result Cause
http_status 401 Wrong secret, or the body was parsed before verifying
http_status 3xx Redirect: enter the final URL (redirects are not followed)
http_status 404 or 405 Wrong path or method of your route
timeout The answer took over 10 s
connection_failed DNS, TLS or connection problem: is the host public and the certificate valid?
blocked_url The URL resolves to a private or internal address

Decide a test case

Ask the user to open Cases in the dashboard: the case of step 2 appears with the content selftest_content_1 and the reported user selftest_author. Let them decide it in the test app (e.g. dismiss, or remove_content). Expected at your receiver within seconds: decision.created with that externalContentId, and reports.resolved with "externalReportId":"selftest_1". Both appear in the Delivery log with their status.

End to end in the app

Report something from the real app (through your backend), check that the reporter ID comes from the login, decide each action your app supports once in the test app, and confirm the app applies it and shows the statement of reasons.

Then go through the go-live checklist.