Mutation
mutation CreateWebhookTarget($input: CreateWebhookTargetInput!) {
createWebhookTarget(input: $input) {
webhookTarget {
id
url
description
eventSubscriptions {
eventType
}
version
isEnabled
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"url": "string",
"eventSubscriptions": [
{
"eventType": "string"
}
],
"isEnabled": true,
"description": "string"
}
}Response
{
"data": {
"createWebhookTarget": {
"webhookTarget": {
"id": "id",
"url": "string",
"description": "string",
"eventSubscriptions": [
{
"eventType": "string"
}
],
"version": "string",
"isEnabled": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createWebhookTarget
Register a new HTTP endpoint to receive Plain webhook events. You must specify the URL, a human-readable description, the webhook schema version to pin to, whether deliveries should start immediately, and the list of event types to subscribe to. Use subscriptionEventTypes to discover valid event type identifiers. Requires the webhookTarget:create permission.
MUTATION
createWebhookTarget(input: CreateWebhookTargetInput!): CreateWebhookTargetOutput!Arguments
input
required
Returns
webhookTarget
error
Mutation
mutation CreateWebhookTarget($input: CreateWebhookTargetInput!) {
createWebhookTarget(input: $input) {
webhookTarget {
id
url
description
eventSubscriptions {
eventType
}
version
isEnabled
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"url": "string",
"eventSubscriptions": [
{
"eventType": "string"
}
],
"isEnabled": true,
"description": "string"
}
}Response
{
"data": {
"createWebhookTarget": {
"webhookTarget": {
"id": "id",
"url": "string",
"description": "string",
"eventSubscriptions": [
{
"eventType": "string"
}
],
"version": "string",
"isEnabled": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

