Skip to main content
POST
/
api
/
v1
/
actions
Create action
curl --request POST \
  --url https://api.elemente.ai/api/v1/actions \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Order checking",
  "description": "checking  customer order status",
  "waitingMessage": "Hold on while i check your order",
  "method": "GET",
  "url": "https://api.elemente.ai/order-phone-number?phone={phone}",
  "headers": [
    {
      "key": "X-Shopify-Access-Token",
      "value": "{{shopify-access-key}}"
    }
  ],
  "queryParams": [
    {
      "key": "phone",
      "value": "{phone}"
    }
  ],
  "inputVariables": [
    {
      "name": "phone",
      "description": "Phone number",
      "required": true,
      "dataType": "string"
    }
  ]
}'

Authorizations

Authorization
string
header
required

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

Body

application/json

Input data for creating a action

description
string | null
required

Order checking

Example:

"checking customer order status"

waitingMessage
string | null
required

Waiting message

Example:

"Hold on while i check your order"

method
string | null
required

Order checking

Example:

"GET"

url
string | null
required

Order checking

Example:

"https://api.elemente.ai/order-phone-number?phone={phone}"

headers
string[] | null
required

Order checking

Example:
[
{
"key": "X-Shopify-Access-Token",
"value": "{{shopify-access-key}}"
}
]
queryParams
string[] | null
required

Order checking

Example:
[{ "key": "phone", "value": "{phone}" }]
inputVariables
string[] | null
required

Order checking

Example:
[
{
"name": "phone",
"description": "Phone number",
"required": true,
"dataType": "string"
}
]
name
string

Order checking

Example:

"Order checking"

Response

action created successfully