API Documentation
Hooks
Actions
Edit by Id
PUT
/
rest
/
actions
/
{id}
Copy
curl --request PUT \
--url https://copilotz.com/rest/actions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Your Action Name",
"description": "Your Action Description",
"specType": "openapi3-yaml",
"moduleUrl": "https://example.com/modules/sendTemplate.js",
"spec": "openapi: 3.0.0\ninfo:\n title: Send Template API\npaths:\n /sendTemplate:\n post:\n summary: Send a template message\n ..."
}'
Copy
{
"name": "Send Template Message",
"description": "Send templated messages to WhatsApp users.",
"specType": "openapi3-yaml",
"moduleUrl": "https://example.com/modules/sendTemplate.js",
"spec": "openapi: 3.0.0\ninfo:\n title: Send Template API\npaths:\n /sendTemplate:\n post:\n summary: Send a template message\n ..."
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Body
application/json
Request payload for creating or updating an action.
Response
200 - application/json
Successful response
Response containing action details.
Copy
curl --request PUT \
--url https://copilotz.com/rest/actions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Your Action Name",
"description": "Your Action Description",
"specType": "openapi3-yaml",
"moduleUrl": "https://example.com/modules/sendTemplate.js",
"spec": "openapi: 3.0.0\ninfo:\n title: Send Template API\npaths:\n /sendTemplate:\n post:\n summary: Send a template message\n ..."
}'
Copy
{
"name": "Send Template Message",
"description": "Send templated messages to WhatsApp users.",
"specType": "openapi3-yaml",
"moduleUrl": "https://example.com/modules/sendTemplate.js",
"spec": "openapi: 3.0.0\ninfo:\n title: Send Template API\npaths:\n /sendTemplate:\n post:\n summary: Send a template message\n ..."
}
Assistant
Responses are generated using AI and may contain mistakes.