Solutions
worksection
beta
help
Creating a webhook via API: add_webhook
The add_webhook method can be executed using the administrative API key:
https://youraccount.worksection.com/api/admin/v2/?action=add_webhook&
url=<url>&events=<events>&http_user=<http_user>&http_pass=<http_pass>hash=HASH
or using an OAuth 2.0 token with scope = administrative:
curl -X GET -H "Authorization: Bearer <token_value>"
https://youraccount.worksection.com/api/oauth2?action=add_webhook& url=<url>&events=<events>&http_user=<http_user>&http_pass=<http_pass>
| PARAMETER | DESCRIPTION |
|---|---|
| url | (Required) Webhook URL |
| events | (Required) Events separated by commas, possible values: post_task, post_comment, post_project, update_task, update_comment, update_project, delete_task, delete_comment, close_task Selected events will send notifications to Webhook URL |
| projects | (Optional) Project IDs separated by commas If you want to limit the sending of events only for particular projects |
| http_user | (Optional) Username (if using basic access authentication) |
| http_pass | (Optional) Password (if using basic access authentication) |
Example of a successful response:
{
"status": "ok",
"id": 16
}Example of an unsuccessful response:
{
"status": "error",
"status_code": 11,
"message": "Url should respond 200 HTTP_CODE and JSON {status:OK}",
"message_details": "https://google.com"
}
Leave your review
Did this article help you?
Glad we could help! What was helpful?
Sorry this didn't help. What went wrong?