API overview

Key API patterns for integrating with FastCP workflows.

On this page

Authentication

Authenticate and receive a token for subsequent requests:

curl -X POST http://localhost:2019/fastcp/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"myuser","password":"mypass"}'

List websites

curl http://localhost:2019/fastcp/sites \
  -H "Authorization: Bearer <token>"

Create website

curl -X POST http://localhost:2019/fastcp/sites \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com","site_type":"php"}'

Best practices

  • Use API tokens over TLS only.
  • Prefer explicit idempotent updates for automation scripts.
  • Log and monitor API error payloads for validation details.
  • Implement retries for transient network failures only.

Notes

API paths and payloads can evolve across releases. Pin your automation to tested versions and validate on staging before production rollouts.