# Create a phone Switch

You can use the API to deflect phone calls to the Intercom Messenger.
Calling this endpoint will send an SMS with a link to the Messenger to the phone number specified.

If custom attributes are specified, they will be added to the user or lead's custom data attributes.

Endpoint: POST /phone_call_redirects
Version: 2.7
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `phone` (string, required)
    Phone number in E.164 format, that will receive the SMS to continue the conversation in the Messenger.
    Example: +1 1234567890

  - `custom_attributes` (object)
    An object containing the different custom attributes associated to the conversation as key-value pairs. For relationship attributes the value will be a list of custom object instance models.

## Request examples:

  - `successful` (unknown)

  - `bad request - exception sending sms` (unknown)

  - `bad request - invalid number` (unknown)

  - `unprocessable entity` (unknown)

## Response 200:

  - `200` (unknown)
    successful

## Response 200 fields (application/json):

  - `type` (string)
    Enum: "phone_call_redirect"

  - `phone` (string)
    Phone number in E.164 format, that has received the SMS to continue the conversation in the Messenger.
    Example: +1 1234567890

## Response 400:

  - `400` (unknown)
    bad request - invalid number

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

## Response 422:

  - `422` (unknown)
    unprocessable entity

## Response 200 examples:

  - `successful` (unknown)

## Response 400 examples:

  - `bad request - exception sending sms` (unknown)

  - `bad request - invalid number` (unknown)

## Response 401 examples:

  - `Unauthorized` (unknown)

## Response 422 examples:

  - `unprocessable entity` (unknown)

