🔵Initialize Custom Action

POST https://api.anunzi.net/v2/actions/initialize

Initialize a previously created custom action by providing its unique action_id. You can also dynamically assign variables to the action.


Body Parameters

Parameter
Type
Required
Description

action_id

string

Yes

The unique ID of the action to initialize.

variables

array of objects

No

Key-value pairs of dynamic variables to be assigned during initialization.

Variables Object

Parameter
Type
Required
Description

key

string

Yes

The name of the variable.

value

string

Yes

The value assigned to the variable.


Example Request (cURL)

curl --request POST \
     --url https://api.anunzi.net/v2/actions/initialize \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'Authorization: Bearer API_KEY' \
     --data '
{
  "action_id": "515615123123x15616515",
  "variables": [
    {"key": "customer_name", "value": "David"},
    {"key": "appointment_date", "value": "2024-03-28"}
  ]
}
'

Example Response (200 OK)

{
  "status": "success",
  "response": {
    "answer": "Action initialized."
  }
}

Status Codes

Code
Description

200

Action initialized successfully.

400

Bad Request. Invalid or missing parameters.

Última actualización

¿Te fue útil?