# Set App Config
## Endpoint
`/api/apps/config/set`
## Obsolete Path
`/api/apps/setConfig`
## Method
POST (`application/x-www-form-urlencoded`)
## Description
Saves the provided DNS application config into the `dnsApp.config` file in the application folder.
## Authentication
Required. Session token from `login` or `createToken`.
## Permissions
Apps: Modify
## Parameters
| token | string | Yes | No | The session token generated by the `login` or the `createToken` call. Passed as a query parameter in the URL. |
| name | string | Yes | No | The name of the app to set the config for. Passed as a query parameter in the URL. |
| config | string | Yes | No | The configuration data to save. Sent in the POST body as a URL-encoded form field (`config=query-string-encoded-config-data`). |
## Response Fields
| response | object | Empty object on success. |
## Conditional Logic Notes
- The response body is an empty object (`{}`) on success. There is no confirmation payload beyond `"status": "ok"`.
- The obsolete path `/api/apps/setConfig` is still supported but deprecated. New implementations should use `/api/apps/config/set`.
- This endpoint uses "Apps: Modify" permission, which is a different (lower) tier than the install/uninstall endpoints that require "Apps: Delete".
## Edge Cases
- **This is a POST request with `application/x-www-form-urlencoded` content type.** This is different from most other API calls which use GET with query parameters, and different from the install/update endpoints which use multipart form data.
- The `token` and `name` parameters are passed as URL query parameters, while the `config` data is sent in the POST body as a form-encoded field.
- The config data must be query-string-encoded (URL-encoded) in the POST body. The raw format is `config=<encoded-data>`.
- The format and content of the config data is application-specific and not validated by the API itself -- it is opaque string data passed through to the app's `dnsApp.config` file.