# Webhooks

### Get Started with Webhooks

You can use Cody to create and manage webhooks that let CodeWords connect with other apps and services.\
A webhook works like a trigger — whenever something happens in another app (like a form is submitted, a file is uploaded, or data changes), it can automatically start a CodeWords workflow.

Webhooks are useful when you want your workflow to react to new data instantly — for example, when a CRM update or external API call should launch an automation.\
They can also send data back once the workflow is finished, making them great for building API-style automations that process data and return results in real time.

### Authentication

No CodeWords API key is required as the webhook URL itself serves as authentication.\
Each webhook has a unique, hard-to-guess URL that acts as a secure access point so make sure to keep this URL private — anyone with the link can send data to your workflow.

### Technical Details

* Always deployed with `app="codewords"` and `trigger="webhook"` .
* Generates a unique CodeWords webhook URL.
* External systems POST JSON data directly to that URL.
* Designed to receive data from external systems and send event notifications as POST requests with a JSON payload.

### HTTP Method

CodeWords currently supports only POST [HTTP Request Methods](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods)

{% code title="Example of CodeWords Webhook URL" overflow="wrap" %}

```
https://runtime.codewords.ai/webhook/.../your_unique_id/your_workflow_webhook
```

{% endcode %}

Cody generates this URL for you when setting up the webhook. You don't need to construct it manually.

### Path

Each webhook gets a unique URL that looks like this:

{% code title="CodeWords webhook URL pattern" overflow="wrap" %}

```
https://runtime.codewords.ai/webhook/.../<unique_id>/<endpoint_name>
```

{% endcode %}

The URL contains a randomly generated unique ID that's hard to guess, making it secure by default. Keep this URL private — anyone with the link can send data to your workflow.

### Webhook Setup

{% stepper %}
{% step %}
**Creates a test webhook**

Cody generates a temporary webhook URL to understand the kind of data your external app or service will send.
{% endstep %}

{% step %}
**Connect your external system**

Add this test webhook URL in your app (like GitHub, Stripe, or any other service\*\*) and trigger a test event.
{% endstep %}

{% step %}
**Analyzes the incoming data**

Cody automatically inspects the payload sent by your system and learns its structure.
{% endstep %}

{% step %}
**Build the webhook service**

It then creates a new service with two endpoints that follow the webhook pattern — one for testing and one for production.
{% endstep %}

{% step %}
**Deploy the production webhook**

Cody launches the live webhook endpoint for real usage.
{% endstep %}

{% step %}
**Update your external system**

Replace the test URL with the production webhook URL in your external app to complete the setup.
{% endstep %}
{% endstepper %}

### FAQ

<details>

<summary>Which HTTP method does CodeWords support?</summary>

Currently, CodeWords supports only the POST method for webhooks. All data must be sent as a JSON payload.

</details>

<details>

<summary>Can a webhook return data after running a workflow?</summary>

Yes. Webhooks can send responses back once your workflow completes — perfect for creating API-style automations.

</details>

<details>

<summary>What can I connect using webhooks?</summary>

You can connect any system that can send HTTP POST requests from apps such as GitHub, Stripe, Google Forms, or custom APIs.

</details>

<details>

<summary>Is my webhook URL secure?</summary>

Yes. Each webhook URL includes a randomly generated unique ID, making it nearly impossible to guess. Just ensure you keep it private.

</details>

<details>

<summary>Can I test my webhook before going live?</summary>

Yes. Cody automatically creates a test webhook so you can verify the connection and review the data structure before deploying the production version.

</details>


---

# Agent Instructions: 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://docs.codewords.ai/apps-and-integrations/webhooks.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.
