SimplyFill.

Environment Promotion

Deploy templates across dev, staging, and production.

Environment Promotion

Templates can be promoted between environments for safe rollouts and testing.

Environments

EnvironmentPurpose
developmentDefault for new templates, unlimited generations
stagingTesting with production-like data
productionLive traffic, rate-limited

Promotion Workflow

Copy the full promotion sequence:

curl (dev → staging → prod promotion)
# 1. Upload in development (default)
curl -X POST https://api.simplyfill.app/v1/templates/upload \
-H "Authorization: Bearer $SIMPLYFILL_DEV_KEY" \
-F "file=@w4.pdf"
# → { "id": 42, "default_environment": "development", ... }

# 2. Promote to staging
curl -X POST https://api.simplyfill.app/v1/templates/42/promote \
-H "Authorization: Bearer $SIMPLYFILL_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "from": "development", "to": "staging", "version": 1 }'

# 3. Promote to production
curl -X POST https://api.simplyfill.app/v1/templates/42/promote \
-H "Authorization: Bearer $SIMPLYFILL_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "from": "staging", "to": "production", "version": 1 }'

Or, step-by-step (annotated):

# 1. Upload in development (default)
curl -X POST /templates -F "file=@w4.pdf"
# → {"id": 42, "environment": "development"}

# 2. Test in development
curl -X POST /generate -d '{"template_id": 42, "data": {...}}'

# 3. Promote to staging
curl -X POST /templates/42/promote -d '{"target_environment": "staging"}'
# → {"message": "Promoted to staging"}

# 4. Test in staging
curl -X POST /generate -d '{"template_id": 42, "data": {...}}' \
  -H "X-Environment: staging"

# 5. Promote to production
curl -X POST /templates/42/promote -d '{"target_environment": "production"}'

Best Practices

  • Always test in staging before production
  • Use environment-scoped API keys with appropriate permissions
  • Templates maintain their ID across environments

Rollback

Promote a previous version to rollback:

curl -X POST /templates/42/promote -d '{"target_environment": "production"}'
# Re-promotes the same template (idempotent)

On this page