Last updated on 2nd April 2026

Create a global config file via API

This method allows you to create a new global config file template at the account level.

Tip: You can explore and test this endpoint interactively using our OpenAPI documentation.

URL

/global_config_files

HTTP Method

POST

Supported Parameters

  • path - The full path to the file starting from the root of the deployed area (required)
  • body - The contents of the file, which may include %VARIABLE% placeholders (required)
  • description - A description of the config file template (optional)
  • build - Whether the config file should be available during the build pipeline (optional, defaults to true)

Example cURL Request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user your-email@example.com:your-api-key \
-X POST \
-d '{
  "config_file": {
    "path": "config/database.yml",
    "body": "production:\n  adapter: mysql2\n  host: %DB_HOST%",
    "description": "Standard database configuration",
    "build": false
  }
}' \
https://test.deployhq.com/global_config_files

Example Response

{
  "identifier": "df8966fe-e161-4517-98e2-24f79102dd62",
  "description": "Standard database configuration",
  "path": "config/database.yml",
  "body": "production:\n  adapter: mysql2\n  host: %DB_HOST%",
  "build": false
}