Skip to end of metadata
Go to start of metadata

Last Updated: Wednesday, November 17, 2021

Available API methods


Get a Callback

The following will retrieve a callback by its callback_id.

GET /companies/:company_key/config/callbacks/:callback_id

Request JSON

There is no Request JSON with a GET.

Return JSON

A callback entity.

Note: A 404 - Not Found error will be returned if the callback cannot be located.

List Callback

The following will list active and future callbacks.

GET /companies/:company_key/config/callbacks

Request JSON

There is no Request JSON with a GET.

Return JSON

An array of callback elements will be returned as follows.

[
   {
      "callback_id":"AB3423",        
      "callback_type":"person_added",
      "event_type":"person_added", //deprecated 
      "destination":{
         "url":"http://some.url",
         "method":"POST",
         "content_type":"application/json"
      },
      "start_date":"2017-01-01T00:00Z",
      "end_date":"2017-02-01T00:00Z",
      "url":"/companies/:company_key/config/callbacks/:callback_id",
      "created_at":"2017-04-05T14:30Z",
      "updated_at":"2017-05-08T19:30Z"
   }
]

Create a Callback

The following will create a new callback record.

POST /companies/:company_key/config/callbacks/

The callback_id, created_at, updated_at, and URL fields are not allowed. Any values will be ignored.

The destination_method, content_type, start_date, and end_date fields are optional.

Two callback registrations may not share an callback type if they have overlapping active date ranges.

Return JSON

A callback entity.

Note: An HTTP 201 - Created response will be returned if the object has been successfully created.

For information on how to create a specific callback, see Callback Configuration.

Delete a Callback

DELETE /companies/:company_key/config/callbacks/:callback_id

This will set the end date of the callback to now and change it to inactive. If the start date of the callback was in the future, it will change that to now as well.

Return JSON

A callback entity reflecting the new date ranges and active state.

Notes:
An HTTP 200 - OK will be returned if the operation completes successfully.
An HTTP 404 - Not Found error will be returned if the entity does not exist.

Create a Test Callback Event

POST /companies/:company_key/config/callback_events/test
{
  "callback_type": "person_added"
}
{
   "callback_type":"subscription_added",
   "event_type":"subscription_added", //deprecated
   "subscription":{
      "subscription_list":{
         "id":"my_list"
      }
   }
}
{
   "callback_type":"ack_participant_added",
   "event_type":"ack_participant_added", //deprecated
   "participant":{
      "acquisition_campaign":{
         "id":"my_campaign"
      }
   }
}


{
   "message":"Created event for event_type 'person_added'",
   "event_id":"AB234SDFD234"
}


{
   "errors":[
      {
         "message":"Callback registration not found."
      }
   ]
}

Returned Callback

Your callback endpoint will receive an event like the one shown below. It will contain the event_id returned in the response to the test request, and the details of the callback endpoint we are calling.

{
   "event_id":"AB234SDFD234",
   "callback_id":"C1234",     
   "callback_type":"person_added",
   "event_type":"person_added", //deprecated
   "event_date":"2017-02-15T15:42:23Z",
   "person":...
}
Notes:
An HTTP 201 - Created will be returned if the callback was queued for send.
An HTTP 404 - Not Found error will be returned if an active callback does not exist.
  • No labels

2 Comments

  1. Unknown User (nicholas.tolbert)

     /companies/:company_id/config/callback_events/test

     

       {"event_type": "ack_participant_added",

     

       "participant": {

     

           "acquisition_campaign": {

     

               "api_key": "abcefg"

     

           }

     

       }

     



  2. Unknown User (nicholas.tolbert)

    TEST CALLBACK EVENT:

    https://public-api.vibescm.com/companies/:COMPANY_KEY/config/callback_events/test

    {
     "event_type": "ack_participant_changed",
     "participant": {

                  "acquisition_campaign":
                               {"api_key": ":API_KEY"}
                }
    }