What is the Public API?
The Public API lets you trigger Granite automations from anywhere:- Webhooks from other services
- Cron jobs and schedulers
- CI/CD pipelines
- Custom applications
- Integrations
How It Works
Quick Example
Key Concepts
Endpoints
Custom URLs for your automations
API Keys
Authentication credentials
Invocation
How to call your endpoints
URL Structure
| Part | Example | Description |
|---|---|---|
org-slug | acme-corp | Your organization’s slug |
endpoint-slug | generate-report | The endpoint you created |
Authentication
All API requests require an API key:Response Modes
- Asynchronous
- Synchronous
Default behavior - returns immediately with a run ID:Poll for status later.
Common Use Cases
| Use Case | Example |
|---|---|
| Scheduled reports | Cron triggers daily report generation |
| Webhook handling | Process incoming data from another service |
| CI/CD integration | Run tests or deployments |
| Form processing | Handle submitted data |
| Data sync | Keep systems in sync |
Rate Limits
| Plan | Limit |
|---|---|
| Free | 100 requests/hour |
| Pro | 1,000 requests/hour |
| Enterprise | Custom |
Security Best Practices
Use HTTPS only
Use HTTPS only
All Granite API endpoints use HTTPS. Never downgrade.
Rotate keys periodically
Rotate keys periodically
Create new keys and deprecate old ones every 90 days.
Use separate keys per integration
Use separate keys per integration
If one is compromised, only that integration is affected.
Monitor usage
Monitor usage
Check Analytics for unexpected patterns.