Webhooks

get
Get Webhooks by Project

https://app.fuchsiacms.com/api/webhooks/project/:projectId
Query webhooks in a project
Request
Response
Request
Path Parameters
projectId
required
string
The project ID to get the webhooks from
Query Parameters
skip
optional
integer
The amount of webhooks to skip in the response. Use in conjunction with the take query parameter to form pagination. Default: 0
take
optional
integer
The amount of webhooks to return. Default: 20
search
optional
string
Filter the webhooks by their name
includeInactive
optional
boolean
If set to true, will return all webhooks, even inactive ones. Default: false
key
required
string
The project API key
Response
200: OK
List of webhooks
[
{
id: "string",
projectId: "string",
name: "string",
description: "string",
active: "boolean",
endpoint: "string",
method: "string",
headers: {
[key]: "string"
},
models: ["modelId"],
triggers: ["string"],
createdAt: "int64",
updatedAt: "int64"
}
]
400: Bad Request
Malformed Request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

get
Get Webhook

https://app.fuchsiacms.com/api/webhooks/webhook/:webhookId
Get one webhook object
Request
Response
Request
Path Parameters
webhookId
required
string
The ID of the webhook
Query Parameters
key
required
string
The project API key
Response
200: OK
One webhook object
{
id: "string",
projectId: "string",
name: "string",
description: "string",
active: "boolean",
endpoint: "string",
method: "string",
headers: {
[key]: "string"
},
models: ["modelId"],
triggers: ["string"],
createdAt: "int64",
updatedAt: "int64"
}
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

post
Create Webhook

https://app.fuchsiacms.com/api/webhooks/webhook
Create one webhook object
Request
Response
Request
Query Parameters
key
required
string
The project API key
Body Parameters
triggers
required
array
List of strings of triggers to be used to execute the webhook. Valid strings are: create, update, and delete.
models
required
array
List of model ID's that should be "watched" for triggering.
headers
optional
object
The headers to pass along to the endpoint when the webhook is triggered. Format of object should be map[string]string.
method
required
string
The HTTP method to use when the webhook is sent to the endpoint.
endpoint
required
string
The endpoint to hit when an action is triggered
active
optional
boolean
If the webhook is active or not
description
optional
string
The description of the webhook
name
required
string
The name of the webhook
projectId
required
string
The ID of the project
Response
200: OK
The newly created webhook object
{
id: "string",
projectId: "string",
name: "string",
description: "string",
active: "boolean",
endpoint: "string",
method: "string",
headers: {
[key]: "string"
},
models: ["modelId"],
triggers: ["string"],
createdAt: "int64",
updatedAt: "int64"
}
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

patch
Modify Webhook

https://app.fuchsiacms.com/api/webhooks/webhook
Modify one webhook object
Request
Response
Request
Query Parameters
key
required
string
The project API key
Body Parameters
triggers
optional
array
List of strings of valid triggers for the watched models. Valid values are: create, update, delete.
models
optional
array
List of strings of model ID's to watch for triggers.
headers
optional
object
Headers to be sent along with the webhook payload. Must be in the format of map[string]string
method
required
string
The method to use during a webhook trigger
endpoint
required
string
The endpoint to hit when the webhook is triggered
active
optional
boolean
If the webhook is active or not
description
optional
string
The description of the webhook
name
required
string
The name of the webhook
id
required
string
The ID of the webhook to modify
Response
200: OK
Count of the amount of webhook objects changed
1
400: Bad Request
Malformed request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"

delete
Delete Webhook

https://app.fuchsiacms.com/api/webhooks/webhook/:webhookId
Delete one webhook object. Warning: This is a destructive operation and is unrecoverable.
Request
Response
Request
Path Parameters
webhookId
required
string
The ID of the webhook
Query Parameters
key
required
string
The project API key
Response
200: OK
The ID of the successfully deleted webhook
"<Webhook ID>"
400: Bad Request
Malformed Request
"message"
401: Unauthorized
Invalid API key
"Invalid API key"