# add

## Usage

```bash
bdy sandbox endpoint add|create [options] <identifier>
```

## Arguments

| **Argument** | **Description** |
| :--- | :--- |
| `identifier` | Sandbox identifier (required) |

## Options

| **Option** | **Description** |
| :--- | :--- |
| `-w, --workspace <domain>` | Workspace URL handle. Can be set via variable: BUDDY_WORKSPACE |
| `-p, --project <name>` | Project name. Can be set via variable: BUDDY_PROJECT |
| `-n, --name <name>` | Endpoint name |
| `-e, --endpoint <endpoint>` | [ip:]port |
| `-t, --type <type>` | Endpoint type (HTTP, TLS, or TCP) (default: "HTTP") |
| `-r, --ep-region <region>` | override default region ("eu", "us", "as") |
| `--whitelist <cidrs...>` | Whitelist provided IP CIDRs. Use "*" to allow all |
| `--timeout <seconds>` | Enforce connection timeout in seconds |
| `-h, --host <host>` | Provide custom HTTP host header |
| `--header <headers...>` | Header key:value to add to the request |
| `--response-header <headers...>` | Header key:value to add to the response |
| `--useragent <useragent...>` | Whitelist browser user-agent by contained text or regular expressions (e.g. /my-user-agent/). By Default all are allowed |
| `-s, --serve <directory>` | Serve files from a directory |
| `-a, --auth <user:pass>` | Enforce HTTP basic authorization |
| `-b, --buddy` | Enforce HTTP Buddy authorization |
| `-l, --log` | Log HTTP requests |
| `-v, --verify` | Enforce TLS verify |
| `-2, --http2` | Enforce HTTP/2 |
| `-c, --compression` | Turn on HTTP response compression |
| `--ca <ca>` | Path to a TLS PEM CA certificate for TLS auth |
| `--circuit-breaker <threshold>` | Turn on circuit breaker. Provide decimal value between 0 to 1 |
| `-k, --key <key>` | Path to a TLS key |
| `--cert <cert>` | Path to a TLS PEM certificate |
| `-i, --terminate <at>` | Terminate TLS at "target", "agent", "region". By default TLS is terminated at "region" |
| `--help` | display help for command |

## Examples

### Create http endpoint on port 80

```bash
bdy sb ep create sandbox-identifier -e 80
```

### Create http server and serve files from sandbox directory

```bash
bdy sb ep create sandbox-identifier -s /path/to/dir
```

### Create tcp endpoint on port 22 with name

```bash
bdy sb ep create sandbox-identifier -t TCP -e 22 -n test
```


---
Original source: https://buddy.works/docs/cli/sandbox/endpoint/add