Skip to main content
POST
/
api
/
v2
/
public
/
config
curl -X POST "https://app.refold.ai/api/v2/public/config" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{ "slug": "{slug}" }'
{
  "slug": "hubspot",
  "config_id": "user_12345",
  "field_errors": [],
  "fields": [
    { "id": "699fec7a5bd27ed2af7243ad", "name": "Select", "field_type": "select", "required": false }
  ],
  "workflows": [
    { "id": "699d8648a81ba363578cc2f4", "name": "Sync Contacts", "description": "Sync contacts to HubSpot", "enabled": true }
  ]
}
Get or create the config (app installation) for an app on a linked account. If a config already exists it is returned; otherwise a new one is created. The config_id defaults to the linked account ID. Only slug is required. With just a slug, this installs the config’s field and workflow skeleton (the app’s definitions, with default values) — it does not need any field values up front. You can optionally seed workflows (enable/disable) and labels in the body. Field values are normally set afterward via Update Config Field Value, which is the reliable way to populate them.
Multiple configs per account. Omit config_id to manage the single default config (its ID is the linked account ID). Pass a custom config_id (e.g. production, staging) to create and manage additional named configs for the same linked account and app. Each is retrieved with Get Config by ID and all are returned by List Config IDs.

Authentication

Configs are scoped to a linked account via the linked_account_id header.
x-api-key
string
required
Your Refold API key. Find it in Settings → Credentials.
linked_account_id
string
required
The linked account to install the config for.

Body Parameters

slug
string
required
The app slug to install. This is the only required field. Example: hubspot
config_id
string
A custom ID to create/manage a distinct named config for this account+app (e.g. production). Omit it to use the single default config (ID = the linked account ID).
workflows
array
Workflows to enable or disable at install, each { "id": "...", "enabled": true }.
labels
object
Arbitrary key/value labels for the config.
fields
array
Optional initial field definitions, each { "id": "...", "value": ... }. Field values are more reliably set after install via Update Config Field Value.

Response

slug
string
The app slug.
config_id
string
The config ID.
fields
array
Configurable fields (see Get All Config Fields).
workflows
array
Workflows in the config, each {id, name, description, enabled}.
field_errors
array
Any datasource resolution errors.
{
  "slug": "hubspot",
  "config_id": "user_12345",
  "field_errors": [],
  "fields": [
    { "id": "699fec7a5bd27ed2af7243ad", "name": "Select", "field_type": "select", "required": false }
  ],
  "workflows": [
    { "id": "699d8648a81ba363578cc2f4", "name": "Sync Contacts", "description": "Sync contacts to HubSpot", "enabled": true }
  ]
}
curl -X POST "https://app.refold.ai/api/v2/public/config" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{ "slug": "{slug}" }'