OpenAPI operations
Update a project template
PATCH
/v1/templates/{id}
const url = 'https://api.hooks.events/v1/templates/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","provider":"example","targetType":"example","targetLabel":"example","destinationName":"example","testEventType":"example","fields":[{"key":"example","label":"example","type":"text","required":true,"secret":true,"sourceSecret":true,"placeholder":"example","help":"example"}],"filters":{"additionalProperty":"example"},"config":{"additionalProperty":"example"},"urlTemplate":"example","bodyTemplate":"example","auth":{"additionalProperty":"example"},"headers":{"additionalProperty":"example"},"setup":["example"]}'};
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.hooks.events/v1/templates/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "provider": "example", "targetType": "example", "targetLabel": "example", "destinationName": "example", "testEventType": "example", "fields": [ { "key": "example", "label": "example", "type": "text", "required": true, "secret": true, "sourceSecret": true, "placeholder": "example", "help": "example" } ], "filters": { "additionalProperty": "example" }, "config": { "additionalProperty": "example" }, "urlTemplate": "example", "bodyTemplate": "example", "auth": { "additionalProperty": "example" }, "headers": { "additionalProperty": "example" }, "setup": [ "example" ] }'Requires the endpoints:write scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
description
string
provider
string
targetType
string
targetLabel
string
destinationName
string
testEventType
string
fields
Array<object>
object
key
required
string
label
required
string
type
required
string
required
required
boolean
secret
boolean
sourceSecret
boolean
placeholder
string
help
string
filters
object
key
additional properties
config
object
key
additional properties
urlTemplate
string
bodyTemplate
string
auth
object
key
additional properties
headers
object
key
additional properties
string
setup
Array<string>
Responses
Section titled “Responses”Success
Media typeapplication/json
Source→target template
object
key
additional properties
Example generated
{ "additionalProperty": "example"}Validation error
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
string
requestId
required
Request id, also echoed in x-request-id
string
key
additional properties
Example generated
{ "error": { "code": "example", "message": "example", "requestId": "example" }}Missing or invalid credentials
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
string
requestId
required
Request id, also echoed in x-request-id
string
key
additional properties
Example generated
{ "error": { "code": "example", "message": "example", "requestId": "example" }}The credential lacks the required scope, or the workspace is not writable
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
string
requestId
required
Request id, also echoed in x-request-id
string
key
additional properties
Example generated
{ "error": { "code": "example", "message": "example", "requestId": "example" }}Resource not found
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
string
requestId
required
Request id, also echoed in x-request-id
string
key
additional properties
Example generated
{ "error": { "code": "example", "message": "example", "requestId": "example" }}Rate limited
Media typeapplication/json
object
error
required
object
code
required
Machine-readable error code
string
message
required
string
requestId
required
Request id, also echoed in x-request-id
string
key
additional properties
Example generated
{ "error": { "code": "example", "message": "example", "requestId": "example" }}Headers
Section titled “Headers”X-RateLimit-Limit
integer
Requests allowed per window
X-RateLimit-Remaining
integer
X-RateLimit-Reset
integer
Seconds until the window resets