github.com/twilio/twilio-go@v1.20.1/rest/api/v2010/docs/AccountsApi.md (about)

     1  # AccountsApi
     2  
     3  All URIs are relative to *https://api.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateAccount**](AccountsApi.md#CreateAccount) | **Post** /2010-04-01/Accounts.json | 
     8  [**FetchAccount**](AccountsApi.md#FetchAccount) | **Get** /2010-04-01/Accounts/{Sid}.json | 
     9  [**ListAccount**](AccountsApi.md#ListAccount) | **Get** /2010-04-01/Accounts.json | 
    10  [**UpdateAccount**](AccountsApi.md#UpdateAccount) | **Post** /2010-04-01/Accounts/{Sid}.json | 
    11  
    12  
    13  
    14  ## CreateAccount
    15  
    16  > ApiV2010Account CreateAccount(ctx, optional)
    17  
    18  
    19  
    20  Create a new Twilio Subaccount from the account making the request
    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 CreateAccountParams struct
    29  
    30  
    31  Name | Type | Description
    32  ------------- | ------------- | -------------
    33  **FriendlyName** | **string** | A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}`
    34  
    35  ### Return type
    36  
    37  [**ApiV2010Account**](ApiV2010Account.md)
    38  
    39  ### Authorization
    40  
    41  [accountSid_authToken](../README.md#accountSid_authToken)
    42  
    43  ### HTTP request headers
    44  
    45  - **Content-Type**: application/x-www-form-urlencoded
    46  - **Accept**: application/json
    47  
    48  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    49  [[Back to Model list]](../README.md#documentation-for-models)
    50  [[Back to README]](../README.md)
    51  
    52  
    53  ## FetchAccount
    54  
    55  > ApiV2010Account FetchAccount(ctx, Sid)
    56  
    57  
    58  
    59  Fetch the account specified by the provided Account Sid
    60  
    61  ### Path Parameters
    62  
    63  
    64  Name | Type | Description
    65  ------------- | ------------- | -------------
    66  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    67  **Sid** | **string** | The Account Sid that uniquely identifies the account to fetch
    68  
    69  ### Other Parameters
    70  
    71  Other parameters are passed through a pointer to a FetchAccountParams struct
    72  
    73  
    74  Name | Type | Description
    75  ------------- | ------------- | -------------
    76  
    77  ### Return type
    78  
    79  [**ApiV2010Account**](ApiV2010Account.md)
    80  
    81  ### Authorization
    82  
    83  [accountSid_authToken](../README.md#accountSid_authToken)
    84  
    85  ### HTTP request headers
    86  
    87  - **Content-Type**: Not defined
    88  - **Accept**: application/json
    89  
    90  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
    91  [[Back to Model list]](../README.md#documentation-for-models)
    92  [[Back to README]](../README.md)
    93  
    94  
    95  ## ListAccount
    96  
    97  > []ApiV2010Account ListAccount(ctx, optional)
    98  
    99  
   100  
   101  Retrieves a collection of Accounts belonging to the account used to make the request
   102  
   103  ### Path Parameters
   104  
   105  This endpoint does not need any path parameter.
   106  
   107  ### Other Parameters
   108  
   109  Other parameters are passed through a pointer to a ListAccountParams struct
   110  
   111  
   112  Name | Type | Description
   113  ------------- | ------------- | -------------
   114  **FriendlyName** | **string** | Only return the Account resources with friendly names that exactly match this name.
   115  **Status** | **string** | Only return Account resources with the given status. Can be `closed`, `suspended` or `active`.
   116  **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000.
   117  **Limit** | **int** | Max number of records to return.
   118  
   119  ### Return type
   120  
   121  [**[]ApiV2010Account**](ApiV2010Account.md)
   122  
   123  ### Authorization
   124  
   125  [accountSid_authToken](../README.md#accountSid_authToken)
   126  
   127  ### HTTP request headers
   128  
   129  - **Content-Type**: Not defined
   130  - **Accept**: application/json
   131  
   132  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   133  [[Back to Model list]](../README.md#documentation-for-models)
   134  [[Back to README]](../README.md)
   135  
   136  
   137  ## UpdateAccount
   138  
   139  > ApiV2010Account UpdateAccount(ctx, Sidoptional)
   140  
   141  
   142  
   143  Modify the properties of a given Account
   144  
   145  ### Path Parameters
   146  
   147  
   148  Name | Type | Description
   149  ------------- | ------------- | -------------
   150  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
   151  **Sid** | **string** | The Account Sid that uniquely identifies the account to update
   152  
   153  ### Other Parameters
   154  
   155  Other parameters are passed through a pointer to a UpdateAccountParams struct
   156  
   157  
   158  Name | Type | Description
   159  ------------- | ------------- | -------------
   160  **FriendlyName** | **string** | Update the human-readable description of this Account
   161  **Status** | **string** | 
   162  
   163  ### Return type
   164  
   165  [**ApiV2010Account**](ApiV2010Account.md)
   166  
   167  ### Authorization
   168  
   169  [accountSid_authToken](../README.md#accountSid_authToken)
   170  
   171  ### HTTP request headers
   172  
   173  - **Content-Type**: application/x-www-form-urlencoded
   174  - **Accept**: application/json
   175  
   176  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
   177  [[Back to Model list]](../README.md#documentation-for-models)
   178  [[Back to README]](../README.md)
   179