> For the complete documentation index, see [llms.txt](https://docs.avoautomation.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avoautomation.com/avo-assure/actions/apis/assertion/status-code-3.md).

# Response body not contains

This is a pre-built action available under **@Assertion** element type. This action validates whether the API response body does not contain the expected text or value. The action status variable stores the validation result as True or False.

{% hint style="info" %}
**Note:** An API request must be added and executed successfully before configuring or evaluating API Assertion.
{% endhint %}

## Syntax

**Input Value**: `<Text or value that should not be present>`

| Argument                                                              | Description                                                                 |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| <p>\<Text or value that should not be present> </p><p>(Required) </p> | Provide the text or value that you want to search in the API response body. |

**Output Value**: `<Keyword Status(optional)>`

| Argument                                    | Description                                                                       |
| ------------------------------------------- | --------------------------------------------------------------------------------- |
| <p>\<Keyword Status> </p><p>(Optional) </p> | The keyword status variable stores the assertion status as **True** or **False**. |

### **Example: Validating That a Value is Not Present in the API Response**

In this example, we verify that the API response body does not contain the specified value.

* **Action:** Response body not contains
* **Input Value:** Unavailable
  * The value **Unavailable** specifies the text or value to search in the API response body.

```json
JSON Response Body
{ 
  "first_name": "John", 
  "last_name": "Doe", 
  "phone": "8765678987", 
  "email": "johndoe@gmail.com", 
  "id": 205, 
  "availability": "Available" 
}
```

* **Output Value**: {Status}
  * The output variable **{Status}** stores the assertion result with the following possible values:
    * **True**: If the specified text or value is not found in the API response body.
    * **False**: If the specified text or value is found in the API response body.
* **Logical Explanation:** The **Response body not contains** action fetches the expected value **Unavailable** from the **Input Value** column and searches the complete API response body for the specified value. Since Unavailable is not present in the response body, the **{Status}** variable stores **True**. If the specified value is found in the response body, the **{Status}** variable stores **False**.

![](https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2F91h2RyfB4utPFqpb7yFf%2Funknown.png?alt=media\&token=91ed9023-e207-4db0-8d9b-982a9a583c8e)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/apis/assertion/status-code-3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
