Skip to main content
POST
/
actions
/
rpc
Make an RPC call to an action
curl --request POST \
  --url https://api.stackone.com/actions/rpc \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'x-account-id: <x-account-id>' \
  --data '
{
  "action": "create_employee",
  "path": {
    "id": "123"
  },
  "query": {
    "debug": false
  },
  "headers": {
    "Content-Type": "application/json"
  },
  "body": {
    "data": "example"
  },
  "defender_enabled": true,
  "defender_config": {
    "enabled": true,
    "block_high_risk": false,
    "use_tier1_classification": true,
    "use_tier2_classification": true
  }
}
'
"<unknown>"

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

x-account-id
string
required

The account identifier

Query Parameters

sync
boolean | null

When true, the action result is written to the datasync index and the response includes datasync metadata

Example:

false

run_id
string | null

Run ID to associate with the sync operation. Only relevant when sync=true.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json
action
string
required

The action to execute

Example:

"create_employee"

path
object

Path parameters for the action

Example:
{ "id": "123" }
query
object

Query parameters for the action

headers
object

Headers for the action

Example:
{ "Content-Type": "application/json" }
body
object

Request body for the action

Example:
{ "data": "example" }
defender_enabled
boolean | null
deprecated

Override the account-level defender enabled setting for this request. Deprecated: use defender_config instead.

Example:

true

defender_config
object

Per-request defender configuration. Takes precedence over defender_enabled and project settings.

Response

Action response. When sync=true, the response is wrapped with a datasync metadata field.