Skip to main content
POST
/
webhooks
/
create
cURL
curl -X POST "https://api.swoogo.com/api/v1/webhooks/create" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "name=Registrant Updates&webhook_group_id=1&trigger_object=registrant&trigger_on_insert=1&trigger_on_update=1&url=https://example.com/webhooks/registrant&content_type=json"
{
  "name": "Sample Webhook",
  "url": "https://www.example.com/webhook",
  "trigger_object": "registrant",
  "group_id": 123,
  "headers": [
    {
      "key": "Authentication",
      "value": "Bearer Token"
    }
  ],
  "trigger_on_insert": true,
  "trigger_on_update": true,
  "trigger_on_delete": false,
  "public_user": false,
  "admin_user": true,
  "api_call": true,
  "all_fields": false,
  "any_event": false,
  "use_default_fields": true,
  "enabled": true,
  "event_ids": [
    1,
    2,
    3
  ],
  "fields": [
    "value"
  ],
  "content_type": "json",
  "notes": "This webhook is for test purposes.",
  "post_field_data": [
    "id",
    "value"
  ],
  "custom_fields": [
    {
      "key": "event_id",
      "type": "registrant",
      "value": "event_id"
    }
  ]
}

Authorizations

Authorization
string
header
required

OAuth 2.0 bearer token obtained from POST /oauth2/token. Tokens expire after 30 minutes. Include in the Authorization header as Bearer {access_token}.

Body

application/x-www-form-urlencoded
name
string
required

The name of the webhook.

Example:

"Sample Webhook"

url
string
required

The URL that data should be sent to.

Example:

"https://www.example.com/webhook"

trigger_object
enum<string>
required

The object that will cause the webhook to trigger.

Available options:
event,
contact,
registrant,
speaker,
sponsor,
session,
session_attendance,
registrant_line_item
Example:

"registrant"

group_id
integer

Identifier for the webhook group.

headers
object[]

Array of headers for the webhook.

Example:
[
{
"key": "Authentication",
"value": "Bearer Token"
}
]
trigger_on_insert
boolean

Trigger the webhook when the object is inserted.

Example:

true

trigger_on_update
boolean

Trigger the webhook when the object is updated.

Example:

true

trigger_on_delete
boolean

Trigger the webhook when the object is deleted.

Example:

false

public_user
boolean

Run the webhook for public users.

Example:

false

admin_user
boolean

Run the webhook for admin users.

Example:

true

api_call
boolean

Trigger the webhook during an API call.

Example:

true

all_fields
boolean

Run the webhook for changes to all fields.

Example:

false

any_event
boolean

Run the webhook for any event.

Example:

false

use_default_fields
boolean

Use default fields for the webhook.

Example:

true

enabled
boolean

Indicates whether the webhook is enabled.

Example:

true

event_ids
integer[]

List of event IDs to trigger the webhook.

Example:
[1, 2, 3]
fields
object[]

Array of fields to trigger the webhook when changed.

Example:
["value"]
content_type
enum<string>

The content type for webhook payloads.

Available options:
json,
post
Example:

"json"

notes
string

Additional notes for the webhook.

Example:

"This webhook is for test purposes."

post_field_data
enum<string>[]

Fields to include in the webhook POST data.

Available options:
id,
value
Example:
["id", "value"]
custom_fields
object[]

Custom fields for the webhook (type unspecified).

Example:
[
{
"key": "event_id",
"type": "registrant",
"value": "event_id"
}
]

Response

Create Object

name
string
required

The name of the webhook.

Example:

"Sample Webhook"

url
string
required

The URL that data should be sent to.

Example:

"https://www.example.com/webhook"

trigger_object
enum<string>
required

The object that will cause the webhook to trigger.

Available options:
event,
contact,
registrant,
speaker,
sponsor,
session,
session_attendance,
registrant_line_item
Example:

"registrant"

group_id
integer

Identifier for the webhook group.

headers
object[]

Array of headers for the webhook.

Example:
[
{
"key": "Authentication",
"value": "Bearer Token"
}
]
trigger_on_insert
boolean

Trigger the webhook when the object is inserted.

Example:

true

trigger_on_update
boolean

Trigger the webhook when the object is updated.

Example:

true

trigger_on_delete
boolean

Trigger the webhook when the object is deleted.

Example:

false

public_user
boolean

Run the webhook for public users.

Example:

false

admin_user
boolean

Run the webhook for admin users.

Example:

true

api_call
boolean

Trigger the webhook during an API call.

Example:

true

all_fields
boolean

Run the webhook for changes to all fields.

Example:

false

any_event
boolean

Run the webhook for any event.

Example:

false

use_default_fields
boolean

Use default fields for the webhook.

Example:

true

enabled
boolean

Indicates whether the webhook is enabled.

Example:

true

event_ids
integer[]

List of event IDs to trigger the webhook.

Example:
[1, 2, 3]
fields
object[]

Array of fields to trigger the webhook when changed.

Example:
["value"]
content_type
enum<string>

The content type for webhook payloads.

Available options:
json,
post
Example:

"json"

notes
string

Additional notes for the webhook.

Example:

"This webhook is for test purposes."

post_field_data
enum<string>[]

Fields to include in the webhook POST data.

Available options:
id,
value
Example:
["id", "value"]
custom_fields
object[]

Custom fields for the webhook (type unspecified).

Example:
[
{
"key": "event_id",
"type": "registrant",
"value": "event_id"
}
]