Update a webhook endpoint
PATCH
/v1/webhook-endpoints/{webhook_endpoint_id}
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.feitpay.com/v1/webhook-endpoints/example"
payload := strings.NewReader("{ \"url\": \"https://example.com\", \"description\": \"example\", \"enabled_events\": [ \"example\" ], \"status\": \"enabled\" }")
req, _ := http.NewRequest("PATCH", url, payload)
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(res) fmt.Println(string(body))
}const url = 'https://api.feitpay.com/v1/webhook-endpoints/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com","description":"example","enabled_events":["example"],"status":"enabled"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.feitpay.com/v1/webhook-endpoints/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com", "description": "example", "enabled_events": [ "example" ], "status": "enabled" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”webhook_endpoint_id
required
string
Header Parameters
Section titled “Header Parameters”Gryphem-Organization
string
Active organization for dashboard sessions. Ignored for API keys (the key determines the organization).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
string format: uri
description
string
enabled_events
Array<string>
status
string
Responses
Section titled “Responses”Updated.
Media typeapplication/json
object
id
required
string
object
required
string
livemode
required
boolean
url
required
string
description
required
string
enabled_events
required
Array
store_id
required
string | null
status
required
string
secret_last4
required
string | null
secret_rotated_at
required
string | null format: date-time
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{ "object": "webhook_endpoint", "enabled_events": [ "payment_intent.created" ], "status": "enabled"}Missing or invalid credentials.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Authenticated but not permitted.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Resource not found (or not visible to this tenant).
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Validation failed.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Too many requests. See Retry-After.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
request_id
required
string
Example
{ "error": { "type": "invalid_request_error" }}Headers
Section titled “Headers”Retry-After
integer