- listEventTypes - List all available event types that can be subscribed to.
- list - List all webhooks configured for the account.
- create - Create a new webhook for the account.
- get - Get details of a specific webhook.
- update - Update an existing webhook.
- disable - Disable a webhook. Disabled webhooks will no longer receive events.
- ping - Send a test ping to a webhook to verify it is configured correctly.
- getSecret - Get the secret key for verifying webhook payloads.
List all available event types that can be subscribed to.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.ListEventTypesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
ListEventTypesResponse res = sdk.webhooks().listEventTypes()
.call();
if (res.eventTypes().isPresent()) {
System.out.println(res.eventTypes().get());
}
}
}
ListEventTypesResponse
| Error Type |
Status Code |
Content Type |
| models/errors/APIException |
4XX, 5XX |
*/* |
List all webhooks configured for the account.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.ListWebhooksResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
ListWebhooksResponse res = sdk.webhooks().list()
.call();
if (res.webhooks().isPresent()) {
System.out.println(res.webhooks().get());
}
}
}
ListWebhooksResponse
| Error Type |
Status Code |
Content Type |
| models/errors/APIException |
4XX, 5XX |
*/* |
Create a new webhook for the account.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.CreateWebhookValidationError;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.CreateWebhookResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws GenericError, CreateWebhookValidationError, Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
CreateWebhook req = CreateWebhook.builder()
.url("https://experienced-sailor.biz/")
.status(WebhookStatus.DISABLED)
.eventTypes(List.of())
.description("overdue bonnet failing")
.build();
CreateWebhookResponse res = sdk.webhooks().create()
.request(req)
.call();
if (res.webhook().isPresent()) {
System.out.println(res.webhook().get());
}
}
}
| Parameter |
Type |
Required |
Description |
request |
CreateWebhook |
✔️ |
The request object to use for the request. |
CreateWebhookResponse
| Error Type |
Status Code |
Content Type |
| models/errors/GenericError |
400, 409 |
application/json |
| models/errors/CreateWebhookValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Get details of a specific webhook.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetWebhookResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
GetWebhookResponse res = sdk.webhooks().get()
.webhookID("deeb5a05-74d4-40ad-b4be-a9265fd49428")
.call();
if (res.webhook().isPresent()) {
System.out.println(res.webhook().get());
}
}
}
| Parameter |
Type |
Required |
Description |
webhookID |
String |
✔️ |
N/A |
GetWebhookResponse
| Error Type |
Status Code |
Content Type |
| models/errors/APIException |
4XX, 5XX |
*/* |
Update an existing webhook.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.UpdateWebhookValidationError;
import io.moov.sdk.models.operations.UpdateWebhookResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws GenericError, UpdateWebhookValidationError, Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
UpdateWebhookResponse res = sdk.webhooks().update()
.webhookID("954b566e-0c37-481b-bf92-6cdbd0e47dc0")
.updateWebhook(UpdateWebhook.builder()
.url("https://nimble-affect.name")
.status(WebhookStatus.ENABLED)
.eventTypes(List.of())
.description("hmph eyeglasses pink stylish blah")
.build())
.call();
if (res.webhook().isPresent()) {
System.out.println(res.webhook().get());
}
}
}
| Parameter |
Type |
Required |
Description |
webhookID |
String |
✔️ |
N/A |
updateWebhook |
UpdateWebhook |
✔️ |
N/A |
UpdateWebhookResponse
| Error Type |
Status Code |
Content Type |
| models/errors/GenericError |
400, 409 |
application/json |
| models/errors/UpdateWebhookValidationError |
422 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Disable a webhook. Disabled webhooks will no longer receive events.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.DisableWebhookResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GenericError, Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
DisableWebhookResponse res = sdk.webhooks().disable()
.webhookID("c88929b3-cbb6-4144-923f-e9a5ba645708")
.call();
// handle response
}
}
| Parameter |
Type |
Required |
Description |
webhookID |
String |
✔️ |
N/A |
DisableWebhookResponse
| Error Type |
Status Code |
Content Type |
| models/errors/GenericError |
400, 409 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Send a test ping to a webhook to verify it is configured correctly.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.PingWebhookResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
PingWebhookResponse res = sdk.webhooks().ping()
.webhookID("87e0ecc6-d6c3-4eeb-99e8-6dbe9212a6a2")
.call();
if (res.pingResponse().isPresent()) {
System.out.println(res.pingResponse().get());
}
}
}
| Parameter |
Type |
Required |
Description |
webhookID |
String |
✔️ |
N/A |
PingWebhookResponse
| Error Type |
Status Code |
Content Type |
| models/errors/APIException |
4XX, 5XX |
*/* |
Get the secret key for verifying webhook payloads.
package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetWebhookSecretResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
GetWebhookSecretResponse res = sdk.webhooks().getSecret()
.webhookID("1fac81d6-2d5b-4180-8765-81282a450eda")
.call();
if (res.webhookSecret().isPresent()) {
System.out.println(res.webhookSecret().get());
}
}
}
| Parameter |
Type |
Required |
Description |
webhookID |
String |
✔️ |
N/A |
GetWebhookSecretResponse
| Error Type |
Status Code |
Content Type |
| models/errors/APIException |
4XX, 5XX |
*/* |