Configuration API

Manage your sendword configuration programmatically.

Export

GET /api/config/export

Returns the current configuration as a JSON object. Useful for backing up config or syncing across instances.

curl http://localhost:8080/api/config/export | jq .

Import

POST /api/config/import
Content-Type: application/json

Replace the running configuration with the provided JSON. The config is validated before applying.

curl -X POST http://localhost:8080/api/config/import \
  -H "Content-Type: application/json" \
  -d @config.json

Success response

{
  "status": "ok",
  "hooks": 5
}

Validation error

{
  "error": "validation failed",
  "details": [
    "hook 'deploy': duplicate slug",
    "hook 'notify': invalid executor type"
  ]
}