Skip to main content
Version: development

Integration guide

This guide walks through the Audit API flow: authenticate, launch the analysis of a website and retrieve the report when the job finishes.

Before you start

You need an active API token. If you do not have one yet, request access and we will support you during onboarding.

The full reference for parameters and responses is at audit.lawwwing.com/docs. This page documents the flow you will use in a prospecting scenario.

Prerequisites​

Before you start, make sure you have:

  • An API token issued by Lawwwing.
  • A backend from which to make the calls. The token must never travel to the browser.
  • An identifier for the website to analyse, domain or URL, associated with your prospect.

Base URL​

EnvironmentBase URL
Productionhttps://audit.lawwwing.com/api/v1

All routes use a trailing slash (/jobs/, not /jobs). Job identifiers are UUIDs and responses are JSON.

Authentication​

Every request is authenticated with the Authorization header:

HeaderValue
AuthorizationToken <your_token>
Content-Typeapplication/json
Protect your token

The token identifies your organisation and consumes your audit quota. Use it only from your backend. If it is missing or invalid, the API responds 401 Unauthorized.

Step 0. Verify connectivity​

Confirm that your credentials work:

curl https://audit.lawwwing.com/api/v1/ping/ \
-H "Authorization: Token ${TOKEN}"

A {"message": "pong"} response confirms that authentication is correct.

Step 1. Create the audit job​

Send the prospect's website. If you omit the protocol, the API prepends https://.

curl -X POST https://audit.lawwwing.com/api/v1/jobs/ \
-H "Authorization: Token ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"target": "prospect.example.com"
}'
{
"id": "00000000-0000-0000-0000-000000000000",
"status": "pending",
"target": "https://prospect.example.com",
"created": "2026-07-02T12:00:00Z",
"result": {}
}
Store the id

Save the job identifier next to the prospect record. You need it to query the status and the result.

The pipeline field is optional. If you omit it, the default pipeline for your account is used. To learn which pipelines are available and what each one analyses, talk to our team during onboarding.

The sync field is also optional and defaults to false. With true, the analysis runs during the request itself. In production we recommend the asynchronous flow in this guide.

Step 2. Poll the status until it finishes​

The analysis is not immediate. Query the job until the status is terminal:

curl https://audit.lawwwing.com/api/v1/jobs/00000000-0000-0000-0000-000000000000/ \
-H "Authorization: Token ${TOKEN}"
pending
β”‚
β–Ό
started
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί processed
β”‚
└────────────► error
StatusMeaning
pendingThe job has been accepted and is queued.
startedThe analysis is running.
processedThe analysis has finished and the result field contains the report.
errorIt could not be completed. result may include error details.

processed and error are terminal states: the job will not change again.

Polling cadence

Most audits finish in less than a minute. Do not fire requests in a tight loop: leave an interval between queries and stop when the status is processed or error.

Step 3. Use the report​

When the status is processed, the result field contains the diagnosis as JSON. Its structure depends on the pipeline configured for your account.

With that result you can, for example:

  • Display it on the lead record in your CRM.
  • Generate a summary for the sales team before the meeting.
  • Decide whether the prospect enters an onboarding or follow-up flow.
result details

The exact shape of the result object is defined by your pipeline. See the API reference and confirm the format with our team during onboarding.

Limits and errors​

CodeMeaning
200 / 201The operation completed successfully.
400The data sent is not valid. Check target or other fields.
401The Authorization header is missing or the token is invalid.
404The job does not exist or does not belong to your account.
429You have exceeded the audit quota.

A typical validation error:

{
"target": [
"Enter a valid URL or domain."
]
}
If you receive a 429

Implement exponential backoff before retrying. If you need a higher quota, talk to our team during onboarding.

Best practices​

  • Protect the token β€” Store it in your secrets manager and always make the calls from the server.
  • Tie each job to a prospect β€” Save the job id next to the lead so you can retrieve the report later.
  • Do not reuse jobs β€” Each website and each new analysis should create a distinct job.
  • Handle processed and error β€” Both states close the cycle; do not assume the analysis always succeeds.
  • Use the dashboard when you do not need to automate β€” For a demo or a one-off meeting, the partner dashboard is enough.

Full reference​

This guide covers the integration flow. For the details of each endpoint, parameter and response:

Need help?​

During the integration you have a direct channel with our technical team.

πŸ’¬ Talk to the team