{
  "openapi": "3.0.3",
  "info": {
    "title": "@net.info/net-info",
    "description": "\nEnable location-based experiences, security and analytics with city-level ip geolocation information, \nincluding latitude, longitude, time zone, postal code, and more.\n\nTo learn more about this service visit [docs.hyphen.ai](https://docs.hyphen.ai)\n",
    "version": "3.6.6"
  },
  "components": {
    "schemas": {}
  },
  "paths": {
    "/ip": {
      "get": {
        "summary": "get your ip info",
        "tags": [
          "ip address"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^org_[a-fA-F0-9]{24}$"
            },
            "in": "query",
            "name": "organizationId",
            "required": false,
            "description": "The organization Id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully got user IP info",
            "headers": {
              "X-Cache": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "HIT",
                    "MISS"
                  ]
                },
                "description": "The cache status of the response."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Successfully got user IP info",
                  "properties": {
                    "ip": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "private",
                        "public"
                      ]
                    },
                    "location": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "lat": {
                          "type": "number"
                        },
                        "lng": {
                          "type": "number"
                        },
                        "postalCode": {
                          "type": "string"
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "geonameId": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "country",
                        "region",
                        "city",
                        "lat",
                        "lng",
                        "postalCode",
                        "timezone",
                        "geonameId"
                      ]
                    }
                  },
                  "required": [
                    "ip",
                    "type"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Bad Request",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 400,
                    "error": "Bad Request",
                    "message": "Invalid IP Address"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 403,
                    "error": "Forbidden",
                    "message": "Forbidden"
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 404,
                    "error": "Not Found",
                    "message": "IP Address not found: ::1"
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 500,
                    "error": "Internal Server Error",
                    "message": "Unable to lookup Ip: ::1"
                  },
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "get bulk ip info",
        "tags": [
          "ip address"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "The IP address."
                },
                "uniqueItems": true,
                "minItems": 1,
                "maxItems": 100
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^org_[a-fA-F0-9]{24}$"
            },
            "in": "query",
            "name": "organizationId",
            "required": false,
            "description": "The organization Id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully get bulk IP info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Successfully get bulk IP info",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "ip": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "private",
                                  "public"
                                ]
                              },
                              "location": {
                                "type": "object",
                                "properties": {
                                  "country": {
                                    "type": "string"
                                  },
                                  "region": {
                                    "type": "string"
                                  },
                                  "city": {
                                    "type": "string"
                                  },
                                  "lat": {
                                    "type": "number"
                                  },
                                  "lng": {
                                    "type": "number"
                                  },
                                  "postalCode": {
                                    "type": "string"
                                  },
                                  "timezone": {
                                    "type": "string"
                                  },
                                  "geonameId": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "country",
                                  "region",
                                  "city",
                                  "lat",
                                  "lng",
                                  "postalCode",
                                  "timezone",
                                  "geonameId"
                                ]
                              }
                            },
                            "required": [
                              "ip",
                              "type"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "ip": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "enum": [
                                  "error"
                                ]
                              },
                              "errorMessage": {
                                "type": "string",
                                "description": "Error message"
                              }
                            },
                            "required": [
                              "ip",
                              "type",
                              "errorMessage"
                            ]
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Bad Request",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 400,
                    "error": "Bad Request",
                    "message": "Invalid IP Address"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 403,
                    "error": "Forbidden",
                    "message": "Forbidden"
                  },
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/ip/{ipAddress}": {
      "get": {
        "summary": "get ip info",
        "tags": [
          "ip address"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^org_[a-fA-F0-9]{24}$"
            },
            "in": "query",
            "name": "organizationId",
            "required": false,
            "description": "The organization Id."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "ipAddress",
            "required": true,
            "description": "The IP address."
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully got IP info",
            "headers": {
              "X-Cache": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "HIT",
                    "MISS"
                  ]
                },
                "description": "The cache status of the response."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Successfully got IP info",
                  "properties": {
                    "ip": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "private",
                        "public"
                      ]
                    },
                    "location": {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "city": {
                          "type": "string"
                        },
                        "lat": {
                          "type": "number"
                        },
                        "lng": {
                          "type": "number"
                        },
                        "postalCode": {
                          "type": "string"
                        },
                        "timezone": {
                          "type": "string"
                        },
                        "geonameId": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "country",
                        "region",
                        "city",
                        "lat",
                        "lng",
                        "postalCode",
                        "timezone",
                        "geonameId"
                      ]
                    }
                  },
                  "required": [
                    "ip",
                    "type"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Bad Request",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        400
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Bad Request"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 400,
                    "error": "Bad Request",
                    "message": "Invalid IP Address"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Forbidden",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        403
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Forbidden"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 403,
                    "error": "Forbidden",
                    "message": "Forbidden"
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Not Found",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        404
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Not Found"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 404,
                    "error": "Not Found",
                    "message": "IP Address not found: ::1"
                  },
                  "type": "object"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Internal Server Error",
                  "properties": {
                    "statusCode": {
                      "type": "number",
                      "enum": [
                        500
                      ]
                    },
                    "error": {
                      "type": "string",
                      "enum": [
                        "Internal Server Error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message."
                    }
                  },
                  "example": {
                    "statusCode": 500,
                    "error": "Internal Server Error",
                    "message": "Unable to lookup Ip: ::1"
                  },
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/ping": {
      "get": {
        "summary": "ping",
        "tags": [
          "system"
        ],
        "description": "Ping route to check server status",
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "pong": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "summary": "healthz",
        "tags": [
          "system"
        ],
        "description": "Health Check Route",
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://dev.net.info"
    }
  ]
}