OpenAPI operations
Update a shared transformation
PATCH
/v1/transformations/{id}
const url = 'https://api.hooks.events/v1/transformations/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","code":"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/transformations/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "code": "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
code
string
Example generated
{ "name": "example", "code": "example"}Responses
Section titled “Responses”Success
Media typeapplication/json
Workspace transformation shared by destinations
object
id
required
string
name
required
string
code
required
Sandboxed JavaScript source defining transform(event)
string
createdAt
required
ISO-8601 timestamp
string
updatedAt
required
ISO-8601 timestamp
string
key
additional properties
Example generated
{ "id": "example", "name": "example", "code": "example", "createdAt": "example", "updatedAt": "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