---
updatedAt: 2026-05-27T10:18:53.000Z
agentTools:
  projectIndex: https://gethapn.readme.io/llms.txt
---

# Get webhooks

This returns a list of all exisitng webhooks configured for the client.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "description": "The Hapn API is an HTTP interface for managing devices, accounts, and cloud data.",
    "version": "1.0.0",
    "title": "Hapn API",
    "termsOfService": "https://gethapn.com/terms",
    "contact": {
      "name": "Dev",
      "email": "developer@gethapn.com",
      "url": "http://gethapn.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "servers": [
    {
      "url": "https://api.iotgps.io/v1",
      "description": "Prod"
    },
    {
      "url": "https://api-dev.iotgps.io/v1",
      "description": "Dev"
    }
  ],
  "paths": {
    "/webhooks": {
      "get": {
        "summary": "Get webhooks",
        "tags": [
          "Webhooks"
        ],
        "operationId": "get-webhooks",
        "description": "This returns a list of all exisitng webhooks configured for the client.",
        "responses": {
          "200": {
            "description": "Got webhooks",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedSuccessResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "result": {
                          "type": "object",
                          "required": [
                            "items"
                          ],
                          "properties": {
                            "items": {
                              "type": "array",
                              "uniqueItems": true,
                              "minItems": 1,
                              "items": {
                                "$ref": "#/components/schemas/Webhook"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "success": true,
                      "message": "ok",
                      "result": {
                        "items": [
                          {
                            "subscription": "alerts",
                            "endpoint": "https://example.com/webhook1",
                            "clientId": 431,
                            "webhookId": "1c3174fb-1f63-4d89-b1f3-bd29d9550a2d",
                            "deliveryMethod": "SendAndForget"
                          },
                          {
                            "subscription": "messages",
                            "endpoint": "https://example.com/webhook2",
                            "clientId": 431,
                            "webhookId": "1e16f9a1-a692-4546-a11f-40951a0f60cf",
                            "deliveryMethod": "SendAndForget"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Webhook": {
        "description": "A webhook of events generated by the platform",
        "type": "object",
        "x-examples": {
          "example-1": {
            "subscription": "alerts",
            "endpoint": "https://www.example.com/myWebhookEndpoint",
            "clientId": 431,
            "webhookId": "1c3174fb-1f63-4d89-b1f3-bd29d9550a2d",
            "deliveryMode": "SendAndForget"
          }
        },
        "title": "",
        "properties": {
          "subscription": {
            "type": "string",
            "enum": [
              "messages",
              "messages.ack",
              "alerts.speeding",
              "alerts.sos",
              "alerts.lowBattery",
              "alerts.boundaryEntry",
              "alerts.boundaryExit",
              "alerts.movement",
              "alerts.ignitionOn",
              "alerts.ignitionOff",
              "alerts.tripStarted",
              "alerts.tripFinished",
              "alerts.tripExceedsDistance",
              "alerts.tripExceedsDuration",
              "alerts.stopExceedsDuration",
              "alerts.pluggedExternalPowerSource",
              "alerts.unpluggedExternalPowerSource",
              "alerts.deviceOnline",
              "alerts.deviceOffline",
              "alerts.harshAcceleration",
              "alerts.harshBraking",
              "alerts.harshTurning",
              "alerts.lightSensorTamperStart",
              "alerts.lightSensorTamperEnd",
              "device.behavior.confirmed",
              "device.behavior.canceled",
              "device.behavior.expired",
              "device.behavior.failed",
              "device.online",
              "device.offline.12h",
              "device.offline.24h",
              "device.active.nogpsfix.30min",
              "boundary.created",
              "boundary.updated",
              "boundary.deleted"
            ]
          },
          "endpoint": {
            "type": "string",
            "format": "uri"
          },
          "clientId": {
            "type": "number"
          },
          "webhookId": {
            "type": "string",
            "format": "uuid"
          },
          "deliveryMode": {
            "type": "string",
            "enum": [
              "SendAndForget",
              "WaitForAck"
            ]
          }
        },
        "required": [
          "endpoint",
          "subscription"
        ]
      },
      "PaginatedSuccessResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array"
              },
              "nextToken": {
                "type": "string"
              }
            },
            "required": [
              "items"
            ]
          }
        },
        "required": [
          "message",
          "success",
          "result"
        ],
        "x-examples": {
          "example-1": {
            "value": {
              "success": true,
              "message": "string",
              "result": {
                "items": [
                  {
                    "imei": "12345"
                  }
                ],
                "nextToken": "eyJzZW5kVGltZSI6IjIwMjEtMDgtMThUMTU6MTc6NTAuMDAwWiIsImNsaWVudElkIjo2MDY2MDksIm1lc3NhZ2VfaWQiOiI2ZTMwYzczMS1iMGNhLTQwMzgtYjY1Zi1kM2Y1NGZlMWQ0ZjUifQ=="
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "x-examples": {
          "example-1": {
            "value": {
              "success": false,
              "message": "Unauthorized"
            }
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "example-1": {
                "value": {
                  "success": false,
                  "message": "Unauthorized"
                }
              }
            }
          }
        }
      },
      "Error": {
        "description": "Server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "example-1": {
                "value": {
                  "success": false,
                  "message": "Error"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.usehapn.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Webhooks",
      "description": "Outgoing webhook of events"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ]
}
```