Create a profile role updates webhook subscription

Creates a webhook subscription that fires when a profile role transitions between lifecycle states. Specify initial_state_and_substate and/or target_state_and_substate to scope the subscription. If neither is provided, the endpoint is notified on every role state change.

The payload POSTed to your URL has the following shape:

{
  "role_id": "6385bdd4976a7719120108ed",
  "profile_id": "6385bdd4976a7719120108e9",
  "context_id": "6385bb46976a771912003e6a",
  "previous_state_and_substate": "prospect::engaged",
  "state_and_substate": "applicant::submitted"
}

Request body parameters:

Parameter Type Description
subscription.url string Required. The HTTPS endpoint Full Fabric will POST to.
subscription.initial_state_and_substate string Only fire when transitioning from this state (e.g. prospect::engaged). Optional.
subscription.target_state_and_substate string Only fire when transitioning to this state (e.g. applicant::submitted). Optional.
Body
required
application/json
  • context_id
    Type: string

    ID of the class or course the role belongs to.

  • previous_state_and_substate
    Type: string

    Lifecycle state before the transition (e.g. prospect::engaged).

  • profile_id
    Type: string

    ID of the profile whose role was updated.

  • role_id
    Type: string

    ID of the role that transitioned.

  • state_and_substate
    Type: string

    Lifecycle state after the transition (e.g. applicant::submitted).

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/apis/profiles/roles/transitions/webhooks/subscriptions
curl https://school.fullfabric.cloud/apis/profiles/roles/transitions/webhooks/subscriptions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'FF-Auth: YOUR_SECRET_TOKEN' \
  --data '{
  "role_id": "6385bdd4976a7719120108ed",
  "profile_id": "6385bdd4976a7719120108e9",
  "context_id": "6385bb46976a771912003e6a",
  "previous_state_and_substate": "prospect::engaged",
  "state_and_substate": "applicant::submitted"
}'
{
  "id": "689c6f6f9a52af7e57a109f6",
  "initial_state_and_substate": "prospect::engaged",
  "target_state_and_substate": "applicant::submitted",
  "url": "https://crm.primrose.edu/webhooks/ff-role-updates"
}