Webhooks
Last updated
Last updated
This endpoint makes an HTTP GET request to retrieve a list of webhooks from the team.
Request Body This request does not require a request body.
Method: GET
Endpoint: https://api.creatopy.com/v1/webhooks
curl --location 'https://api.creatopy.com/v1/webhooks' \
--header 'Authorization: Bearer eyJ...'
Response Body
response
(object)
id
(number): The webhook id.
name
(string): The name of the webhook.
webhookUrl
(string): The URL of the webhook.
createdAt
(date): webhook creation date.
createdByUser
(object)
id
(number): The unique identifier of the user who creates the webhook.
name
(string): The name of the user who creates the webhook.
actions (array)
actionId
(number): The action ID was added to the webhook.
createdAt
(Date): The date
createdByUser
(object)
id
(number): The id of the user who added the action to the webhook.
name
(string): The user's name who added the action to the webhook.
action
(object)
name
: the added action name.
description
: the added action description
This endpoint allows you to create a new team webhook.
Method: POST
Endpoint: https://api.creatopy.com/v1/webhooks
Body:
name
(string, required): The name of the webhook.
url
(string, required): The URL of the webhook.
actions
(array, required): The selected actions to add to webhook (for. ex: [1, 2, 4])
The response will be in JSON format with the following structure:
name
(string) - The name of the webhook.
id
(int) - The id of the webhook.
webhookUrl
(string) - The URL of the webhook.
actions
(array)
actionId
(number) - the id of the action
createdAt
(date) - the date when action was added to the webhook
createdByUser
(object)
id
(number) - the user's ID who added the action to the webhook
name
(string) - the user's name who added the action to the webhook
action
(object)
id
(number) - the action ID added to the webhook
name
(string) - the name of the action added to the webhook
description
(string) - the description of the action added to the webhook
config
(string) - some config of the action added to the webhook
createdAt
(Date) - the date when the action was created
createdAt
(Date) - the date when the webhook was created
createdByUser
(object)
id
(number) - the ID of the user who created the webhook
name
(string) - the name of the user who created the webhook
{
"response": {
"name": "Webhook name",
"id": 1111111,
"webhookUrl": "https://webhookurl.webhook.com",
"actions": [
{
"actionId": 12,
"createdAt": "2024-10-03T08:36:56.978Z",
"createdByUser": {
"id": 12345,
"name": "User name"
}
"action" {
"id": 1,
"name": "comment/create",
"description": " Comment created",
"config": null,
"createdAt": "2024-10-03T08:36:56.978Z"
}
}
...
]
"createdAt": "2024-10-03T08:36:56.978Z",
"createdByUser": {
"id": 12345,
"name": "User name"
}
}
}
This endpoint allows you to delete a team webhook.
Method: DELETE
Endpoint: https://api.creatopy.com/v1/webhooks
Body:
webhookId
(integer, required): The id of the team webhook.
The response will be in JSON format:
{
"response": true
}
This endpoint allows you to update an existing team webhook.
Method: PUT
Endpoint: https://api.creatopy.com/v1/webhooks
Body:
webhookId
(integer, required): The webhook id
name
(string, optional): The new name of the webhook.
url
(string, optional): The new URL of the webhook.
actions
(array, optional): The newly selected actions to add to webhook (for. ex: [1, 2, 4])
The response will be in JSON format with the following structure:
name
(string) - The name of the webhook.
id
(int) - The id of the webhook.
webhookUrl
(string) - The URL of the webhook.
actions
(array)
actionId
(number) - the id of the action
createdAt
(date) - the date when action was added to the webhook
createdByUser
(object)
id
(number) - the user's ID who added the action to the webhook
name
(string) - the user's name who added the action to the webhook
action
(object)
id
(number) - the action ID added to the webhook
name
(string) - the name of the action added to the webhook
description
(string) - the description of the action added to the webhook
config
(string) - some config of the action added to the webhook
createdAt
(Date) - the date when the action was created
createdAt
(Date) - the date when the webhook was created
createdByUser
(object)
id
(number) - the ID of the user who created the webhook
name
(string) - the name of the user who created the webhook