Menu

Expand
Rate this page:

Sink Test Resource

The Sink Test Resource creates a test event. This test gives you a simple way to publish to yourself and programatically ensure that your Sink is ready to receive events.

To create an active Kinesis Sink, you'll need to complete the following steps. Webhook Sinks are active by default but you can choose to validate them if you would like to. The steps in bold are handled using the Sink Test Resource:

  1. Create a new Sink Resource. The status of Kinesis Sinks will be initialized by default. The status of Webhook Sinks will be active by default.
  2. Create a Sink Test resource using your new Sink. This will publish a test event to your Sink, confirming that you've set up your Sink properly.
  3. Check your Sink to see if the Test event was successfully published.
  4. If the test was successful, retrieve the test_id and create a Sink Validate Resource. This will let Twilio know that you successfully configured the Sink, and will toggle the Sink state to active

SinkTest properties

Resource Properties in REST API format
result
string Not PII

Feedback indicating whether the test event was generated.

Create a SinkTest resource

post
https://events.twilio.com/v1/Sinks/{Sid}/Test

Initiates a test event on a Sink. Once a Test Event has been initiated, the Sink status property will be set to Validating.

If a Test event is initiated twice then the most recent test event will take precedence and the first Test event will no longer be valid.

Parameters
Parameters in REST API format
sid
Path
post sid<DG> Not PII

A 34 character string that uniquely identifies the Sink to be Tested.

Example 1
Loading Code Sample...
        
        

        Create Sink Test

        Rate this page:

        Need some help?

        We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

        Loading Code Sample...
              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              thanks-feedback-gif