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.
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β
| Environment | Base URL |
|---|---|
| Production | https://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:
| Header | Value |
|---|---|
Authorization | Token <your_token> |
Content-Type | application/json |
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": {}
}
idSave 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
| Status | Meaning |
|---|---|
pending | The job has been accepted and is queued. |
started | The analysis is running. |
processed | The analysis has finished and the result field contains the report. |
error | It could not be completed. result may include error details. |
processed and error are terminal states: the job will not change again.
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 detailsThe 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β
| Code | Meaning |
|---|---|
200 / 201 | The operation completed successfully. |
400 | The data sent is not valid. Check target or other fields. |
401 | The Authorization header is missing or the token is invalid. |
404 | The job does not exist or does not belong to your account. |
429 | You have exceeded the audit quota. |
A typical validation error:
{
"target": [
"Enter a valid URL or domain."
]
}
429Implement 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
idnext 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
processedanderrorβ 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