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

# Ping the device to force it to report.

Sends a high priority ping to the specified device. This behavior tries to wakeups the device and force it to reports to the platform.


# 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": {
    "/behaviors/{imei}/ping": {
      "post": {
        "summary": "Ping the device to force it to report.",
        "tags": [
          "Behaviors"
        ],
        "parameters": [
          {
            "name": "imei",
            "in": "path",
            "required": true,
            "description": "IMEI of the device",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Send ping result",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "taskId": {
                          "type": "string",
                          "description": "The task identifier for the ping behavior."
                        }
                      }
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ]
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "success": true,
                      "message": "ok",
                      "result": {
                        "taskId": "1e937f98-3e2d-4423-bcbb-711b3a6cf6d2"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "The specified resource was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "success": false,
                      "message": "Device Not Found"
                    }
                  },
                  "example-2": {
                    "value": {
                      "success": false,
                      "message": "Ping behavior not found for device"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        },
        "operationId": "send-ping-behavior",
        "description": "Sends a high priority ping to the specified device. This behavior tries to wakeups the device and force it to reports to the platform.\n"
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "imei",
          "description": "IMEI of device",
          "in": "path",
          "required": true
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "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": "Behaviors",
      "description": "Device behaviors management"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ]
}
```