Update Phone Number

Update an existing phone number.

Parameters:
phone_number_id (int): The ID of the phone number to update.
phone_number (PhoneNumberUpdate): The updated phone number data.
request (Request): The FastAPI request object.
db (AsyncSession): The database session (injected).
organization_id (Optional[str]): The organization ID from the API key or request.

Returns:
PhoneNumber: The updated phone number.

Raises:
HTTPException:
- 400: If organization ID is missing
- 403: If voice assistant or squad does not belong to the organization
- 404: If phone number, voice assistant, or squad is not found
- 422: If there's a validation error in the request body
- 500: If an unexpected error occurs during update

Language
Credentials
Header
Click Try It! to start a request and see the response here!