POST
/
api
/
v1
/
actions
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

The body is of type object.

Response

201

action created successfully