---
title: Webhook Built-in Variables reference
description: Complete reference of the 16 built-in variables for TestingBot webhooks,
  with substitution rules and examples for custom payloads, URLs, headers and query
  parameters.
source_url:
  html: https://testingbot.com/support/integrations/webhooks/built-in-variables
  md: https://testingbot.com/support/integrations/webhooks/built-in-variables/index.md
---
# Webhook Built-in Variables

Webhook variables let you insert details of the test that triggered the webhook into the request. They work in the custom payload body, the webhook URL, header values and query parameter values. Each `{{VARIABLE}}` token is replaced with the value of the test that triggered the webhook.

See [Core Concepts](https://testingbot.com/support/integrations/webhooks/core-concepts) for how payload modes, authorization, headers and parameters fit together.

## Variable reference

| Variable | Description | Example |
| --- | --- | --- |
| `{{TEST_ID}}` | The unique session id of the test. | `f3e57e1a-sample-test-id` |
| `{{TEST_NAME}}` | The name of the test, if one was set via capabilities or the API. | `Sample login test` |
| `{{TEST_STATUS}}` | The result of the test: `PASSED`, `FAILED` or `UNKNOWN`. | `FAILED` |
| `{{TEST_DURATION}}` | How long the test took, in seconds. Inserted as a bare number. | `42` |
| `{{TEST_URL}}` | Direct link to the test details page on TestingBot. | `https://testingbot.com/members/tests/f3e57e1a-sample-test-id` |
| `{{BROWSER_NAME}}` | The browser the test ran on. | `chrome` |
| `{{BROWSER_VERSION}}` | The version of the browser. | `126` |
| `{{DEVICE_NAME}}` | The device the test ran on, or empty for desktop tests. | `Galaxy S24` |
| `{{PLATFORM}}` | The full name of the operating system. | `Windows 11` |
| `{{BUILD_NAME}}` | The build identifier this test belongs to, or empty. | `build-1234` |
| `{{TEST_TAGS}}` | Raw JSON array of tag strings attached to the test. | `["smoke","regression"]` |
| `{{TEST_ERRORS}}` | Raw JSON array of error objects with `message` and `test_name` fields. | `[{"message":"Element not found","test_name":""}]` |
| `{{CREATED_AT}}` | When the test started, in ISO 8601 format. | `2026-06-11T09:00:00Z` |
| `{{COMPLETED_AT}}` | When the test completed, in ISO 8601 format. | `2026-06-11T09:00:42Z` |
| `{{USER_ID}}` | The id of the user who launched the test. | `12345` |
| `{{TEAM_ID}}` | The id of the team for which this test was run. | `12345` |

## How substitution works

- In the payload body, string variables are inserted JSON-escaped without surrounding quotes; write them inside quotes yourself, for example `"name": "{{TEST_NAME}}"`. 
- `{{TEST_TAGS}}` and `{{TEST_ERRORS}}` insert raw JSON arrays; write them without quotes, for example `"tags": {{TEST_TAGS}}`. 
- `{{TEST_DURATION}}` inserts a bare number, so write it without quotes when you want a JSON number. 
- In the URL, header values and query parameter values, string variables are substituted as plain text; arrays are not available there. 
- Unknown `{{TOKENS}}` are left untouched. 

## Examples

The custom payload below combines quoted string variables, an unquoted number and an unquoted array:

    {
      "name": "{{TEST_NAME}}",
      "status": "{{TEST_STATUS}}",
      "duration_sec": {{TEST_DURATION}},
      "tags": {{TEST_TAGS}},
      "link": "{{TEST_URL}}"
    }

For a failed test named `Sample login test`, the rendered request body looks like this:

    {
      "name": "Sample login test",
      "status": "FAILED",
      "duration_sec": 42,
      "tags": ["smoke","regression"],
      "link": "https://testingbot.com/members/tests/f3e57e1a-sample-test-id"
    }

Note that `duration_sec` and `tags` are written without quotes in the template, so the result stays a valid JSON number and array. Use the **Test Webhook** button at [/members/integrations/webhooks](https://testingbot.com/members/integrations/webhooks) to preview the rendered payload with sample values.

## Related

- [Core Concepts](https://testingbot.com/support/integrations/webhooks/core-concepts): triggers, payload modes, delivery and limits.
- [Integrations](https://testingbot.com/support/integrations/webhooks/integrations): prefilled templates that use these variables for popular services.
- [Quick Start](https://testingbot.com/support/integrations/webhooks/quick-start): create and test your first webhook step by step.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new)[Slack Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
