# Update a gateway

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

Updating a gateway is intended to be used in conjunction with Shuttle support.
* `gateway_id` can be either ID or code

Request fields:
* `status` (optional) - update the status to one of `ACTIVE`, `RUNDOWN`, `ARCHIVE`
* `values` - A map of parameters, specific to the gateway, for valid options contact support
* `tags` - An array of strings to store on this objects, you can search objects by tag
* `metadata` - A list of key values pairs to store on a object

Gateway statuses:
* `ACTIVE` - Supports new payments and new payment methods
* `RUNDOWN` - Only support payments on existing payment_methods
* `ARCHIVE` - Does not support new payments or payment_methods, nor will any API requests be made to the gateway in this status

## Authentication

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

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `gateway_id` | path | string | yes | The gateway's ID (`gw_...`), or its `code`. |

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

- `gateway` (object)
  - `status` (string): Gateway status One of: `ACTIVE`, `RUNDOWN`, `ARCHIVE`.
  - `values` (object): Gateway-specific configuration values
  - `tags` (array of string): Tags for searching and organizing
  - `metadata` (object): Custom metadata key-value pairs

## Responses

### 200: Updated 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"
}
```

### 404: Gateway not found

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

### 422: Validation error - invalid gateway configuration

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

## Example request

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

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