cURL
curl --request PUT \
--url https://api.pipedream.com/v1/connect/{project_id}/webhook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-pd-environment: <x-pd-environment>' \
--data '
{
"url": "<string>"
}
'import { PipedreamClient } from "@pipedream/sdk";
const client = new PipedreamClient({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET",
projectEnvironment: "YOUR_PROJECT_ENVIRONMENT",
projectId: "YOUR_PROJECT_ID"
});
await client.projectEnvironment.updateWebhook({
url: "url"
});
from pipedream import Pipedream
client = Pipedream(
project_id="YOUR_PROJECT_ID",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
client.project_environment.update_webhook(
url="url",
)
package com.example.usage;
import com.pipedream.api.BaseClient;
import com.pipedream.api.resources.projectenvironment.requests.SetWebhookOpts;
public class Example {
public static void main(String[] args) {
BaseClient client = BaseClient.withCredentials("<clientId>", "<clientSecret>")
.projectId("YOUR_PROJECT_ID")
.build()
;
client.projectEnvironment().updateWebhook(
SetWebhookOpts
.builder()
.url("url")
.build()
);
}
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pipedream.com/v1/connect/{project_id}/webhook"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-pd-environment", "<x-pd-environment>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "<string>",
"url": "<string>",
"signing_key_set": true,
"created_at": 123,
"updated_at": 123,
"signing_key": "<string>"
}
}{
"error": "Throttled"
}Set project environment webhook
Create or update the webhook URL for a project environment. Creating a webhook returns signing_key; updating an existing webhook does not.
PUT
/
v1
/
connect
/
{project_id}
/
webhook
cURL
curl --request PUT \
--url https://api.pipedream.com/v1/connect/{project_id}/webhook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-pd-environment: <x-pd-environment>' \
--data '
{
"url": "<string>"
}
'import { PipedreamClient } from "@pipedream/sdk";
const client = new PipedreamClient({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET",
projectEnvironment: "YOUR_PROJECT_ENVIRONMENT",
projectId: "YOUR_PROJECT_ID"
});
await client.projectEnvironment.updateWebhook({
url: "url"
});
from pipedream import Pipedream
client = Pipedream(
project_id="YOUR_PROJECT_ID",
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
client.project_environment.update_webhook(
url="url",
)
package com.example.usage;
import com.pipedream.api.BaseClient;
import com.pipedream.api.resources.projectenvironment.requests.SetWebhookOpts;
public class Example {
public static void main(String[] args) {
BaseClient client = BaseClient.withCredentials("<clientId>", "<clientSecret>")
.projectId("YOUR_PROJECT_ID")
.build()
;
client.projectEnvironment().updateWebhook(
SetWebhookOpts
.builder()
.url("url")
.build()
);
}
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pipedream.com/v1/connect/{project_id}/webhook"
payload := strings.NewReader("{\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-pd-environment", "<x-pd-environment>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"id": "<string>",
"url": "<string>",
"signing_key_set": true,
"created_at": 123,
"updated_at": 123,
"signing_key": "<string>"
}
}{
"error": "Throttled"
}Pipedream signs webhook emits for deployed triggers using HMAC-SHA256. See Validating signatures for details on how to verify webhook payloads.
Authorizations
A short-lived OAuth access token for server-side requests. Generate one via the Generate OAuth Token flow or automatically when initializing the SDK client.
Headers
The environment in which the server client is running
Available options:
development, production Path Parameters
The project ID, which starts with proj_.
Pattern:
^proj_[a-zA-Z0-9]+$Body
application/json
Request options for setting a webhook URL
The webhook URL to set
Response
webhook updated
Response received when creating or updating a webhook
A webhook object that may include the signing key. The signing key is returned when a webhook is created, but omitted when an existing webhook is updated.
Show child attributes
Show child attributes
Was this page helpful?