---
title: "Exit locations · intentic sandbox API"
description: "Sending the sandbox's outbound traffic out of a chosen country. Every route in the exit locations group of the intentic sandbox API, with its input, its answer and a playground."
url: "https://intentic.dev/api/exit/"
---

Connected systems

# Exit locations

Sending the sandbox's outbound traffic out of a chosen country

**On this page (7 sections)**

- [Ways to come out somewhere else](#exit-list)
- [Countries one exit can reach](#exit-countries)
- [Bring an exit up](#exit-start)
- [Move to another country](#exit-use)
- [Take a different address, same country](#exit-rotate)
- [Where the world sees you right now](#exit-check)
- [Take an exit down](#exit-stop)

Which countries a provider offers, bringing an exit up, moving it, taking a fresh address in the same country, and checking where the world actually sees you. That last check is what the others are judged against: a switch that quietly left traffic where it was is the failure this exists to rule out.

7 calls. Pick one to open it, or use the list on the right.

**GET`/exit` Ways to come out somewhere else**

Every configured exit with its live state, the country it was asked to appear in, and the country it actually appears in. Those last two disagreeing is the whole reason this reports both.

### What you send

Nothing. Call it as it is.

### What comes back

| Field | Type |
| --- | --- |
| `links` Every configured exit, with where it… | object[] |
| `id` Which exit | string |
| `provider` What it runs on | "tor" | "vpngate" | "wireguard" |
| `state` Whether it is carrying traffic, coming… | "up" | "starting" | "down" | "unavailable" … (5) |
| `proxy` Where to point traffic that should… | string |
| `country` Where it was asked to come… | string |
| `observedCountry` Where it actually comes out, as… | string |
| `ip` The address behind that observation | string |
| `checkedAt` When that was checked, in milliseconds,… | number |
| `interface` The network interface, for the kinds… | string |
| `since` When it came up, in milliseconds | number |
| `autoStart` Whether it starts itself when the… | boolean |
| `detail` Why it failed, or a note… | string |

Try it answered in this tab

curl

```bash
curl "$SANDBOX/exit" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.exit.list();
```

**GET`/exit/{id}/countries` Countries one exit can reach**

Where this exit can put you, ranked by how much capacity is really there. Asked of the provider when it answers and taken from a built-in list when it does not, and the answer says which of those you got.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which exit | string | address |

### What comes back

| Field | Type |
| --- | --- |
| `countries` Where this exit can put you,… | object[] |
| `country` The country's code | string |
| `countryName` Its name, spelled out | string |
| `servers` How many servers this provider has… | number |
| `share` How much of the provider's actual… | number |
| `live` Whether the provider answered, or this… | boolean |

Try it answered in this tab

curl

```bash
curl "$SANDBOX/exit/a1b2c3d4/countries" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.exit.countries({
 "id": "a1b2c3d4"
});
```

**POST`/exit/{id}/start` Bring an exit up stream**

Starts the exit in the country it was configured for. Streamed, because a first start fetches a catalogue, raises a tunnel and then checks the address, which takes tens of seconds on the free providers and can fail at each step with something worth reading. Starting one that is already up simply says so.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which exit | string | address |

### What comes back

| Field | Type |
| --- | --- |
| `when event is "message"` | shape |
| `data` | object |
| `kind` | string |
| `id` | string |
| `retry` | number |
| `when event is "done"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |
| `when event is "error"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |

Try it answered in this tab

curl

```bash
curl -N -X POST "$SANDBOX/exit/a1b2c3d4/start" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.exit.start({
 "id": "a1b2c3d4"
});
```

**POST`/exit/{id}/use` Move to another country stream**

Switches the exit's country, starting it first if it was down. It ends by checking where the world actually sees you and fails if that does not match what you asked for. A switch that quietly left your traffic where it was is the exact failure this whole feature exists to rule out.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which exit | string | address |
| `country` Where to come out | string | body |

### What comes back

| Field | Type |
| --- | --- |
| `when event is "message"` | shape |
| `data` | object |
| `kind` | string |
| `id` | string |
| `retry` | number |
| `when event is "done"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |
| `when event is "error"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |

Try it answered in this tab

curl

```bash
curl -N -X POST "$SANDBOX/exit/a1b2c3d4/use" \
 -H "x-intentic-control: $INTENTIC_TOKEN" \
 -H "content-type: application/json" \
 -d '{"country":"DE"}'
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.exit.use({
 "id": "a1b2c3d4",
 "country": "DE"
});
```

**POST`/exit/{id}/rotate` Take a different address, same country stream**

Swaps to another address in the country you are already in. Fails if the address does not actually change, which on a small pool it sometimes cannot.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which exit | string | address |

### What comes back

| Field | Type |
| --- | --- |
| `when event is "message"` | shape |
| `data` | object |
| `kind` | string |
| `id` | string |
| `retry` | number |
| `when event is "done"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |
| `when event is "error"` | shape |
| `data` | unknown |
| `id` | string |
| `retry` | number |

Try it answered in this tab

curl

```bash
curl -N -X POST "$SANDBOX/exit/a1b2c3d4/rotate" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.exit.rotate({
 "id": "a1b2c3d4"
});
```

**POST`/exit/{id}/check` Where the world sees you right now**

Looks up the address and country as seen through this exit. Cheap, and the honest answer to whether you are really where you meant to be, which is what every other call here is judged against.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which exit | string | address |

### What comes back

| Field | Type |
| --- | --- |
| `ip` The address the world sees, looked… | string |
| `country` Which country that address is in | string |
| `countryName` That country's name, spelled out | string |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/exit/a1b2c3d4/check" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.exit.check({
 "id": "a1b2c3d4"
});
```

**POST`/exit/{id}/stop` Take an exit down**

Shuts the exit off. One that was already down is fine: the promise is that it is not up afterwards, not that it was up before.

### What you send

| Field | Type | Where |
| --- | --- | --- |
| `id` required Which exit | string | address |

### What comes back

| Field | Type |
| --- | --- |
| `ok` Always true | true |

Try it answered in this tab

curl

```bash
curl -X POST "$SANDBOX/exit/a1b2c3d4/stop" \
 -H "x-intentic-control: $INTENTIC_TOKEN"
```

TypeScript

```typescript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.exit.stop({
 "id": "a1b2c3d4"
});
```

More in Connected systems

[Previous ← VPN](https://intentic.dev/api/vpn/)[Next Inventory →](https://intentic.dev/api/inventory/)
