---
agentTools:
  projectIndex: https://docs.metamap.com/llms.txt
---

# Phone Risk

Use this API to assess a user's behavioral risk through their phone number

> 📘 This API Requires a Webhook URL
>
> Go [here](https://docs.metamap.com/docs/configure-your-webhook-url) for more information on setting up a webhook listener.

This API returns a risk score based on a user's supplied phone number.

The request body can also include metadata so you can use your own internal references to identify your users and requests. Send metadata for every Webhook. The metadata should have a maximum size of ≦4Kb and be only one level deep.

[block:embed]
{
  "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fgnz1auOMV_s&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dgnz1auOMV_s&image=http%3A%2F%2Fi.ytimg.com%2Fvi%2Fgnz1auOMV_s%2Fhqdefault.jpg&key=7788cb384c9f4d5dbbdbeffd9fe4b92f&type=text%2Fhtml&schema=youtube\" width=\"854\" height=\"480\" scrolling=\"no\" title=\"YouTube embed\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\"></iframe>",
  "url": "https://www.youtube.com/watch?v=gnz1auOMV_s",
  "favicon": "https://www.google.com/favicon.ico",
  "image": "http://i.ytimg.com/vi/gnz1auOMV_s/hqdefault.jpg",
  "provider": "youtube.com",
  "href": "https://www.youtube.com/watch?v=gnz1auOMV_s",
  "typeOfEmbed": "youtube"
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Safety Checks",
    "version": "1.4"
  },
  "servers": [
    {
      "url": "https://api.prod.metamap.com/safety/v1/checks"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/phone/risk": {
      "post": {
        "summary": "Phone Risk",
        "description": "Use this API to assess a user's behavioral risk through their phone number",
        "operationId": "phone-risk",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "recipient",
                  "callbackUrl"
                ],
                "properties": {
                  "recipient": {
                    "type": "string",
                    "description": "User's phone number. Enter the phone number as a numerical string with no delimiters, such as \".\", \"(\", \")\", or \"-\"."
                  },
                  "callbackUrl": {
                    "type": "string",
                    "description": "Callback URL to receive the risk assessment score."
                  },
                  "metadata": {
                    "type": "string",
                    "description": "Metadata to be sent to a webhook (`callbackUrl`)",
                    "default": "{ \"user-defined-1\" : \"abcde\", \"user-defined-2\" : \"12345\" }",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Very High Risk": {
                    "value": "{\n  \"error\": null,\n  \"data\": {\n    \"phoneNumber\": \"00000000000\",\n    \"countryCode\": \"7\",\n    \"phoneType\": \"Mobile\",\n    \"phoneTypeStatus\": \"Allowed\",\n    \"riskLevel\": \"very-high\",\n    \"riskInsights\": [\n      {\n        \"name\": \"high-risk irregular activity\",\n        \"description\": \"Highest-risk category, based on past behavior.\",\n        \"impact\": \"Negative\",\n        \"type\": \"Category\"\n      },\n      {\n        \"name\": \"no range activity\",\n        \"description\": \"Very little activity, or none at all, for a risky range that this number belongs to over the past 90 days. Also returned if the number does not belong to a risky range.\",\n        \"impact\": \"Positive\",\n        \"type\": \"Automation to human activity\"\n      },\n      {\n        \"name\": \"no activity\",\n        \"description\": \"Very little activity, or none at all, was ever observed on this number. Very short tenure. Cannot classify.\",\n        \"impact\": \"Neutral\",\n        \"type\": \"Human to human activity\"\n      }\n    ],\n    \"riskScore\": 80,\n    \"maxPossibleRiskScore\": 100,\n    \"recommendation\": \"block\",\n    \"timezone\": \"+2\",\n    \"lineType\": \"MOBILE\",\n    \"carrier\": \"Vimpel Communications\",\n    \"location\": {\n      \"city\": \"Moscow\",\n      \"state\": null,\n      \"zip\": null,\n      \"metroCode\": null,\n      \"county\": null,\n      \"country\": \"Russia\"\n    }\n  },\n  \"metadata\": { \n  \t\"user_defined\": \"id00000\"\n  } \n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {},
                    "data": {
                      "type": "object",
                      "properties": {
                        "phoneNumber": {
                          "type": "string",
                          "example": "00000000000"
                        },
                        "countryCode": {
                          "type": "string",
                          "example": "7"
                        },
                        "phoneType": {
                          "type": "string",
                          "example": "Mobile"
                        },
                        "phoneTypeStatus": {
                          "type": "string",
                          "example": "Allowed"
                        },
                        "riskLevel": {
                          "type": "string",
                          "example": "very-high"
                        },
                        "riskInsights": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "high-risk irregular activity"
                              },
                              "description": {
                                "type": "string",
                                "example": "Highest-risk category, based on past behavior."
                              },
                              "impact": {
                                "type": "string",
                                "example": "Negative"
                              },
                              "type": {
                                "type": "string",
                                "example": "Category"
                              }
                            }
                          }
                        },
                        "riskScore": {
                          "type": "integer",
                          "example": 80,
                          "default": 0
                        },
                        "maxPossibleRiskScore": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "recommendation": {
                          "type": "string",
                          "example": "block"
                        },
                        "timezone": {
                          "type": "string",
                          "example": "+2"
                        },
                        "lineType": {
                          "type": "string",
                          "example": "MOBILE"
                        },
                        "carrier": {
                          "type": "string",
                          "example": "Vimpel Communications"
                        },
                        "location": {
                          "type": "object",
                          "properties": {
                            "city": {
                              "type": "string",
                              "example": "Moscow"
                            },
                            "state": {},
                            "zip": {},
                            "metroCode": {},
                            "county": {},
                            "country": {
                              "type": "string",
                              "example": "Russia"
                            }
                          }
                        }
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "user_defined": {
                          "type": "string",
                          "example": "id00000"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --location --request POST 'https://api.getmati.com/safety/v1/checks/phone/risk' \\\n--header 'Authorization: Bearer <access_token>' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n\"recipient\": \"000000000000\",\n\"callbackUrl\": \"https://some.webhook.url\",\n\"metadata\": {\t\"user_defined\": \"id00000\" }\n}'"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "652e955c23085a002d2bf03c:652e955c23085a002d2bf0b5"
}
```