# Create a gateway

`POST https://app.shuttleglobal.com/c/api/instances/{instance_key}/gateways`

Create a new gateway connection

## Authentication

- basicAuth: Basic Authentication using secret key
- bearerAuth: OAuth 2.0 Bearer Token Authentication

## Request body (`application/json`), required

- `gateway` (object)
  - `processor` (string, required): Payment processor type (e.g., STRIPE)
  - `name` (string): Display name for the gateway
  - `code` (string): Your ID for the gateway (optional)
  - `values` (object): Gateway-specific configuration values
  - `tags` (array of string): Tags for searching and organizing
  - `metadata` (object): Custom metadata key-value pairs

## Responses

### 200: Created gateway

```json
{
  "gateway": {
    "id": "string",
    "name": "string",
    "code": "string",
    "division": "string",
    "status": "CREATED",
    "status_reason": "string",
    "processor": "string",
    "processor_name": "string",
    "processor_account_name": "string",
    "gateway_group": "string",
    "currencies": [
      "string"
    ],
    "payment_method_types": {},
    "payment_method_types_moto": {},
    "metadata": {},
    "tags": [
      "string"
    ],
    "features": {},
    "created": "2026-01-01T12:00:00Z",
    "created_session": "string",
    "updated": "2026-01-01T12:00:00Z",
    "updated_session": "string",
    "v": 0
  }
}
```

### 400: Bad request - invalid parameters

```json
{
  "code": "string",
  "message": "string"
}
```

### 401: Unauthorized - invalid credentials

```json
{
  "code": "UNAUTHORIZED",
  "message": "Unauthorised"
}
```

### 422: Validation error - invalid gateway configuration

```json
{
  "code": "string",
  "message": "string"
}
```

## Example request

```sh
curl --request POST \
  --url https://app.shuttleglobal.com/c/api/instances/YOUR_INSTANCE_KEY/gateways \
  --header 'Authorization: Basic <base64 of SECRET_KEY:>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

Reference page: https://docs.shuttleglobal.com/platforms/reference/operations/creategateway/