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

> Minimal testing scenarios for Strails IP allowlist endpoint

# Testing scenarios

# Testing Scenarios

This file contains minimal, focused tests that reflect the public docs. It only documents testing for the IP allowlist management endpoint (`/manageipallowlist`).

## Base URL

```
https://beta.stablesrail.io/v1/
```

## Required headers

```http theme={null}
Content-Type: application/json
Accept: */*
x-api-key: xxxx
```

## Tests

1. Add IP to allowlist

Request body:

```json theme={null}
{
  "action": "add",
  "ipAddress": "102.88.108.96"
}
```

Example (cURL):

```bash theme={null}
curl -X POST "https://beta.stablesrail.io/v1/manageipallowlist" \
  -H "Content-Type: application/json" \
  -H "Accept: */*" \
  -H "x-api-key: xxxx" \
  -d '{"action":"add","ipAddress":"102.88.108.96"}'
```

Expected success (200):

```json theme={null}
{
  "status": "success",
  "response_code": "200",
  "message": "IP allowlist updated successfully",
  "data": { "ipAddress": "102.88.108.96", "action": "add" }
}
```

2. Remove IP from allowlist

Request body:

```json theme={null}
{
  "action": "remove",
  "ipAddress": "102.88.108.96"
}
```

Expected success (200):

```json theme={null}
{
  "status": "success",
  "response_code": "200",
  "message": "IP allowlist updated successfully",
  "data": { "ipAddress": "102.88.108.96", "action": "remove" }
}
```

## Notes

* Use your sandbox API key in `x-api-key` when testing.
* This repository includes a Postman collection `postman-collection.json`. The collection file begins with a repository-specific first line that must be removed before passing the file to Newman or other clients; when running tests locally you can create a cleaned copy by removing the first line (for example, with `sed '1d' postman-collection.json > /tmp/clean-collection.json`).
