Skip to main content

Remote Config - Parameter Create

Endpoint

/i/remote-config/add-parameter

Overview

Creates a remote config parameter document for the app.

Authentication

Countly API supports three authentication methods:

  1. api_key=YOUR_API_KEY
  2. auth_token=YOUR_AUTH_TOKEN
  3. countly-token: YOUR_AUTH_TOKEN

Permissions

Requires remote_config Create permission.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)API key for authentication.
auth_tokenStringNoAuth token as query parameter or countly-token header.
app_idStringYesApp id.
parameterString (JSON Object)YesParameter object payload.

Parameter Structure (parameter)

FieldTypeRequiredDescription
parameter_keyStringYesMust match ^[a-zA-Z_][a-zA-Z0-9_]*$.
default_valueAnyYesDefault value used when no condition matches.
statusStringNoDefaults to Running when omitted.
conditionsArrayNoCondition-value list for this parameter.
_idString/ObjectIdNoOptional id for internal insertion paths.

Configuration Impact

SettingDefaultAffectsUser-visible impact
remote-config.maximum_allowed_parameters2000Validation limitCreate fails once app reaches parameter limit.
remote-config.conditions_per_paramaeters20Validation limitCreate fails when parameter has too many conditions.

Response

Success Response

{}

Response Fields

No fields are returned on success for this endpoint.

Error Responses

  • 400
{
"result": "Invalid parameter: parameter_key"
}
  • 400
{
"result": "Invalid parameter: default_value"
}
  • 500
{
"result": "The parameter already exists"
}
  • 500
{
"result": "Maximum parameters limit reached"
}
  • 500
{
"result": "Maximum conditions limit reached"
}

Behavior/Processing

  • Parses parameter JSON string.
  • Sets status to Running when missing.
  • Builds valuesList from default value and condition values.
  • Stores ts timestamp on parameter record.
  • Emits system log action: rc_parameter_created.

Database Collections

CollectionUsed forData touched by this endpoint
countly_out.remoteconfig_parameters{appId}Parameter storageValidates duplicates/limits and inserts parameter document.
countly.systemlogsAudit trailReceives rc_parameter_created action.

Examples

Create a parameter

/i/remote-config/add-parameter?api_key=YOUR_API_KEY&app_id=6991c75b024cb89cdc04efd2&parameter={"parameter_key":"button_color","default_value":"#FF5722","description":"Checkout button color"}

Limitations

  • parameter must be valid JSON string.
  • Parameter key must be unique per app.

Last Updated

2026-03-05