> ## Documentation Index
> Fetch the complete documentation index at: https://help.pelion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a request body

> When and how to include a request body when creating or updating resources through the Pelion Portal API.

Include a request body when you create or update resources. The request body is a representation of the resource. For example, to create a new monitoring alert, make a `POST` request to the `/alerts` endpoint and include the request body in your call.

The [API Reference](https://connectivity-eu.pelion.com/api-reference/) documentation for each endpoint indicates whether it requires a request body. For endpoints that do, the documentation lists:

* Mandatory and optional fields
* A description of each field
* An example of a valid request body

## Example request body

The following example shows a request body for the monitoring alerts endpoint.

```json theme={null}
{
  "ruleType": "sim",
  "target": "8944999999248275001",
  "lowerThreshold": "512000",
  "upperThreshold": "1048576"
}
```

In this example, the request body does the following:

* Creates a SIM-level monitoring alert (`"ruleType": "sim"`).
* Applies the alert to a SIM with an ICCID of `8944999999248275001`.
* Sets a lower alert threshold of 500KB.
* Sets an upper alert threshold of 1MB.

## Example API call with a request body

The following example shows how to format the monitoring alerts request body within an API call.

```bash theme={null}
curl -X POST "https://connectivity-eu-api.pelion.com/alerts" \
  -H "Authorization: Bearer YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ruleType": "sim", "target": "8944999999248275001", "lowerThreshold": "512000", "upperThreshold": "1048576"}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.