Skip to main content
POST
/
api
/
organizations
/
{organization_id}
/
automations
/
endpoints
Create a custom automation endpoint
curl --request POST \
  --url https://api.getgranite.ai/api/organizations/{organization_id}/automations/endpoints \
  --header 'Content-Type: application/json' \
  --data '
{
  "slug": "<string>",
  "method": "<string>",
  "response_template": {},
  "request_schema": {},
  "rpa_run_id": "<string>",
  "parameter_mapping": {}
}
'
{
  "endpoint": {
    "endpoint_id": "<string>",
    "slug": "<string>",
    "method": "<string>",
    "response_template": {},
    "request_schema": {},
    "is_active": true,
    "created_at": "<string>",
    "updated_at": "<string>",
    "rpa_run_id": "<string>",
    "parameter_mapping": {}
  }
}

Path Parameters

organization_id
string
required

Body

application/json

Request to create a custom automation endpoint

slug
string
required

URL-friendly endpoint identifier

method
string
required

HTTP method (GET, POST, PUT, PATCH, DELETE)

response_template
Response Template · object
required

Response template JSON

request_schema
Request Schema · object

Request schema JSON

rpa_run_id
string | null

RPA run_id to link for automation execution

parameter_mapping
Parameter Mapping · object

Mapping of endpoint parameters to script parameters

Response

Successful Response

Response containing a single endpoint

endpoint
EndpointInfo · object
required

Endpoint information