Skip to main content

What is an Endpoint?

An endpoint is a public URL that triggers an automation. Anyone with the URL and an API key can run your automation.

Creating an Endpoint

1

Go to API Endpoints

Navigate to API Endpoints in the dashboard sidebar
2

Click Create

Click the + Create Endpoint button
3

Configure Endpoint

FieldDescriptionExample
NameHuman-readable name”Generate Monthly Report”
SlugURL pathgenerate-report
ProcessWhich process to runSelect from dropdown
MethodHTTP methodPOST (recommended)
4

Save

Click CreateYour endpoint is now live!

Endpoint URL

Your endpoint URL follows this pattern:
https://api.getgranite.ai/api/{org-slug}/{endpoint-slug}
Example:
https://api.getgranite.ai/api/acme-corp/generate-report

Defining Parameters

Endpoints can accept parameters. Define them in the endpoint configuration:
{
  "parameters": {
    "month": {
      "type": "string",
      "required": true
    },
    "year": {
      "type": "number",
      "required": true
    },
    "format": {
      "type": "string",
      "default": "pdf"
    }
  }
}
Callers pass parameters in the request body:
curl -X POST "https://api.getgranite.ai/api/acme-corp/generate-report" \
  -H "X-Granite-API-Key: gk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "month": "January",
    "year": 2024,
    "format": "pdf"
  }'

Endpoint Settings

SettingDescription
EnabledToggle endpoint on/off
Rate LimitMax requests per minute
TimeoutMax wait time (for sync calls)
HITL ModeRequire human approval?

HITL for API Endpoints

API endpoints typically run without HITL for full automation. Be careful what you expose.
Options:
ModeBehavior
NoneFully automated, no pauses
SensitivePauses on risky actions
AllPauses on every action

Testing Endpoints

Test directly from the dashboard:
  1. Open the endpoint details
  2. Fill in test parameters
  3. Click Test
  4. View the response

Editing Endpoints

To modify an endpoint:
  1. Go to API Endpoints
  2. Click the endpoint name
  3. Click Edit
  4. Make changes
  5. Click Save
Changing the slug creates a new URL. Old URLs will stop working.

Deleting Endpoints

To remove an endpoint:
  1. Go to API Endpoints
  2. Click the menu
  3. Select Delete
  4. Confirm
Deletion is immediate. Any systems using the endpoint will fail.

Best Practices

Good: generate-monthly-sales-report Bad: endpoint1
If you might change behavior, include version: v1-generate-report, v2-generate-report
Add descriptions to each parameter so users know what to pass.
Thoroughly test endpoints before giving out the URL.

Next Steps