# Webhook Integration

**Overview**\
Loadmance webhooks allow you to receive real-time notifications about test events and test builder operations in your application. When configured, Loadmance will send HTTP POST requests to your specified endpoint with event data.

**Setup**\
1\. Navigate to your profile settings in Loadmance\
2\. Go to the "Integrations" section\
3\. Select "Webhook" and enter your endpoint URL\
4\. Choose which events you want to receive notifications for\
5\. Save the configuration

<figure><img src="/files/Foz0y4ZOvYJN4p0KmnyF" alt=""><figcaption></figcaption></figure>

<div align="center"><figure><img src="/files/osMpaU5VYnWnciNInUX9" alt="" width="244"><figcaption></figcaption></figure></div>

\
**Webhook Request Format**

**Headers**

```
Content-Type: application/json
[Custom headers as configured]
```

Note: You can configure additional custom headers in your webhook settings.

**Request Body Structure**

<pre><code><strong>json
</strong>{
 "type": "notification",
 "source": "Loadmance",
 "eventType": "TEST_STARTED",
 "title": "Load Test Started",
 "message": "Your load test has begun execution",
 "timestamp": "2025-07-03T14:30:00",
"metadata": {
  "testRunId": "1234567890",
  "maxUser": "100",
  "duration":"300"
 },
 "severity": "INFO"
}
</code></pre>

**Event Types and Metadata Fields**\
**TEST\_STARTED**\
Triggered when a load test begins execution.

**Metadata Fields:**

* testRunId (string): Unique identifier for the test run
* maxUser (string): Maximum number of virtual users
* duration (string): Test duration in seconds
* watchLive (string): Report address link

Example:

```
json 
{
 "type":"notification", 
 "source":"Loadmance", 
 "eventType":"TEST_STARTED", 
 "title":"Load Test Started", 
 "message": "Load test execution has begun",
 "timestamp":"2025-07-03T14:30:00", 
 "metadata"{ "
  "testRunId":"1234567890", 
  "maxUser":"100",
  "duration":"300",
  "watchLive":"xxx"
 }, 
 "severity":"info" 
}
```

**TEST\_FINISH**\
Triggered when a load test completes successfully.

**Metadata Fields:**

* testRunId (string): Unique identifier for the test run
* status (string): Final test status (FINISHED, FAILED etc.)
* duration (string): Actual test duration in seconds
* maxUser (string): Maximum number of virtual users reached
* totalRequestCount (string): Total number of requests made
* avgResponseTime (string): Average response time in milliseconds
* throughput (string): Requests per second
* apdexScore (string): Apdex score (0.0 to 1.0)
* runningTime (string): Running time
* reportLink (string): Report link

\
Example:

<pre><code>json
{
 "type":"notification",
 "source":"Loadmance",
<strong> "eventType":"TEST_FINISH",
</strong> "title":"Load Test Completed",
 "message":"Load test has finished successfully",
 "timestamp":"2025-07-03T14:35:00",
 "metadata":{
  "testRunId":"1234567890",
  "status":"FINISH",
  "duration":"15",
  "maxUser":"3",
  "totalRequestCount":"1500015000",
  "avgResponseTime":"245.7",
  "throughput":"50.2",
  "apdexScore":"0.85",
  "runningTime":"10",
  "reportLink": "xxx"
 },
 "severity":"success"
}
</code></pre>

**TEST\_FAILED**

Triggered when a load test fails or encounters an error.

**Metadata Fields:**

* testRunId (string): Unique identifier for the test run
* duration (string): Duration until failure in seconds
* totalRequestCount (string): Total requests made before failure
* errorRate (string): Error rate as a percentage (0-100)
* avgResponseTime (string): Average response time before failure
* runningTime (string) Running time
* failReportLink (string): Failed report link address<br>

Example:

<pre><code>json
{
<strong> "type":"notification",
</strong> "source":"Loadmance",
 "eventType":"TEST_FAILED",
 "title":"Load Test Failed",
 "message":"Load test encountered an error and stopped",
 "timestamp":"2025-07-03T14:32:30",
 "metadata"{
  "testRunId":"1234567890",
  "duration":"150",
  "totalRequestCount":"7500",
  "errorRate":"6.0",
  "avgResponseTime":"3200.5",
  "runningTime":"15",
  "failReportLink": "xxx"
 },
"severity":"error"
}
</code></pre>

**TEST\_BUILDER\_CREATED**&#x20;

Triggered when a new test builder is created.

**Metadata Fields:**

* testBuilderId (string): Unique identifier for the test builder
* testBuilderTitle (string): Name/title of the test builder
* projectId (string): Project identifier
* projectName (string): Project name<br>

Example:

```
json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"TEST_BUILDER_CREATED",
 "title":"Test Builder Created",
 "message":"A new test scenario has been created",
 "timestamp":"2025-07-03T14:25:00",
 "metadata":{
  "testBuilderId":"9876543210",
  "testBuilderTitle":"API Stress Test",
  "projectId":"12345",
  "projectName":"E-commerce Platform"
 },
"severity":"info"
}
```

**TEST\_BUILDER\_UPDATED**&#x20;

Triggered when an existing test builder is modified.&#x20;

Metadata Fields:&#x20;

* testBuilderId (string): Unique identifier for the test builder&#x20;
* testBuilderTitle (string): Name/title of the test builder&#x20;
* projectId (string): Project identifier&#x20;
* projectName (string): Project name

**TEST\_BUILDER\_DELETED**&#x20;

Triggered when a test builder is deleted.&#x20;

Metadata Fields:&#x20;

* testBuilderId (string): Unique identifier for the test builder&#x20;
* testBuilderTitle (string): Name/title of the test builder&#x20;
* projectId (string): Project identifier&#x20;
* projectName (string): Project name

**PROJECT\_CREATED**&#x20;

Triggered when a new project is created.&#x20;

Metadata Fields:&#x20;

* No metadata fields are included for project events

Example:

<pre><code>json
{ 
<strong> "type":"notification",
</strong> "source":"Loadmance",
 "eventType":"PROJECT_CREATED",
 "title""title":"📁 New Project Created",
 "message":"Project 'E-commerce Platform' has been created.",
 "timestamp":"2025-07-03T14:20:00",
 "metadata"{},
 "severity":"info"
}
</code></pre>

**PROJECT\_UPDATED**

Triggered when an existing project is modified.

**Metadata Fields:**

* No metadata fields are included for project events<br>

Example:

```
json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"PROJECT_UPDATED",
 "title":"📝 Project Updated",
 "message":"Project 'E-commerce Platform' has been updated.",
 "timestamp":"2025-07-03T14:22:00",
 "metadata":{},
 "severity":"info"
}
```

PROJECT\_DELETED&#x20;

Triggered when a project is deleted.&#x20;

Metadata Fields:&#x20;

* No metadata fields are included for project events&#x20;

Example:&#x20;

```
json
{
 "type":"notification",
 "source":"Loadmance",
 "eventType":"PROJECT_DELETED",
 "title":"🗂 Project Deleted",
 "message":"Project'E-commerce Platform' has been deleted.",
 "timestamp":"2025-07-03T14:25:00",
 "metadata":{},
 "severity":"info"
}
```

**Severity Levels**

* **INFO:** Informational events (test started, builder created/updated, project events)
* **SUCCESS:** Successful completion events (test finished successfully)
* **WARNING:** Warning events (performance thresholds exceeded)
* **ERROR:** Error events (test failed, critical issues)

**Endpoint Requirements**&#x20;

**Response**&#x20;

Your webhook endpoint should respond with:&#x20;

* Status Code: 200-299 for successful processing&#x20;
* Response Time: Under 10 seconds&#x20;
* Content: Any response body (ignored by Loadmance)&#x20;

**Retry Logic**&#x20;

* Loadmance will retry failed requests up to 3 times (4 total attempts)&#x20;
* Retry intervals use exponential backoff: 1 second, 2 seconds, 4 seconds&#x20;
* Maximum delay between retries is capped at 10 seconds&#x20;
* Requests timing out after 10 seconds will be retried&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://loadmance.gitbook.io/loadmance/webhook-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
