Create Phone Number

Create a new phone number.

Parameters:
phone_number (PhoneNumberCreate): The phone number data to create.
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 created phone number.

Raises:
HTTPException:
- 400: If organization ID is missing
- 403: If voice assistant or squad does not belong to the organization
- 404: If 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 creation

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