---
title: "Create a platform config row"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a platform config row

Path: Nicer API › Company config

`POST /config/{type}`

URL: `https://api.nicer.travel/config/{type}`

Creates a platform-wide config row of the given type; AppVersion is the only one. An AppVersion row is the version gate of one app (versionCode, `web` for the web apps): `isUnderMaintenance` puts every user of that app on a maintenance screen and `requiresUpdate` asks the native app to update. A row that already exists is never overwritten. Only Nicer staff may create an AppVersion row; an agency admin gets 403.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `type` (`config.update.path.type`; string, required)

## Header parameters

- `x-nicer-company` (`config.update.header.x-nicer-company`; string, optional) — Company context for an agency admin who belongs to several companies. Optional when the caller belongs to one.

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.config.update({
  "type": "string"
});
```

### Nicer CLI

```bash
nicer config update --type 'string'
```

### cURL

```bash
curl --request POST \
  --url 'https://api.nicer.travel/config/<type>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/config/<type>';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/config/<type>"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "createdBy": "string",
  "isUnderMaintenance": true,
  "lastModifiedBy": "string",
  "requiresUpdate": true,
  "versionCode": "string",
  "type": "AppVersion",
  "createdAt": "string",
  "updatedAt": "string"
}
```

- `createdBy` (`config.update.response.200.createdBy`; string, required)
- `isUnderMaintenance` (`config.update.response.200.isUnderMaintenance`; boolean, required)
- `lastModifiedBy` (`config.update.response.200.lastModifiedBy`; string, required)
- `requiresUpdate` (`config.update.response.200.requiresUpdate`; boolean, required)
- `versionCode` (`config.update.response.200.versionCode`; string, required)
  - minLength: `1`
- `type` (`config.update.response.200.type`; string, required)
- `createdAt` (`config.update.response.200.createdAt`; string, required)
- `updatedAt` (`config.update.response.200.updatedAt`; string, required)

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`config.update.response.400.errorCode`; string, required)
- `errorMessage` (`config.update.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`config.update.response.401.errorCode`; string, required)
- `errorMessage` (`config.update.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`config.update.response.403.errorCode`; string, required)
- `errorMessage` (`config.update.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Company-config/config.update/index.md
