Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Sink Test resource


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


Test Properties

test-properties page anchor
Property nameTypeRequiredPIIDescriptionChild properties
resultstring

Optional

Not PII

Feedback indicating whether the test event was generated.


Create a SinkTest resource

create-a-sinktest-resource page anchor

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

Initiates a test event on a Sink.

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
sidSID<DG>
required

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

Pattern: ^DG[0-9a-fA-F]{32}$Min length: 34Max length: 34
Create Sink TestLink to code sample: Create Sink Test
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createSinkTest() {
11
const sinkTest = await client.events.v1
12
.sinks("DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.sinkTest.create();
14
15
console.log(sinkTest.result);
16
}
17
18
createSinkTest();

Response

Note about this response
1
{
2
"result": "submitted"
3
}