github.com/twilio/twilio-go@v1.20.1/rest/numbers/v2/docs/HostedNumberOrdersApi.md (about)

     1  # HostedNumberOrdersApi
     2  
     3  All URIs are relative to *https://numbers.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateHostedNumberOrder**](HostedNumberOrdersApi.md#CreateHostedNumberOrder) | **Post** /v2/HostedNumber/Orders | 
     8  [**DeleteHostedNumberOrder**](HostedNumberOrdersApi.md#DeleteHostedNumberOrder) | **Delete** /v2/HostedNumber/Orders/{Sid} | 
     9  [**FetchHostedNumberOrder**](HostedNumberOrdersApi.md#FetchHostedNumberOrder) | **Get** /v2/HostedNumber/Orders/{Sid} | 
    10  [**ListHostedNumberOrder**](HostedNumberOrdersApi.md#ListHostedNumberOrder) | **Get** /v2/HostedNumber/Orders | 
    11  
    12  
    13  
    14  ## CreateHostedNumberOrder
    15  
    16  > NumbersV2HostedNumberOrder CreateHostedNumberOrder(ctx, optional)
    17  
    18  
    19  
    20  Host a phone number's capability on Twilio's platform.
    21  
    22  ### Path Parameters
    23  
    24  This endpoint does not need any path parameter.
    25  
    26  ### Other Parameters
    27  
    28  Other parameters are passed through a pointer to a CreateHostedNumberOrderParams struct
    29  
    30  
    31  Name | Type | Description
    32  ------------- | ------------- | -------------
    33  **PhoneNumber** | **string** | The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format
    34  **ContactPhoneNumber** | **string** | The contact phone number of the person authorized to sign the Authorization Document.
    35  **AddressSid** | **string** | Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
    36  **Email** | **string** | Optional. Email of the owner of this phone number that is being hosted.
    37  **AccountSid** | **string** | This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to.
    38  **FriendlyName** | **string** | A 128 character string that is a human readable text that describes this resource.
    39  **CcEmails** | **[]string** | Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to.
    40  **SmsUrl** | **string** | The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.
    41  **SmsMethod** | **string** | The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`.  This will be copied onto the IncomingPhoneNumber resource.
    42  **SmsFallbackUrl** | **string** | A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource.
    43  **SmsCapability** | **bool** | Used to specify that the SMS capability will be hosted on Twilio's platform.
    44  **SmsFallbackMethod** | **string** | The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
    45  **StatusCallbackUrl** | **string** | Optional. The Status Callback URL attached to the IncomingPhoneNumber resource.
    46  **StatusCallbackMethod** | **string** | Optional. The Status Callback Method attached to the IncomingPhoneNumber resource.
    47  **SmsApplicationSid** | **string** | Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application.
    48  **ContactTitle** | **string** | The title of the person authorized to sign the Authorization Document for this phone number.
    49  
    50  ### Return type
    51  
    52  [**NumbersV2HostedNumberOrder**](NumbersV2HostedNumberOrder.md)
    53  
    54  ### Authorization
    55  
    56  [accountSid_authToken](../README.md#accountSid_authToken)
    57  
    58  ### HTTP request headers
    59  
    60  - **Content-Type**: application/x-www-form-urlencoded
    61  - **Accept**: application/json
    62  
    63  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    64  [[Back to Model list]](../README.md#documentation-for-models)
    65  [[Back to README]](../README.md)
    66  
    67  
    68  ## DeleteHostedNumberOrder
    69  
    70  > DeleteHostedNumberOrder(ctx, Sid)
    71  
    72  
    73  
    74  Cancel the HostedNumberOrder (only available when the status is in `received`).
    75  
    76  ### Path Parameters
    77  
    78  
    79  Name | Type | Description
    80  ------------- | ------------- | -------------
    81  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    82  **Sid** | **string** | A 34 character string that uniquely identifies this HostedNumberOrder.
    83  
    84  ### Other Parameters
    85  
    86  Other parameters are passed through a pointer to a DeleteHostedNumberOrderParams struct
    87  
    88  
    89  Name | Type | Description
    90  ------------- | ------------- | -------------
    91  
    92  ### Return type
    93  
    94   (empty response body)
    95  
    96  ### Authorization
    97  
    98  [accountSid_authToken](../README.md#accountSid_authToken)
    99  
   100  ### HTTP request headers
   101  
   102  - **Content-Type**: Not defined
   103  - **Accept**: Not defined
   104  
   105  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   106  [[Back to Model list]](../README.md#documentation-for-models)
   107  [[Back to README]](../README.md)
   108  
   109  
   110  ## FetchHostedNumberOrder
   111  
   112  > NumbersV2HostedNumberOrder FetchHostedNumberOrder(ctx, Sid)
   113  
   114  
   115  
   116  Fetch a specific HostedNumberOrder.
   117  
   118  ### Path Parameters
   119  
   120  
   121  Name | Type | Description
   122  ------------- | ------------- | -------------
   123  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   124  **Sid** | **string** | A 34 character string that uniquely identifies this HostedNumberOrder.
   125  
   126  ### Other Parameters
   127  
   128  Other parameters are passed through a pointer to a FetchHostedNumberOrderParams struct
   129  
   130  
   131  Name | Type | Description
   132  ------------- | ------------- | -------------
   133  
   134  ### Return type
   135  
   136  [**NumbersV2HostedNumberOrder**](NumbersV2HostedNumberOrder.md)
   137  
   138  ### Authorization
   139  
   140  [accountSid_authToken](../README.md#accountSid_authToken)
   141  
   142  ### HTTP request headers
   143  
   144  - **Content-Type**: Not defined
   145  - **Accept**: application/json
   146  
   147  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   148  [[Back to Model list]](../README.md#documentation-for-models)
   149  [[Back to README]](../README.md)
   150  
   151  
   152  ## ListHostedNumberOrder
   153  
   154  > []NumbersV2HostedNumberOrder ListHostedNumberOrder(ctx, optional)
   155  
   156  
   157  
   158  Retrieve a list of HostedNumberOrders belonging to the account initiating the request.
   159  
   160  ### Path Parameters
   161  
   162  This endpoint does not need any path parameter.
   163  
   164  ### Other Parameters
   165  
   166  Other parameters are passed through a pointer to a ListHostedNumberOrderParams struct
   167  
   168  
   169  Name | Type | Description
   170  ------------- | ------------- | -------------
   171  **Status** | **string** | The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`.
   172  **SmsCapability** | **bool** | Whether the SMS capability will be hosted on our platform. Can be `true` of `false`.
   173  **PhoneNumber** | **string** | An E164 formatted phone number hosted by this HostedNumberOrder.
   174  **IncomingPhoneNumberSid** | **string** | A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
   175  **FriendlyName** | **string** | A human readable description of this resource, up to 128 characters.
   176  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   177  **Limit** | **int** | Max number of records to return.
   178  
   179  ### Return type
   180  
   181  [**[]NumbersV2HostedNumberOrder**](NumbersV2HostedNumberOrder.md)
   182  
   183  ### Authorization
   184  
   185  [accountSid_authToken](../README.md#accountSid_authToken)
   186  
   187  ### HTTP request headers
   188  
   189  - **Content-Type**: Not defined
   190  - **Accept**: application/json
   191  
   192  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   193  [[Back to Model list]](../README.md#documentation-for-models)
   194  [[Back to README]](../README.md)
   195