# callWebHook

### Parameters

1. url - The url of the teams or slack channel, see the video to learn how to get a WebHook url.

{% embed url="<https://youtu.be/HhvS3Gbuaxg>" %}

2\. the message you want to send. That depends on the service, you want to post to. here are some examples for Microsoft Teams(<https://docs.microsoft.com/de-de/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using>), but it can be as easy as seen in exampel 1

### Example Usages

Plain text message

```javascript
   brixxApi.callWebHook(myUrl, {
      text: "Hello World"
   });
```

full styled message with actions

```javascript
   brixxApi.callWebHook(myUrl, {
      "@type": "MessageCard",
      "@context": "http://schema.org/extensions",
      "themeColor": "006E7E",
      "summary": "A new message from brixxbox",
      "sections": [{
         "activityTitle": "![TestImage](https://47a92947.ngrok.io/Content/Images/default.png)A new message from brixxbox",
         "activitySubtitle": "Volkers Sandbox",
         "activityImage": "https://teamsnodesample.azurewebsites.net/static/img/image5.png",
         "facts": [{
            "name": "Assigned to",
            "value": app.userId
        }],
        "markdown": true
      }],
      "potentialAction": [{
         "@type": "ActionCard",
         "name": "Add a comment",
         "inputs": [{
            "@type": "TextInput",
            "id": "comment",
            "isMultiline": false,
            "title": "Add a comment here for this task"
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Add comment",
            "target": "http://..."
        }]
      }, {
        "@type": "ActionCard",
        "name": "Set due date",
        "inputs": [{
            "@type": "DateInput",
            "id": "dueDate",
            "title": "Enter a due date for this task"
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Save",
            "target": "http://..."
        }]
      }, {
        "@type": "ActionCard",
        "name": "Change status",
        "inputs": [{
            "@type": "MultichoiceInput",
            "id": "list",
            "title": "Select a status",
            "isMultiSelect": "false",
            "choices": [{
                "display": "In Progress",
                "value": "1"
            }, {
                "display": "Active",
                "value": "2"
            }, {
                "display": "Closed",
                "value": "3"
            }]
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Save",
            "target": "http://..."
        }]
      }]
   });
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brixxbox.gitbook.io/brixxbox-documentation/client-api-reference/functions/callwebhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
