Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 2.47 KB

SWGCallsApi.md

File metadata and controls

70 lines (48 loc) · 2.47 KB

SWGCallsApi

All URIs are relative to https://api.phone.com/v4

Method HTTP request Description
createAccountCall POST /accounts/{account_id}/calls Make a phone call

createAccountCall

-(NSURLSessionTask*) createAccountCallWithAccountId: (NSNumber*) accountId
    data: (SWGCreateCallParams*) data
        completionHandler: (void (^)(SWGCallFull* output, NSError* error)) handler;

Make a phone call

Make a phone call. See Calls for more details and how to setup caller id's. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Calls API with the following definition: POST https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/calls

Example

SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


NSNumber* accountId = @56; // Account ID
SWGCreateCallParams* data = [[SWGCreateCallParams alloc] init]; // Call data (optional)

SWGCallsApi*apiInstance = [[SWGCallsApi alloc] init];

// Make a phone call
[apiInstance createAccountCallWithAccountId:accountId
              data:data
          completionHandler: ^(SWGCallFull* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGCallsApi->createAccountCall: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
accountId NSNumber* Account ID
data SWGCreateCallParams* Call data [optional]

Return type

SWGCallFull*

Authorization

apiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]