/{customerId}/webhooks/subscriptions/{subscriptionId}/test

Enables you to send a test event to a your listener endpoint. This helps you verify that events are being delivered as expected.

This endpoint supports the following methods:

  • POST

POST

Description

Sends a test notification for a webhooks subscription. Webhook subscriptions specify the event types that trigger near real-time notifications: when one of these events occurs, a webhooks notification is sent to a listener endpoint created and maintained by the organization associated with the subscription.

Base URL

The base URL for this endpoint is your Identity Cloud API URL, including the appropriate region. For example, if you are in the US region, then your base URL will look like this:

https://v1.api.us.janrain.com

If you are in the Australian (AU) region your base URL will look like this:

https://v1.api.au.janrain.com 

URL path parameters

Parameter

Type

Required

Description

{customerId}

UUID

Yes

Unique identifier of the organization (customer) associated with the webhooks subscription being tested. For example:

9bc867ed-1f10-420f-8d90-398fde4e4779

{subscriptionId}

UUID

Yes

Unique identifier of the webhooks subscription being tested. For example:

454fe969-1909-4e93-b552-674d47eafdb0

Request Parameters

No request parameters are needed to call this endpoint.

Authentication

This endpoint requires token-based authentication. To obtain an access token, you must use a confidential client (using the client ID as the username and the client secret as the password) to access the /{customer_id}}/login/token endpoint. The access token returned from that endpoint is then used in the Authorization header of your API call. For example, if you get back the access token 03v-eeodppPrrHXXIx56pRLyDBaOldDxqEwI59MFCFGVuSkLRapzgmfwmEHyKWle then your Authorization header will look like this when using Curl:

-H 'Authorization: Bearer 03v-eeodppPrrHXXIx56pRLyDBaOldDxqEwI59MFCFGVuSkLRapzgmfwmEHyKWle'

In Postman, set the Authorization Type to Bearer and use the access token as the value of the Token field.

Sample Request (curl)

The following command sends a test event (entityCreated) to the webhooks subscription with the ID 454fe969-1909-4e93-b552-674d47eafdb0:


curl -X POST \
  https://v1.api.us.janrain.com/9bc867ed-1f10-420f-8d90-398fde4e4779/webhooks/subscriptions/454fe969-1909-4e93-b552-674d47eafdb0/test \
  -H 'Authorization: Bearer Xk7EzdpGq5GPQcsxCWM2SxdlwU_iTsA4i2Px4TEzBrfLIvddjnDVBJxjPDuCARHH' 

Responses

202 Accepted

If your call to this endpoint succeeds, you won’t get back a full API response; instead, you'll get back a 202 Accepted status code.

Error Response Codes

The following table includes information about some of the other response codes that you might encounter when calling this endpoint.

Response Code

Description

403

Forbidden. You do not have permission to access the requested resource.

404

Not found. The specified customer and/or the specific webhooks subscription could not be found.