# Settings (Coinbax Core API)

> Source: https://developers.coinbax.com/reference/coinbax-core/settings/
> Staging base URL: https://core-staging.coinbax.com/api/v1

Application settings

## List global settings

`GET /settings`

- Auth: Bearer token
- Operation ID: `listSettings`

Retrieve global settings. Encrypted values are returned as empty strings.

**Permissions:** ADMIN or SUPER_ADMIN only

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `category` | query | string | no | Filter by category |
| `page` | query | integer | no |  |
| `limit` | query | integer | no |  |

### Example request

```bash
curl https://core-staging.coinbax.com/api/v1/settings \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

### Responses

**200** Settings retrieved successfully

```json
{
  "success": true,
  "meta": {
    "timestamp": "2026-02-24T12:00:00.000Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 150,
      "totalPages": 8
    }
  },
  "data": {
    "settings": [
      {
        "id": "9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
        "key": "coinbax_api_key",
        "value": "",
        "category": "api",
        "description": "string",
        "isEncrypted": true,
        "createdAt": "2026-01-15T12:00:00.000Z",
        "updatedAt": "2026-01-15T12:00:00.000Z"
      }
    ],
    "meta": {
      "page": 100,
      "limit": 100,
      "total": 100,
      "totalPages": 100
    }
  }
}
```

**401** Unauthorized - missing or invalid authentication

**403** Forbidden - insufficient permissions

**500** Internal server error

---

## Create or update global setting

`POST /settings`

- Auth: Bearer token
- Operation ID: `createSetting`

Create a new global setting or update an existing one.

**Permissions:** ADMIN or SUPER_ADMIN only

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `key` | string | yes | Unique setting key |
| `value` | string | yes | Setting value |
| `category` | string | no | Setting category |
| `description` | string | no | Setting description |
| `isEncrypted` | boolean | no | Whether to encrypt the value |

```json
{
  "key": "custom_setting",
  "value": "setting_value",
  "category": "general",
  "description": "A custom setting",
  "isEncrypted": false
}
```

### Example request

```bash
curl -X POST https://core-staging.coinbax.com/api/v1/settings \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "custom_setting",
  "value": "setting_value",
  "category": "general",
  "description": "A custom setting",
  "isEncrypted": false
}'
```

### Responses

**201** Setting created successfully

```json
{
  "success": true,
  "meta": {
    "timestamp": "2026-02-24T12:00:00.000Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 150,
      "totalPages": 8
    }
  },
  "data": {
    "id": "9f8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
    "key": "coinbax_api_key",
    "value": "",
    "category": "api",
    "description": "string",
    "isEncrypted": true,
    "createdAt": "2026-01-15T12:00:00.000Z",
    "updatedAt": "2026-01-15T12:00:00.000Z"
  }
}
```

**400** Bad request - validation error

**401** Unauthorized - missing or invalid authentication

**403** Forbidden - insufficient permissions

**500** Internal server error

---

## Get setting

`GET /settings/{key}`

- Auth: Bearer token
- Operation ID: `getSettingByKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `key` | path | string | yes |  |

### Example request

```bash
curl https://core-staging.coinbax.com/api/v1/settings/<key> \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

### Responses

**200** Retrieved

---

## Update setting

`PUT /settings/{key}`

- Auth: Bearer token
- Operation ID: `updateSetting`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `key` | path | string | yes |  |

### Example request

```bash
curl -X PUT https://core-staging.coinbax.com/api/v1/settings/<key> \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

### Responses

**200** Updated

---

## List global settings

`GET /global-settings`

- Auth: Bearer token
- Operation ID: `listGlobalSettings`

### Example request

```bash
curl https://core-staging.coinbax.com/api/v1/global-settings \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

### Responses

**200** Retrieved

---

## Update settings bulk

`POST /global-settings/bulk`

- Auth: Bearer token
- Operation ID: `updateGlobalSettingsBulk`

### Example request

```bash
curl -X POST https://core-staging.coinbax.com/api/v1/global-settings/bulk \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

### Responses

**200** Updated
