curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_webhook_endpoint \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"endpointId": "<string>",
"url": "<string>",
"name": "<string>",
"isActive": "<boolean>"
}
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateWebhookEndpoint({
endpointId: "<string> (Unique identifier of the webhook endpoint to update.)",
url: "<string> (Updated destination URL for webhook delivery.)",
name: "<string> (Updated human-readable name for this webhook endpoint.)",
isActive: true // Whether this webhook endpoint is active.
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"updateWebhookEndpointIntent": {
"endpointId": "<string>",
"url": "<string>",
"name": "<string>",
"isActive": "<boolean>"
}
},
"result": {
"updateWebhookEndpointResult": {
"endpointId": "<string>",
"webhookEndpoint": {
"endpointId": "<string>",
"organizationId": "<string>",
"url": "<string>",
"name": "<string>",
"isActive": "<boolean>",
"subscriptions": [
{
"eventType": "<string>",
"filtersJson": "<string>",
"isActive": "<boolean>"
}
]
}
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
Activities
Update webhook endpoint
Update a webhook endpoint for an organization.
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/update_webhook_endpoint \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"endpointId": "<string>",
"url": "<string>",
"name": "<string>",
"isActive": "<boolean>"
}
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().updateWebhookEndpoint({
endpointId: "<string> (Unique identifier of the webhook endpoint to update.)",
url: "<string> (Updated destination URL for webhook delivery.)",
name: "<string> (Updated human-readable name for this webhook endpoint.)",
isActive: true // Whether this webhook endpoint is active.
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPDATE_WEBHOOK_ENDPOINT",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"updateWebhookEndpointIntent": {
"endpointId": "<string>",
"url": "<string>",
"name": "<string>",
"isActive": "<boolean>"
}
},
"result": {
"updateWebhookEndpointResult": {
"endpointId": "<string>",
"webhookEndpoint": {
"endpointId": "<string>",
"organizationId": "<string>",
"url": "<string>",
"name": "<string>",
"isActive": "<boolean>",
"subscriptions": [
{
"eventType": "<string>",
"filtersJson": "<string>",
"isActive": "<boolean>"
}
]
}
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
A successful response returns the following fields:
Was this page helpful?