---
agentTools:
  projectIndex: https://docs.developer.yelp.com/llms.txt
---

# Remove Phone Numbers

Remove outbound phone numbers.

These phone numbers will no longer be allowed to call consumer numbers.

Note: This endpoint is only required for legacy masked phone number leads before 16th April 2026

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Phone Number Management",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.yelp.com/v3/leads/"
    }
  ],
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://biz.yelp.com/oauth2/authorize",
            "tokenUrl": "https://api.yelp.com/oauth2/token/v3",
            "scopes": {
              "leads": "Access Yelp Leads on your behalf, including reading and responding to messages, and storing message data"
            }
          }
        }
      }
    },
    "examples": {
      "InvalidPhoneNumberFormat": {
        "description": "One or more phone numbers are in an invalid format",
        "value": {
          "error": {
            "code": "INVALID_FORMAT",
            "description": "One or more phone numbers provided are in an invalid format.",
            "invalid_phone_numbers": [
              "+1invalid",
              "12345"
            ]
          }
        }
      }
    },
    "schemas": {
      "PhoneNumbersDeleteRequest": {
        "type": "object",
        "properties": {
          "phone_numbers": {
            "type": "object",
            "properties": {
              "outbound": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 500,
                "description": "Outbound phone numbers to remove"
              }
            },
            "required": [
              "outbound"
            ]
          }
        },
        "required": [
          "phone_numbers"
        ]
      },
      "PhoneNumbersDeleteResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of outbound phone numbers after the operation"
          }
        },
        "required": [
          "total"
        ]
      },
      "RequestBodyValidationFailureResponse": {
        "type": "object",
        "title": "Request Body Validation Failure Response",
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "description"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The error code"
              },
              "description": {
                "type": "string",
                "description": "The description of the error"
              },
              "field": {
                "type": "string",
                "description": "The name of the field with the invalid value. This will be null when the error is caused due to a mandatory field missing from the body."
              }
            }
          }
        }
      },
      "PhoneNumbersError400Response": {
        "type": "object",
        "title": "Phone Number Error Response",
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "description"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The error code."
              },
              "description": {
                "type": "string",
                "description": "The description of the error."
              },
              "invalid_phone_numbers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of phone numbers that caused the error"
              }
            }
          }
        }
      },
      "RemovePhoneNumbersError400": {
        "description": "This error is returned when one of the provided phone numbers is invalid.\n\n| code  | description |\n| ------------- | ------------- |\n| INVALID_FORMAT  | One or more phone numbers provided are in an invalid format.  |\n",
        "content": {
          "application/json": {
            "examples": {
              "Invalid Format": {
                "$ref": "#/components/examples/InvalidPhoneNumberFormat"
              }
            },
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/PhoneNumbersError400Response"
                },
                {
                  "$ref": "#/components/schemas/RequestBodyValidationFailureResponse"
                }
              ]
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": [
        "leads"
      ]
    }
  ],
  "paths": {
    "/phone_numbers": {
      "get": {
        "tags": [
          "Phone Number Management"
        ],
        "summary": "Get Phone Numbers",
        "description": "Returns the configured outbound phone numbers. Includes the client's inbound phone number only when this capability is enabled for the client.\n\nOutbound phone numbers are allowed to call consumer phone numbers to reach customers, whereas the inbound phone number receives calls from consumers.\n\nNote: This endpoint is only required for legacy masked phone number leads before 16th April 2026\n",
        "operationId": "get-phone-numbers",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Number of phone numbers to return. By default, it will return 100. Maximum is 500.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset the list of returned phone numbers by this amount.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The phone numbers were returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumbersGetResponse"
                },
                "examples": {
                  "PhoneNumbersWithInboundField": {
                    "summary": "Example response when the capability is enabled for the client",
                    "value": {
                      "phone_numbers": {
                        "outbound": [
                          "+17379377505",
                          "+17379377506",
                          "+17379377507",
                          "+17379377508"
                        ],
                        "inbound": "+18005551234"
                      },
                      "limit": 100,
                      "offset": 0,
                      "total": 4
                    }
                  },
                  "PhoneNumbersWithoutInboundField": {
                    "summary": "Example response when the capability is disabled for the client",
                    "value": {
                      "phone_numbers": {
                        "outbound": [
                          "+17379377505",
                          "+17379377506",
                          "+17379377507",
                          "+17379377508"
                        ]
                      },
                      "limit": 100,
                      "offset": 0,
                      "total": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "The API key has either expired or doesn't have the required scopes to query this endpoint.\n\n| code  | description |\n| ------------- | ------------- |\n| UNAUTHORIZED_API_KEY  | The API key provided is not currently able to query this endpoint.  |\n| TOKEN_INVALID  | Invalid API key or authorization header.  |\n",
            "content": {
              "application/json": {
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "error": {
                        "code": "UNAUTHORIZED_API_KEY",
                        "description": "The API key provided is not currently able to query this endpoint."
                      }
                    }
                  },
                  "Invalid Token": {
                    "value": {
                      "error": {
                        "code": "TOKEN_INVALID",
                        "description": "Invalid API key or authorization header."
                      }
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "description"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "The error code."
                        },
                        "description": {
                          "type": "string",
                          "description": "The description of the error."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Authorization Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1phone_numbers/get/responses/401/content/application~1json/schema"
                },
                "examples": {
                  "Authorization Error": {
                    "value": {
                      "error": {
                        "code": "AUTHORIZATION_ERROR",
                        "description": "Authorization Error"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1phone_numbers/get/responses/401/content/application~1json/schema"
                },
                "examples": {
                  "Resource Not Found": {
                    "value": {
                      "error": {
                        "code": "NOT_FOUND",
                        "description": "Resource Not Found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "You have either exceeded your daily quota, or have exceeded the queries-per-second limit for this endpoint. Try reducing the rate at which you make queries.",
            "content": {
              "application/json": {
                "examples": {
                  "Rate limited": {
                    "value": {
                      "error": {
                        "code": "TOO_MANY_REQUESTS_PER_SECOND",
                        "description": "You have exceeded the queries-per-second limit for this endpoint. Try reducing the rate at which you make queries."
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/paths/~1phone_numbers/get/responses/401/content/application~1json/schema"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "examples": {
                  "Internal Server Error": {
                    "value": {
                      "error": {
                        "code": "INTERNAL_ERROR",
                        "description": "Something went wrong internally, please try again later."
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/paths/~1phone_numbers/get/responses/401/content/application~1json/schema"
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "delete": {
        "tags": [
          "Phone Number Management"
        ],
        "summary": "Remove Phone Numbers",
        "description": "Remove outbound phone numbers.\n\nThese phone numbers will no longer be allowed to call consumer numbers.\n\nNote: This endpoint is only required for legacy masked phone number leads before 16th April 2026\n",
        "operationId": "remove-phone-numbers",
        "requestBody": {
          "description": "Request body for removing outbound phone numbers.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PhoneNumbersDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The phone numbers were successfully removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhoneNumbersDeleteResponse"
                },
                "examples": {
                  "PhoneNumbers": {
                    "value": {
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/schemas/RemovePhoneNumbersError400"
          },
          "401": {
            "$ref": "#/paths/~1phone_numbers/get/responses/401"
          },
          "403": {
            "$ref": "#/paths/~1phone_numbers/get/responses/403"
          },
          "404": {
            "$ref": "#/paths/~1phone_numbers/get/responses/404"
          },
          "429": {
            "$ref": "#/paths/~1phone_numbers/get/responses/429"
          },
          "500": {
            "$ref": "#/paths/~1phone_numbers/get/responses/500"
          }
        },
        "deprecated": true
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 104,
      "1": 47,
      "2": 34,
      "3": 99,
      "4": 163,
      "5": 142,
      "6": 245,
      "7": 0,
      "8": 84,
      "9": 83,
      "10": 143,
      "11": 238
    }
  }
}
```