Skip to content

Creates or updates an inbound webhook that adds or removes the resolved user from a set of spaces and courses when it is called.

Pass id to update an existing hook; the stored running_count is carried over rather than reset. Submitted course_ids, space_ids, remove_course_ids and remove_space_ids are filtered against real records, and course ids are discarded entirely when the course_module feature is off.

Endpoint

  • Method: POST

  • Path: /admin/webhooks

  • Edition: PRO

  • Controller: ProAdminController@saveWebhook

  • Route source: fluent-community-pro/app/Http/Routes/api.php:51

  • Controller source: fluent-community-pro/app/Http/Controllers/ProAdminController.php

  • Requires the FluentCommunity community-admin permission (or a WordPress super admin).

  • Requires FluentCommunity Pro.

Live sample

The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.

POST Save Webhook

POST
/admin/webhooks

Creates or updates an inbound webhook that adds or removes the resolved user from a set of spaces and courses when it is called.

Controller: ProAdminController@saveWebhook
Route source: fluent-community-pro/app/Http/Routes/api.php:51

Authorizations

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Request Body

application/json
JSON
{
  
"title": "string",
  
"course_ids": [
  
  
"string"
  
],
  
"space_ids": [
  
  
"string"
  
],
  
"remove_course_ids": [
  
  
"string"
  
],
  
"remove_space_ids": [
  
  
"string"
  
],
  
"send_wp_welcome_email": "string",
  
"id": "string"
}

Responses

Successful response

application/json
JSON
{
  
"message": "string",
  
"webhook": {
  
  
"created_at": "string",
  
  
"id": 0,
  
  
"meta_key": "string",
  
  
"object_type": "string",
  
  
"updated_at": "string",
  
  
"value": {
  
  
  
"course_ids": [
  
  
  
  
0
  
  
  
],
  
  
  
"remove_course_ids": [
  
  
  
  
{
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
],
  
  
  
"remove_space_ids": [
  
  
  
  
{
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
],
  
  
  
"send_wp_welcome_email": "string",
  
  
  
"space_ids": [
  
  
  
  
0
  
  
  
],
  
  
  
"title": "string"
  
  
},
  
  
"webhook_url": "string"
  
}
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation